@farming-labs/docs 0.1.132 → 0.1.134

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.
@@ -856,9 +856,6 @@ function appendDocsMarkdownSitemapFooter(markdown, sitemap) {
856
856
  if (/^##\s+Sitemap\s*$/im.test(markdown)) return markdown;
857
857
  return `${markdown.replace(/\s+$/g, "")}\n\n${renderDocsMarkdownSitemapFooter(sitemap)}\n`;
858
858
  }
859
- function toDocsMarkdownYamlString(value) {
860
- return JSON.stringify(value);
861
- }
862
859
  function normalizeDocsMarkdownLastUpdated(value) {
863
860
  if (!value) return void 0;
864
861
  const trimmed = value.trim();
@@ -879,11 +876,11 @@ function resolveDocsMarkdownMetadataUrl(value, origin) {
879
876
  function renderDocsMarkdownFrontmatter({ title, description, canonicalUrl, markdownUrl, lastUpdated }) {
880
877
  return [
881
878
  "---",
882
- `title: ${toDocsMarkdownYamlString(title)}`,
883
- ...description ? [`description: ${toDocsMarkdownYamlString(description)}`] : [],
884
- `canonical_url: ${toDocsMarkdownYamlString(canonicalUrl)}`,
885
- `markdown_url: ${toDocsMarkdownYamlString(markdownUrl)}`,
886
- ...lastUpdated ? [`last_updated: ${toDocsMarkdownYamlString(lastUpdated)}`] : [],
879
+ `title: ${toYamlString(title)}`,
880
+ ...description ? [`description: ${toYamlString(description)}`] : [],
881
+ `canonical_url: ${toYamlString(canonicalUrl)}`,
882
+ `markdown_url: ${toYamlString(markdownUrl)}`,
883
+ ...lastUpdated ? [`last_updated: ${toYamlString(lastUpdated)}`] : [],
887
884
  "---"
888
885
  ].join("\n");
889
886
  }
@@ -1,9 +1,9 @@
1
1
  import "./reading-time-DPAazAGu.mjs";
2
2
  import "./search-BL7o2rXk.mjs";
3
- import "./agent-xmep0HVx.mjs";
4
- import "./robots-B-1XRFFz.mjs";
3
+ import "./agent-B7T4gauS.mjs";
4
+ import "./robots-CDdD2o-Q.mjs";
5
5
  import "./sitemap-server-idLUrmmU.mjs";
6
6
  import "./config-CBoixmrv.mjs";
7
- import { a as readPageTokenBudget, i as printAgentCompactHelp, n as inspectAgentCompactionState, o as scanDocsPageTargets, r as parseAgentCompactArgs, t as compactAgentDocs } from "./codeblocks-d2G0laKv.mjs";
7
+ import { a as readPageTokenBudget, i as printAgentCompactHelp, n as inspectAgentCompactionState, o as scanDocsPageTargets, r as parseAgentCompactArgs, t as compactAgentDocs } from "./codeblocks-BoYq0OXV.mjs";
8
8
 
9
9
  export { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp };
@@ -1,5 +1,5 @@
1
1
  import "./search-BL7o2rXk.mjs";
2
- import { G as renderDocsAgentsDocument, X as resolveDocsAgentFeedbackConfig, a as DEFAULT_AGENT_MD_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, y as DEFAULT_OPENAPI_SCHEMA_ROUTE } from "./agent-xmep0HVx.mjs";
2
+ import { G as renderDocsAgentsDocument, X as resolveDocsAgentFeedbackConfig, a as DEFAULT_AGENT_MD_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, y as DEFAULT_OPENAPI_SCHEMA_ROUTE } from "./agent-B7T4gauS.mjs";
3
3
  import { S as resolveApiReferenceConfig } from "./sitemap-server-idLUrmmU.mjs";
4
4
  import { resolveDocsMcpConfig } from "./mcp.mjs";
5
5
  import "./server.mjs";
@@ -89,26 +89,32 @@ async function main() {
89
89
  } else if (parsedCommand.command === "dev") {
90
90
  const { dev } = await import("../dev-DdlhqXNU.mjs");
91
91
  await dev(devOptions);
92
+ } else if (parsedCommand.command === "deploy") {
93
+ const { runCloudDeploy } = await import("../cloud-BdSGNsah.mjs");
94
+ await runCloudDeploy(cloudOptions);
92
95
  } else if (parsedCommand.command === "preview") {
93
- const { runCloudPreview } = await import("../cloud-88xTLXn3.mjs");
96
+ const { runCloudPreview } = await import("../cloud-BdSGNsah.mjs");
94
97
  await runCloudPreview(cloudOptions);
98
+ } else if (parsedCommand.command === "cloud" && subcommand === "deploy") {
99
+ const { runCloudDeploy } = await import("../cloud-BdSGNsah.mjs");
100
+ await runCloudDeploy(cloudOptions);
95
101
  } else if (parsedCommand.command === "cloud" && subcommand === "preview") {
96
- const { runCloudPreview } = await import("../cloud-88xTLXn3.mjs");
102
+ const { runCloudPreview } = await import("../cloud-BdSGNsah.mjs");
97
103
  await runCloudPreview(cloudOptions);
98
104
  } else if (parsedCommand.command === "cloud" && subcommand === "sync") {
99
- const { syncCloudConfig } = await import("../cloud-88xTLXn3.mjs");
105
+ const { syncCloudConfig } = await import("../cloud-BdSGNsah.mjs");
100
106
  await syncCloudConfig(cloudOptions);
101
107
  } else if (parsedCommand.command === "cloud") {
102
108
  console.error(pc.red(`Unknown cloud subcommand: ${subcommand ?? "(missing)"}`));
103
109
  console.error();
104
- const { printCloudHelp } = await import("../cloud-88xTLXn3.mjs");
110
+ const { printCloudHelp } = await import("../cloud-BdSGNsah.mjs");
105
111
  printCloudHelp();
106
112
  process.exit(1);
107
113
  } else if (parsedCommand.command === "mcp") {
108
114
  const { runMcp } = await import("../mcp-CUAR3XfW.mjs");
109
115
  await runMcp(mcpOptions);
110
116
  } else if (parsedCommand.command === "agent" && subcommand === "compact") {
111
- const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-nf_jCPfU.mjs");
117
+ const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-CKxYOgwV.mjs");
112
118
  const agentCompactOptions = parseAgentCompactArgs(args.slice(2));
113
119
  if (agentCompactOptions.help) {
114
120
  printAgentCompactHelp();
@@ -118,11 +124,11 @@ async function main() {
118
124
  } else if (parsedCommand.command === "agent") {
119
125
  console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
120
126
  console.error();
121
- const { printAgentCompactHelp } = await import("../agent-nf_jCPfU.mjs");
127
+ const { printAgentCompactHelp } = await import("../agent-CKxYOgwV.mjs");
122
128
  printAgentCompactHelp();
123
129
  process.exit(1);
124
130
  } else if (parsedCommand.command === "agents" && subcommand === "generate") {
125
- const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-CdPlpyiG.mjs");
131
+ const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-Cht6pl2W.mjs");
126
132
  const agentsOptions = parseAgentsGenerateArgs(args.slice(2));
127
133
  if (agentsOptions.help) {
128
134
  printAgentsGenerateHelp();
@@ -132,11 +138,11 @@ async function main() {
132
138
  } else if (parsedCommand.command === "agents") {
133
139
  console.error(pc.red(`Unknown agents subcommand: ${subcommand ?? "(missing)"}`));
134
140
  console.error();
135
- const { printAgentsGenerateHelp } = await import("../agents-CdPlpyiG.mjs");
141
+ const { printAgentsGenerateHelp } = await import("../agents-Cht6pl2W.mjs");
136
142
  printAgentsGenerateHelp();
137
143
  process.exit(1);
138
144
  } else if (parsedCommand.command === "doctor") {
139
- const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-Bhi2c8cu.mjs");
145
+ const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-CGwgkvAq.mjs");
140
146
  const doctorOptions = parseDoctorArgs(args.slice(1));
141
147
  if (doctorOptions.help) {
142
148
  printDoctorHelp();
@@ -152,7 +158,7 @@ async function main() {
152
158
  }
153
159
  await runReview(reviewOptions);
154
160
  } else if ((parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") && subcommand === "validate") {
155
- const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-d2G0laKv.mjs");
161
+ const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-BoYq0OXV.mjs");
156
162
  const codeBlocksOptions = parseCodeBlocksValidateArgs(args.slice(2));
157
163
  if (codeBlocksOptions.help) {
158
164
  printCodeBlocksValidateHelp();
@@ -162,7 +168,7 @@ async function main() {
162
168
  } else if (parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") {
163
169
  console.error(pc.red(`Unknown codeblocks subcommand: ${subcommand ?? "(missing)"}`));
164
170
  console.error();
165
- const { printCodeBlocksValidateHelp } = await import("../codeblocks-d2G0laKv.mjs");
171
+ const { printCodeBlocksValidateHelp } = await import("../codeblocks-BoYq0OXV.mjs");
166
172
  printCodeBlocksValidateHelp();
167
173
  process.exit(1);
168
174
  } else if (parsedCommand.command === "search" && subcommand === "sync") {
@@ -188,7 +194,7 @@ async function main() {
188
194
  printSitemapGenerateHelp();
189
195
  process.exit(1);
190
196
  } else if (parsedCommand.command === "robots" && subcommand === "generate") {
191
- const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-C9yxX1DG.mjs");
197
+ const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-g3-jDypb.mjs");
192
198
  const robotsOptions = parseRobotsGenerateArgs(args.slice(2));
193
199
  if (robotsOptions.help) {
194
200
  printRobotsGenerateHelp();
@@ -198,7 +204,7 @@ async function main() {
198
204
  } else if (parsedCommand.command === "robots") {
199
205
  console.error(pc.red(`Unknown robots subcommand: ${subcommand ?? "(missing)"}`));
200
206
  console.error();
201
- const { printRobotsGenerateHelp } = await import("../robots-C9yxX1DG.mjs");
207
+ const { printRobotsGenerateHelp } = await import("../robots-g3-jDypb.mjs");
202
208
  printRobotsGenerateHelp();
203
209
  process.exit(1);
204
210
  } else if (parsedCommand.command === "downgrade") {
@@ -238,8 +244,9 @@ ${pc.dim("Usage:")}
238
244
  ${pc.dim("Commands:")}
239
245
  ${pc.cyan("init")} Scaffold docs in your project (default)
240
246
  ${pc.cyan("dev")} Run frameworkless docs locally from ${pc.dim("docs.json")}
241
- ${pc.cyan("preview")} Sync cloud config and request a hosted Docs Cloud preview
242
- ${pc.cyan("cloud")} Docs Cloud utilities (${pc.dim("preview")}, ${pc.dim("sync")})
247
+ ${pc.cyan("deploy")} Sync cloud config and deploy hosted preview docs
248
+ ${pc.cyan("preview")} Alias for ${pc.cyan("deploy")}
249
+ ${pc.cyan("cloud")} Docs Cloud utilities (${pc.dim("deploy")}, ${pc.dim("preview")}, ${pc.dim("sync")})
243
250
  ${pc.cyan("agent")} Agent utilities (${pc.dim("compact")} to generate sibling agent.md files)
244
251
  ${pc.cyan("agents")} AGENTS.md utilities (${pc.dim("generate")} for static agent instructions)
245
252
  ${pc.cyan("doctor")} Inspect and score agent or reader-facing docs quality
@@ -273,14 +280,17 @@ ${pc.dim("Options for dev:")}
273
280
  ${pc.cyan("--host [host]")} Expose the preview on your network; optionally pass a host value
274
281
  ${pc.cyan("--verbose")} Show raw runtime logs in addition to branded CLI output
275
282
 
276
- ${pc.dim("Options for cloud preview:")}
277
- ${pc.cyan("preview")} Sync ${pc.dim("docs.config.ts")} into ${pc.dim("docs.json")} and request a hosted preview
278
- ${pc.cyan("cloud preview")} Same as ${pc.cyan("preview")}
283
+ ${pc.dim("Options for cloud deploy:")}
284
+ ${pc.cyan("deploy")} Sync ${pc.dim("docs.config.ts")} into ${pc.dim("docs.json")} and deploy hosted preview docs
285
+ ${pc.cyan("cloud deploy")} Same as ${pc.cyan("deploy")}
286
+ ${pc.cyan("preview")} Alias for ${pc.cyan("deploy")}
287
+ ${pc.cyan("cloud preview")} Compatibility alias for ${pc.cyan("cloud deploy")}
279
288
  ${pc.cyan("cloud sync")} Only materialize cloud settings into ${pc.dim("docs.json")}
280
289
  ${pc.cyan("--config <path>")} Use a custom docs config path
281
290
  ${pc.cyan("--api-base-url <url>")} Override the Docs Cloud API base URL
282
291
  ${pc.cyan("--api-key <key>")} Use an API key directly; prefer ${pc.dim("cloud.apiKey.env")}
283
292
  ${pc.cyan("--json")} Print machine-readable output
293
+ ${pc.dim("required scopes")} project:read, preview:write, jobs:read
284
294
 
285
295
  ${pc.dim("Options for agent compact:")}
286
296
  ${pc.cyan("agent compact <page...>")} Compact pages and write sibling ${pc.dim("agent.md")} files
@@ -12,6 +12,11 @@ const DOCS_CLOUD_DEFAULT_API_KEY_ENV = "DOCS_CLOUD_API_KEY";
12
12
  const DEFAULT_DOCS_CLOUD_API_BASE_URL = "https://docs-app.farming-labs.dev";
13
13
  const DEFAULT_PREVIEW_TIMEOUT_MS = 300 * 1e3;
14
14
  const DEFAULT_PREVIEW_POLL_INTERVAL_MS = 2e3;
15
+ const REQUIRED_PREVIEW_API_KEY_SCOPES = [
16
+ "project:read",
17
+ "preview:write",
18
+ "jobs:read"
19
+ ];
15
20
  function isRecord(value) {
16
21
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
17
22
  }
@@ -146,7 +151,6 @@ function normalizeAnalyticsConfig(analytics) {
146
151
  function normalizeCloudConfig(cloud) {
147
152
  const normalized = {
148
153
  apiKey: normalizeApiKeyConfig(cloud?.apiKey),
149
- preview: normalizePreviewConfig(cloud?.preview),
150
154
  publish: normalizePublishConfig(cloud?.publish)
151
155
  };
152
156
  if (cloud?.enabled === false) normalized.enabled = false;
@@ -156,6 +160,7 @@ function normalizeCloudConfig(cloud) {
156
160
  if (ai) normalized.ai = ai;
157
161
  const deploy = normalizeFeatureConfig(cloud?.deploy);
158
162
  if (deploy) normalized.deploy = deploy;
163
+ if (cloud?.preview) normalized.preview = normalizePreviewConfig(cloud.preview);
159
164
  return normalized;
160
165
  }
161
166
  function readStaticCloudConfig(content) {
@@ -223,7 +228,7 @@ function resolveSiteConfig(rootDir, snapshot, existing) {
223
228
  const description = metadataDescription || existingSite?.description;
224
229
  if (!name && !description && !existingSite) return void 0;
225
230
  return {
226
- ...existingSite ?? {},
231
+ ...existingSite,
227
232
  ...typeof name === "string" ? { name } : {},
228
233
  ...typeof description === "string" ? { description } : {}
229
234
  };
@@ -253,12 +258,12 @@ function materializeDocsJsonObject(params) {
253
258
  const existingContent = toJsonRecord(params.existing?.content);
254
259
  const site = resolveSiteConfig(params.rootDir, params.snapshot, params.existing);
255
260
  const content = {
256
- ...existingContent ?? {},
261
+ ...existingContent,
257
262
  docsRoot,
258
263
  ...apiReferenceRoot ? { apiReferenceRoot } : {}
259
264
  };
260
265
  return {
261
- ...params.existing ?? {},
266
+ ...params.existing,
262
267
  $schema: params.existing?.$schema ?? DOCS_CLOUD_SCHEMA_URL,
263
268
  version: 1,
264
269
  docs: resolveDocsBlock(params.rootDir, params.snapshot, params.existing),
@@ -324,6 +329,89 @@ function readResponseMessage(body, fallback) {
324
329
  }
325
330
  return fallback;
326
331
  }
332
+ const FAILURE_DETAIL_OBJECT_KEYS = [
333
+ "job",
334
+ "run",
335
+ "preview",
336
+ "deployment",
337
+ "build"
338
+ ];
339
+ const FAILURE_DETAIL_ARRAY_KEYS = [
340
+ "jobs",
341
+ "runs",
342
+ "steps",
343
+ "tasks",
344
+ "stages",
345
+ "checks"
346
+ ];
347
+ const FAILURE_DETAIL_MESSAGE_KEYS = [
348
+ "error",
349
+ "message",
350
+ "detail",
351
+ "reason",
352
+ "summary"
353
+ ];
354
+ const FAILURE_DETAIL_LABEL_KEYS = [
355
+ "name",
356
+ "title",
357
+ "label",
358
+ "step",
359
+ "phase",
360
+ "stage",
361
+ "id"
362
+ ];
363
+ const FAILURE_DETAIL_STATUS_KEYS = [
364
+ "status",
365
+ "state",
366
+ "conclusion",
367
+ "result",
368
+ "outcome"
369
+ ];
370
+ function readTrimmedString(value) {
371
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
372
+ }
373
+ function readFirstString(record, keys) {
374
+ for (const key of keys) {
375
+ const value = readTrimmedString(record[key]);
376
+ if (value) return value;
377
+ }
378
+ }
379
+ function singularizeKey(key) {
380
+ return key.endsWith("s") ? key.slice(0, -1) : key;
381
+ }
382
+ function findPreviewFailureDetail(value, parentPath = [], fallbackLabel) {
383
+ if (!isRecord(value)) return void 0;
384
+ const label = readFirstString(value, FAILURE_DETAIL_LABEL_KEYS) ?? fallbackLabel;
385
+ const path = label ? [...parentPath, label] : parentPath;
386
+ for (const key of FAILURE_DETAIL_OBJECT_KEYS) {
387
+ const detail = findPreviewFailureDetail(value[key], path, key);
388
+ if (detail) return detail;
389
+ }
390
+ for (const key of FAILURE_DETAIL_ARRAY_KEYS) {
391
+ const children = value[key];
392
+ if (!Array.isArray(children)) continue;
393
+ for (const child of children) {
394
+ const detail = findPreviewFailureDetail(child, path, singularizeKey(key));
395
+ if (detail) return detail;
396
+ }
397
+ }
398
+ const status = readFirstString(value, FAILURE_DETAIL_STATUS_KEYS);
399
+ if (!isTerminalFailureStatus(status)) return void 0;
400
+ return {
401
+ message: readFirstString(value, FAILURE_DETAIL_MESSAGE_KEYS),
402
+ path,
403
+ status
404
+ };
405
+ }
406
+ function readPreviewFailureMessage(body, fallback) {
407
+ const detail = findPreviewFailureDetail(body);
408
+ if (!detail) return readResponseMessage(body, fallback);
409
+ const prefix = fallback.replace(/\.+$/g, "");
410
+ const location = detail.path.length > 0 ? ` at ${detail.path.join(" > ")}` : "";
411
+ const status = detail.status ? ` (${detail.status})` : "";
412
+ const message = detail.message ?? readResponseMessage(body, "");
413
+ return message ? `${prefix}${location}${status}: ${message}` : `${prefix}${location}${status}.`;
414
+ }
327
415
  async function fetchCloudJson(params) {
328
416
  const headers = new Headers(params.init?.headers);
329
417
  headers.set("authorization", `Bearer ${params.apiKey}`);
@@ -357,7 +445,31 @@ function readStatusUrl(body, apiBaseUrl) {
357
445
  }
358
446
  function readPreviewStatus(body) {
359
447
  if (!isRecord(body)) return void 0;
448
+ const job = body.job;
449
+ if (isRecord(job) && typeof job.status === "string") return job.status;
450
+ const preview = body.preview;
451
+ if (isRecord(preview) && typeof preview.status === "string") return preview.status;
360
452
  const status = body.status;
453
+ if (typeof status === "string") return status;
454
+ }
455
+ function readApiKeyScopes(body) {
456
+ if (!isRecord(body)) return [];
457
+ const apiKey = body.apiKey;
458
+ if (!isRecord(apiKey) || !Array.isArray(apiKey.scopes)) return [];
459
+ return apiKey.scopes.filter((scope) => typeof scope === "string");
460
+ }
461
+ function assertPreviewApiKeyScopes(identity) {
462
+ const scopes = readApiKeyScopes(identity);
463
+ const missing = REQUIRED_PREVIEW_API_KEY_SCOPES.filter((scope) => !scopes.includes(scope));
464
+ if (missing.length > 0) throw new Error(`Docs Cloud API key is missing required preview scope${missing.length === 1 ? "" : "s"}: ${missing.join(", ")}.`);
465
+ return scopes;
466
+ }
467
+ function isTerminalFailureStatus(status) {
468
+ const normalized = status?.toLowerCase();
469
+ return normalized === "failed" || normalized === "failure" || normalized === "error" || normalized === "canceled" || normalized === "cancelled" || normalized === "timed_out" || normalized === "timeout";
470
+ }
471
+ function readStatusLabel(body) {
472
+ const status = readPreviewStatus(body);
361
473
  return typeof status === "string" ? status : void 0;
362
474
  }
363
475
  async function requestPreview(params) {
@@ -393,8 +505,7 @@ async function requestPreview(params) {
393
505
  url,
394
506
  response: statusBody
395
507
  };
396
- const status = readPreviewStatus(statusBody);
397
- if (status === "failed" || status === "error") throw new Error(readResponseMessage(statusBody, "Docs Cloud preview failed."));
508
+ if (isTerminalFailureStatus(readStatusLabel(statusBody))) throw new Error(readPreviewFailureMessage(statusBody, "Docs Cloud preview failed."));
398
509
  }
399
510
  throw new Error("Docs Cloud preview timed out before a URL was ready.");
400
511
  }
@@ -453,17 +564,18 @@ async function syncCloudConfig(options = {}) {
453
564
  console.log(`${pc.dim("api key env")} ${result.apiKeyEnv}`);
454
565
  return result;
455
566
  }
456
- async function runCloudPreview(options = {}) {
567
+ async function runCloudDeployment(options = {}) {
457
568
  const rootDir = options.rootDir ?? process.cwd();
458
- const spinner = createSpinner("Preparing Docs Cloud preview", options);
569
+ const spinner = createSpinner("Preparing Docs Cloud deployment", options);
459
570
  try {
460
571
  const materialized = await materializeCloudConfig({
461
572
  ...options,
462
573
  rootDir
463
574
  });
464
575
  spinner.update(`${materialized.created ? "Created" : "Synced"} ${DOCS_JSON_FILE}`);
465
- if (materialized.config.cloud?.enabled === false) throw new Error("Docs Cloud is disabled in cloud.enabled. Remove that override or set cloud.enabled: true before requesting a preview.");
466
- if (materialized.config.cloud?.preview?.enabled === false) throw new Error("Docs Cloud preview is disabled in cloud.preview.enabled. Set it to true before requesting a preview.");
576
+ if (materialized.config.cloud?.enabled === false) throw new Error("Docs Cloud is disabled in cloud.enabled. Remove that override or set cloud.enabled: true before deploying hosted preview docs.");
577
+ if (materialized.config.cloud?.preview?.enabled === false) throw new Error("Docs Cloud preview deployments are disabled in cloud.preview.enabled. Remove that legacy override before deploying hosted preview docs.");
578
+ if (materialized.config.cloud?.deploy?.enabled === false) throw new Error("Docs Cloud deployment is disabled in cloud.deploy.enabled. Set it to true before deploying hosted preview docs.");
467
579
  const apiKey = resolveApiKey(options, rootDir, materialized.apiKeyEnv);
468
580
  const apiBaseUrl = resolveApiBaseUrl(options);
469
581
  spinner.update("Validating Docs Cloud API key");
@@ -471,7 +583,8 @@ async function runCloudPreview(options = {}) {
471
583
  url: `${apiBaseUrl}/api/cloud/me`,
472
584
  apiKey
473
585
  });
474
- spinner.update("Requesting Docs Cloud preview deployment");
586
+ assertPreviewApiKeyScopes(identity);
587
+ spinner.update("Requesting Docs Cloud deployment");
475
588
  const preview = await requestPreview({
476
589
  apiBaseUrl,
477
590
  apiKey,
@@ -482,7 +595,7 @@ async function runCloudPreview(options = {}) {
482
595
  timeoutMs: options.timeoutMs ?? DEFAULT_PREVIEW_TIMEOUT_MS,
483
596
  pollIntervalMs: options.pollIntervalMs ?? DEFAULT_PREVIEW_POLL_INTERVAL_MS
484
597
  });
485
- spinner.succeed("Docs Cloud preview is ready");
598
+ spinner.succeed("Docs Cloud deployment is ready");
486
599
  const result = {
487
600
  url: preview.url,
488
601
  docsJsonPath: materialized.docsJsonPath,
@@ -491,7 +604,7 @@ async function runCloudPreview(options = {}) {
491
604
  response: preview.response
492
605
  };
493
606
  if (options.json) console.log(JSON.stringify(result, null, 2));
494
- else console.log(`${pc.bold("Preview")} ${pc.cyan(preview.url)}`);
607
+ else console.log(`${pc.bold("Deployment")} ${pc.cyan(preview.url)}`);
495
608
  return result;
496
609
  } catch (error) {
497
610
  const message = error instanceof Error ? error.message : String(error);
@@ -501,13 +614,21 @@ async function runCloudPreview(options = {}) {
501
614
  spinner.stop();
502
615
  }
503
616
  }
617
+ async function runCloudDeploy(options = {}) {
618
+ return runCloudDeployment(options);
619
+ }
620
+ async function runCloudPreview(options = {}) {
621
+ return runCloudDeployment(options);
622
+ }
504
623
  function printCloudHelp() {
505
624
  console.log(`
506
625
  ${pc.bold("@farming-labs/docs cloud")}
507
626
 
508
627
  ${pc.dim("Usage:")}
509
- ${pc.cyan("docs preview")} Sync ${pc.dim("docs.config.ts")} to ${pc.dim("docs.json")} and request a cloud preview
510
- ${pc.cyan("docs cloud preview")} Same as ${pc.cyan("docs preview")}
628
+ ${pc.cyan("docs deploy")} Sync ${pc.dim("docs.config.ts")} to ${pc.dim("docs.json")} and deploy hosted preview docs
629
+ ${pc.cyan("docs cloud deploy")} Same as ${pc.cyan("docs deploy")}
630
+ ${pc.cyan("docs preview")} Compatibility alias for ${pc.cyan("docs deploy")}
631
+ ${pc.cyan("docs cloud preview")} Compatibility alias for ${pc.cyan("docs cloud deploy")}
511
632
  ${pc.cyan("docs cloud sync")} Only materialize cloud settings into ${pc.dim("docs.json")}
512
633
 
513
634
  ${pc.dim("Options:")}
@@ -516,14 +637,17 @@ ${pc.dim("Options:")}
516
637
  ${pc.cyan("--api-key <key>")} Use an API key directly; prefer ${pc.dim("cloud.apiKey.env")}
517
638
  ${pc.cyan("--json")} Print machine-readable output
518
639
 
640
+ ${pc.dim("API key scopes:")}
641
+ ${REQUIRED_PREVIEW_API_KEY_SCOPES.join(", ")}
642
+
519
643
  ${pc.dim("Config example:")}
520
644
  cloud: {
521
645
  apiKey: { env: "DOCS_CLOUD_API_KEY" },
522
- preview: { enabled: true },
646
+ deploy: { enabled: true },
523
647
  publish: { mode: "draft-pr", baseBranch: "main" },
524
648
  }
525
649
  `);
526
650
  }
527
651
 
528
652
  //#endregion
529
- export { printCloudHelp, runCloudPreview, syncCloudConfig };
653
+ export { printCloudHelp, runCloudDeploy, runCloudPreview, syncCloudConfig };
@@ -1,5 +1,5 @@
1
1
  import { _ as parseGeneratedAgentDocument, h as hashGeneratedAgentContent, m as GENERATED_AGENT_PROVENANCE_VERSION, v as serializeGeneratedAgentDocument } from "./search-BL7o2rXk.mjs";
2
- import { A as findDocsMarkdownPage, q as renderDocsMarkdownDocument } from "./agent-xmep0HVx.mjs";
2
+ import { A as findDocsMarkdownPage, q as renderDocsMarkdownDocument } from "./agent-B7T4gauS.mjs";
3
3
  import "./index.mjs";
4
4
  import { createFilesystemDocsMcpSource } from "./mcp.mjs";
5
5
  import "./server.mjs";
@@ -1,14 +1,14 @@
1
1
  import "./reading-time-DPAazAGu.mjs";
2
2
  import "./search-BL7o2rXk.mjs";
3
3
  import { a as DEFAULT_SITEMAP_XML_ROUTE, d as resolveDocsSitemapConfig, i as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, r as DEFAULT_SITEMAP_MD_ROUTE } from "./sitemap-CMNj0Pt3.mjs";
4
- import { O as buildDocsMcpEndpointCandidates, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, d as DEFAULT_LLMS_FULL_TXT_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE } from "./agent-xmep0HVx.mjs";
5
- import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-B-1XRFFz.mjs";
4
+ import { O as buildDocsMcpEndpointCandidates, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, d as DEFAULT_LLMS_FULL_TXT_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE } from "./agent-B7T4gauS.mjs";
5
+ import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-CDdD2o-Q.mjs";
6
6
  import "./sitemap-server-idLUrmmU.mjs";
7
7
  import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
8
8
  import "./server.mjs";
9
9
  import { a as loadProjectEnv, c as readNavTitle, f as readTopLevelStringProperty, i as loadDocsConfigModule, m as resolveDocsContentDir, o as readBooleanProperty, p as resolveDocsConfigPath, r as extractTopLevelConfigObject, t as extractNestedObjectLiteral } from "./config-CBoixmrv.mjs";
10
10
  import { t as detectFramework } from "./utils-x5EtYWjC.mjs";
11
- import { n as inspectAgentCompactionState, o as scanDocsPageTargets } from "./codeblocks-d2G0laKv.mjs";
11
+ import { n as inspectAgentCompactionState, o as scanDocsPageTargets } from "./codeblocks-BoYq0OXV.mjs";
12
12
  import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
13
13
  import path from "node:path";
14
14
  import { LATEST_PROTOCOL_VERSION } from "@modelcontextprotocol/sdk/types.js";
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as DocsObservabilityEventInput, $t as SimpleDocsSearchConfig, A as DocsCloudApiKeyConfig, At as McpDocsSearchConfig, B as DocsCodeBlocksValidateConfig, Bt as PageFrontmatter, C as DocsAskAIActionData, Ct as FontStyle, D as DocsAskAIFeedbackMessage, Dt as LlmsTxtMaxCharsConfig, E as DocsAskAIFeedbackData, Et as LlmsTxtConfig, F as DocsCodeBlocksConfig, Ft as OpenDocsProviderId, G as DocsFeedbackValue, Gt as ResolvedDocsRelatedLink, H as DocsCodeBlocksValidationPolicy, Ht as PageSidebarFrontmatter, I as DocsCodeBlocksPlannerConfig, It as OpenDocsTarget, J as DocsMcpToolsConfig, Jt as SidebarFolderIndexBehavior, K as DocsI18nConfig, Kt as SidebarComponentProps, L as DocsCodeBlocksPlannerProvider, Lt as OpenGraphImage, M as DocsCloudFeatureConfig, Mt as OpenDocsConfig, N as DocsCloudPreviewConfig, Nt as OpenDocsProvider, O as DocsAskAIFeedbackValue, Ot as LlmsTxtMaxCharsMode, P as DocsCloudPublishConfig, Pt as OpenDocsProviderConfig, Q as DocsObservabilityEvent, Qt as SidebarTree, R as DocsCodeBlocksRunnerConfig, Rt as OrderingItem, S as DocsAnalyticsSource, St as FeedbackConfig, T as DocsAskAIFeedbackConfig, Tt as LastUpdatedConfig, U as DocsConfig, Ut as PageTwitter, V as DocsCodeBlocksValidationMode, Vt as PageOpenGraph, W as DocsFeedbackData, Wt as ReadingTimeConfig, X as DocsNav, Xt as SidebarNode, Y as DocsMetadata, Yt as SidebarFolderNode, Z as DocsObservabilityConfig, Zt as SidebarPageNode, _ as DocsAnalyticsConfig, _t as DocsSearchResult, a as ApiReferenceRenderer, at as DocsReviewScoreConfig, b as DocsAnalyticsEventType, bt as DocsSitemapConfig, c as ChangelogFrontmatter, ct as DocsRobotsRule, d as CustomDocsSearchConfig, dt as DocsSearchAdapterFactory, en as ThemeToggleConfig, et as DocsRelatedItem, f as DocsAgentFeedbackContext, ft as DocsSearchChunkingConfig, g as DocsAgentTraceStatus, gt as DocsSearchQuery, h as DocsAgentTraceEventType, ht as DocsSearchEmbeddingsConfig, i as ApiReferenceConfig, it as DocsReviewRulesConfig, j as DocsCloudConfig, jt as OGConfig, k as DocsAskAIMcpConfig, kt as LlmsTxtSectionConfig, l as CodeBlockCopyData, lt as DocsSearchAdapter, m as DocsAgentTraceEventInput, mt as DocsSearchDocument, n as AgentFeedbackConfig, nn as TypographyConfig, nt as DocsReviewCiMode, o as BreadcrumbConfig, ot as DocsReviewSeverity, p as DocsAgentFeedbackData, pt as DocsSearchConfig, q as DocsMcpConfig, qt as SidebarConfig, r as AlgoliaDocsSearchConfig, rn as UIConfig, rt as DocsReviewConfig, s as ChangelogConfig, st as DocsRobotsConfig, t as AIConfig, tn as TypesenseDocsSearchConfig, tt as DocsReviewCiConfig, u as CopyMarkdownConfig, ut as DocsSearchAdapterContext, v as DocsAnalyticsEvent, vt as DocsSearchResultType, w as DocsAskAIActionType, wt as GithubConfig, x as DocsAnalyticsInput, xt as DocsTheme, y as DocsAnalyticsEventInput, yt as DocsSearchSourcePage, z as DocsCodeBlocksRunnerProvider, zt as PageActionsConfig } from "./types-C-C-9SMJ.mjs";
2
- import { $ as createDocsAgentTraceId, A as resolveDocsSitemapRequest, C as buildDocsSitemapManifest, D as renderDocsSitemapXml, E as renderDocsSitemapMarkdown, I as PromptAction, J as DOCS_AGENT_TRACE_EVENT_TYPES, L as PromptProviderChoice, O as resolveDocsSitemapConfig, Q as createDocsAgentTraceContext, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, X as ResolvedDocsAnalyticsConfig, Y as DocsAgentTraceContext, Z as ResolvedDocsObservabilityConfig, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, at as DocsCloudAnalyticsOptions, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAgentTraceEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, it as resolveDocsObservabilityConfig, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, nt as emitDocsObservabilityEvent, o as createSimpleSearchAdapter, ot as createDocsCloudAnalytics, p as DEFAULT_SITEMAP_MANIFEST_PATH, r as createAlgoliaSearchAdapter, rt as resolveDocsAnalyticsConfig, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsAnalyticsEvent, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider } from "./search-CNoiftmI.mjs";
1
+ import { $ as DocsObservabilityEventInput, $t as SimpleDocsSearchConfig, A as DocsCloudApiKeyConfig, At as McpDocsSearchConfig, B as DocsCodeBlocksValidateConfig, Bt as PageFrontmatter, C as DocsAskAIActionData, Ct as FontStyle, D as DocsAskAIFeedbackMessage, Dt as LlmsTxtMaxCharsConfig, E as DocsAskAIFeedbackData, Et as LlmsTxtConfig, F as DocsCodeBlocksConfig, Ft as OpenDocsProviderId, G as DocsFeedbackValue, Gt as ResolvedDocsRelatedLink, H as DocsCodeBlocksValidationPolicy, Ht as PageSidebarFrontmatter, I as DocsCodeBlocksPlannerConfig, It as OpenDocsTarget, J as DocsMcpToolsConfig, Jt as SidebarFolderIndexBehavior, K as DocsI18nConfig, Kt as SidebarComponentProps, L as DocsCodeBlocksPlannerProvider, Lt as OpenGraphImage, M as DocsCloudFeatureConfig, Mt as OpenDocsConfig, N as DocsCloudPreviewConfig, Nt as OpenDocsProvider, O as DocsAskAIFeedbackValue, Ot as LlmsTxtMaxCharsMode, P as DocsCloudPublishConfig, Pt as OpenDocsProviderConfig, Q as DocsObservabilityEvent, Qt as SidebarTree, R as DocsCodeBlocksRunnerConfig, Rt as OrderingItem, S as DocsAnalyticsSource, St as FeedbackConfig, T as DocsAskAIFeedbackConfig, Tt as LastUpdatedConfig, U as DocsConfig, Ut as PageTwitter, V as DocsCodeBlocksValidationMode, Vt as PageOpenGraph, W as DocsFeedbackData, Wt as ReadingTimeConfig, X as DocsNav, Xt as SidebarNode, Y as DocsMetadata, Yt as SidebarFolderNode, Z as DocsObservabilityConfig, Zt as SidebarPageNode, _ as DocsAnalyticsConfig, _t as DocsSearchResult, a as ApiReferenceRenderer, at as DocsReviewScoreConfig, b as DocsAnalyticsEventType, bt as DocsSitemapConfig, c as ChangelogFrontmatter, ct as DocsRobotsRule, d as CustomDocsSearchConfig, dt as DocsSearchAdapterFactory, en as ThemeToggleConfig, et as DocsRelatedItem, f as DocsAgentFeedbackContext, ft as DocsSearchChunkingConfig, g as DocsAgentTraceStatus, gt as DocsSearchQuery, h as DocsAgentTraceEventType, ht as DocsSearchEmbeddingsConfig, i as ApiReferenceConfig, it as DocsReviewRulesConfig, j as DocsCloudConfig, jt as OGConfig, k as DocsAskAIMcpConfig, kt as LlmsTxtSectionConfig, l as CodeBlockCopyData, lt as DocsSearchAdapter, m as DocsAgentTraceEventInput, mt as DocsSearchDocument, n as AgentFeedbackConfig, nn as TypographyConfig, nt as DocsReviewCiMode, o as BreadcrumbConfig, ot as DocsReviewSeverity, p as DocsAgentFeedbackData, pt as DocsSearchConfig, q as DocsMcpConfig, qt as SidebarConfig, r as AlgoliaDocsSearchConfig, rn as UIConfig, rt as DocsReviewConfig, s as ChangelogConfig, st as DocsRobotsConfig, t as AIConfig, tn as TypesenseDocsSearchConfig, tt as DocsReviewCiConfig, u as CopyMarkdownConfig, ut as DocsSearchAdapterContext, v as DocsAnalyticsEvent, vt as DocsSearchResultType, w as DocsAskAIActionType, wt as GithubConfig, x as DocsAnalyticsInput, xt as DocsTheme, y as DocsAnalyticsEventInput, yt as DocsSearchSourcePage, z as DocsCodeBlocksRunnerProvider, zt as PageActionsConfig } from "./types-DK56Wlul.mjs";
2
+ import { $ as createDocsAgentTraceId, A as resolveDocsSitemapRequest, C as buildDocsSitemapManifest, D as renderDocsSitemapXml, E as renderDocsSitemapMarkdown, I as PromptAction, J as DOCS_AGENT_TRACE_EVENT_TYPES, L as PromptProviderChoice, O as resolveDocsSitemapConfig, Q as createDocsAgentTraceContext, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, X as ResolvedDocsAnalyticsConfig, Y as DocsAgentTraceContext, Z as ResolvedDocsObservabilityConfig, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, at as DocsCloudAnalyticsOptions, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAgentTraceEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, it as resolveDocsObservabilityConfig, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, nt as emitDocsObservabilityEvent, o as createSimpleSearchAdapter, ot as createDocsCloudAnalytics, p as DEFAULT_SITEMAP_MANIFEST_PATH, r as createAlgoliaSearchAdapter, rt as resolveDocsAnalyticsConfig, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsAnalyticsEvent, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider } from "./search-Dpkyz-z9.mjs";
3
3
  import { DocsMcpPage, DocsMcpResolvedConfig } from "./mcp.mjs";
4
4
 
5
5
  //#region src/define-docs.d.ts
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { _ as extendTheme, a as resolveReadingTimeOptions, b as defineDocs, c as
2
2
  import { A as resolveDocsAnalyticsConfig, C as resolveSidebarFolderIndexBehaviorForPath, D as emitDocsAgentTraceEvent, E as createDocsAgentTraceId, M as createDocsCloudAnalytics, O as emitDocsAnalyticsEvent, S as resolveSidebarFolderIndexBehavior, T as createDocsAgentTraceContext, _ as parseGeneratedAgentDocument, a as createMcpSearchAdapter, b as applySidebarFolderIndexBehavior, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, g as normalizeGeneratedAgentContent, h as hashGeneratedAgentContent, i as createCustomSearchAdapter, j as resolveDocsObservabilityConfig, k as emitDocsObservabilityEvent, l as inferDocsAskAIPackageHints, m as GENERATED_AGENT_PROVENANCE_VERSION, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, p as GENERATED_AGENT_PROVENANCE_MARKER, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, v as serializeGeneratedAgentDocument, w as DOCS_AGENT_TRACE_EVENT_TYPES, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance } from "./search-BL7o2rXk.mjs";
3
3
  import { n as renderDocsRelatedMarkdownLines, t as normalizeDocsRelated } from "./related-BNj_NdHq.mjs";
4
4
  import { a as DEFAULT_SITEMAP_XML_ROUTE, c as readDocsSitemapManifestFromContentMap, d as resolveDocsSitemapConfig, f as resolveDocsSitemapPageLastmod, i as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, l as renderDocsSitemapMarkdown, m as toDocsSitemapMarkdownUrl, n as DEFAULT_SITEMAP_MD_DOCS_ROUTE, o as buildDocsSitemapManifest, p as resolveDocsSitemapRequest, r as DEFAULT_SITEMAP_MD_ROUTE, s as createDocsSitemapResponse, t as DEFAULT_SITEMAP_MANIFEST_PATH, u as renderDocsSitemapXml } from "./sitemap-CMNj0Pt3.mjs";
5
- import { $ as resolveDocsAgentsFormat, A as findDocsMarkdownPage, B as isDocsSkillRequest, C as DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, D as buildDocsAgentFeedbackSchema, E as buildDocsAgentDiscoverySpec, F as isDocsAgentDiscoveryRequest, G as renderDocsAgentsDocument, H as normalizeDocsPathSegment, I as isDocsAgentsRequest, J as renderDocsMarkdownNotFound, K as renderDocsLlmsTxt, L as isDocsLlmsTxtPublicRequest, M as getDocsMarkdownCanonicalLinkHeader, N as getDocsMarkdownVaryHeader, O as buildDocsMcpEndpointCandidates, P as hasDocsMarkdownSignatureAgent, Q as resolveDocsAgentMdxContent, R as isDocsMcpRequest, S as DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, T as DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, U as normalizeDocsUrlPath, V as matchesDocsLlmsTxtSection, W as parseDocsAgentFeedbackData, X as resolveDocsAgentFeedbackConfig, Y as renderDocsSkillDocument, Z as resolveDocsAgentFeedbackRequest, _ as DEFAULT_MCP_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, at as resolveDocsMarkdownRequest, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, ct as selectDocsLlmsTxtContent, d as DEFAULT_LLMS_FULL_TXT_ROUTE, et as resolveDocsLlmsTxtFormat, f as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, h as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, it as resolveDocsMarkdownRecovery, j as getDocsLlmsTxtMaxCharsIssue, k as detectDocsMarkdownAgentRequest, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as toDocsMarkdownUrl, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, nt as resolveDocsLlmsTxtSections, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as resolveDocsOpenApiDiscoveryConfig, p as DEFAULT_LLMS_TXT_MAX_CHARS, q as renderDocsMarkdownDocument, r as DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, rt as resolveDocsMarkdownCanonicalUrl, s as DEFAULT_AGENT_SPEC_ROUTE, st as resolveDocsSkillFormat, t as DEFAULT_AGENTS_MD_ROUTE, tt as resolveDocsLlmsTxtRequest, u as DEFAULT_DOCS_API_ROUTE, ut as validateDocsAgentFeedbackPayload, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, w as DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, y as DEFAULT_OPENAPI_SCHEMA_ROUTE, z as isDocsPublicGetRequest } from "./agent-xmep0HVx.mjs";
6
- import { a as analyzeDocsRobotsTxt, c as renderDocsRobotsGeneratedBlock, d as resolveDocsRobotsRequest, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, l as renderDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, o as createDocsRobotsResponse, r as DOCS_ROBOTS_GENERATED_BLOCK_END, s as getDocsRobotsAllowRoutes, t as DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, u as resolveDocsRobotsConfig } from "./robots-B-1XRFFz.mjs";
5
+ import { $ as resolveDocsAgentsFormat, A as findDocsMarkdownPage, B as isDocsSkillRequest, C as DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, D as buildDocsAgentFeedbackSchema, E as buildDocsAgentDiscoverySpec, F as isDocsAgentDiscoveryRequest, G as renderDocsAgentsDocument, H as normalizeDocsPathSegment, I as isDocsAgentsRequest, J as renderDocsMarkdownNotFound, K as renderDocsLlmsTxt, L as isDocsLlmsTxtPublicRequest, M as getDocsMarkdownCanonicalLinkHeader, N as getDocsMarkdownVaryHeader, O as buildDocsMcpEndpointCandidates, P as hasDocsMarkdownSignatureAgent, Q as resolveDocsAgentMdxContent, R as isDocsMcpRequest, S as DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, T as DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, U as normalizeDocsUrlPath, V as matchesDocsLlmsTxtSection, W as parseDocsAgentFeedbackData, X as resolveDocsAgentFeedbackConfig, Y as renderDocsSkillDocument, Z as resolveDocsAgentFeedbackRequest, _ as DEFAULT_MCP_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, at as resolveDocsMarkdownRequest, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, ct as selectDocsLlmsTxtContent, d as DEFAULT_LLMS_FULL_TXT_ROUTE, et as resolveDocsLlmsTxtFormat, f as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, h as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, it as resolveDocsMarkdownRecovery, j as getDocsLlmsTxtMaxCharsIssue, k as detectDocsMarkdownAgentRequest, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as toDocsMarkdownUrl, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, nt as resolveDocsLlmsTxtSections, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as resolveDocsOpenApiDiscoveryConfig, p as DEFAULT_LLMS_TXT_MAX_CHARS, q as renderDocsMarkdownDocument, r as DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, rt as resolveDocsMarkdownCanonicalUrl, s as DEFAULT_AGENT_SPEC_ROUTE, st as resolveDocsSkillFormat, t as DEFAULT_AGENTS_MD_ROUTE, tt as resolveDocsLlmsTxtRequest, u as DEFAULT_DOCS_API_ROUTE, ut as validateDocsAgentFeedbackPayload, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, w as DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, y as DEFAULT_OPENAPI_SCHEMA_ROUTE, z as isDocsPublicGetRequest } from "./agent-B7T4gauS.mjs";
6
+ import { a as analyzeDocsRobotsTxt, c as renderDocsRobotsGeneratedBlock, d as resolveDocsRobotsRequest, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, l as renderDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, o as createDocsRobotsResponse, r as DOCS_ROBOTS_GENERATED_BLOCK_END, s as getDocsRobotsAllowRoutes, t as DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, u as resolveDocsRobotsConfig } from "./robots-CDdD2o-Q.mjs";
7
7
 
8
8
  export { DEFAULT_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, detectDocsMarkdownAgentRequest, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRecovery, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
package/dist/mcp.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Rt as OrderingItem, Z as DocsObservabilityConfig, _ as DocsAnalyticsConfig, pt as DocsSearchConfig, q as DocsMcpConfig, yt as DocsSearchSourcePage } from "./types-C-C-9SMJ.mjs";
1
+ import { Rt as OrderingItem, Z as DocsObservabilityConfig, _ as DocsAnalyticsConfig, pt as DocsSearchConfig, q as DocsMcpConfig, yt as DocsSearchSourcePage } from "./types-DK56Wlul.mjs";
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
 
4
4
  //#region src/mcp.d.ts
package/dist/mcp.mjs CHANGED
@@ -253,11 +253,11 @@ const DOCS_CONFIG_SCHEMA_OPTIONS = [
253
253
  description: "Environment variable that stores the Docs Cloud API key. The key value is never written to docs.json."
254
254
  },
255
255
  {
256
- path: "cloud.preview.enabled",
256
+ path: "cloud.deploy.enabled",
257
257
  name: "enabled",
258
258
  type: "boolean",
259
259
  default: true,
260
- description: "Request hosted preview deployments when running docs preview."
260
+ description: "Enable the docs deploy command for hosted preview docs."
261
261
  },
262
262
  {
263
263
  path: "cloud.publish.mode",
@@ -1,5 +1,5 @@
1
1
  import { d as resolveDocsSitemapConfig } from "./sitemap-CMNj0Pt3.mjs";
2
- import { H as normalizeDocsPathSegment, a as DEFAULT_AGENT_MD_ROUTE, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, d as DEFAULT_LLMS_FULL_TXT_ROUTE, f as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, h as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE } from "./agent-xmep0HVx.mjs";
2
+ import { H as normalizeDocsPathSegment, a as DEFAULT_AGENT_MD_ROUTE, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, d as DEFAULT_LLMS_FULL_TXT_ROUTE, f as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, h as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE } from "./agent-B7T4gauS.mjs";
3
3
 
4
4
  //#region src/robots.ts
5
5
  const DEFAULT_ROBOTS_TXT_ROUTE = "/robots.txt";
@@ -1,5 +1,5 @@
1
- import "./agent-xmep0HVx.mjs";
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-B-1XRFFz.mjs";
1
+ import "./agent-B7T4gauS.mjs";
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-CDdD2o-Q.mjs";
3
3
  import { f as readTopLevelStringProperty, i as loadDocsConfigModule, o as readBooleanProperty, p as resolveDocsConfigPath, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-CBoixmrv.mjs";
4
4
  import { t as detectFramework } from "./utils-x5EtYWjC.mjs";
5
5
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
@@ -1,4 +1,4 @@
1
- import { $ as DocsObservabilityEventInput, At as McpDocsSearchConfig, Gt as ResolvedDocsRelatedLink, It as OpenDocsTarget, Nt as OpenDocsProvider, Q as DocsObservabilityEvent, Z as DocsObservabilityConfig, _ as DocsAnalyticsConfig, _t as DocsSearchResult, bt as DocsSitemapConfig, d as CustomDocsSearchConfig, dt as DocsSearchAdapterFactory, ft as DocsSearchChunkingConfig, k as DocsAskAIMcpConfig, lt as DocsSearchAdapter, m as DocsAgentTraceEventInput, mt as DocsSearchDocument, pt as DocsSearchConfig, r as AlgoliaDocsSearchConfig, tn as TypesenseDocsSearchConfig, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, yt as DocsSearchSourcePage } from "./types-C-C-9SMJ.mjs";
1
+ import { $ as DocsObservabilityEventInput, At as McpDocsSearchConfig, Gt as ResolvedDocsRelatedLink, It as OpenDocsTarget, Nt as OpenDocsProvider, Q as DocsObservabilityEvent, Z as DocsObservabilityConfig, _ as DocsAnalyticsConfig, _t as DocsSearchResult, bt as DocsSitemapConfig, d as CustomDocsSearchConfig, dt as DocsSearchAdapterFactory, ft as DocsSearchChunkingConfig, k as DocsAskAIMcpConfig, lt as DocsSearchAdapter, m as DocsAgentTraceEventInput, mt as DocsSearchDocument, pt as DocsSearchConfig, r as AlgoliaDocsSearchConfig, tn as TypesenseDocsSearchConfig, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, yt as DocsSearchSourcePage } from "./types-DK56Wlul.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 { $ as DocsObservabilityEventInput, At as McpDocsSearchConfig, D as DocsAskAIFeedbackMessage, E as DocsAskAIFeedbackData, O as DocsAskAIFeedbackValue, Q as DocsObservabilityEvent, T as DocsAskAIFeedbackConfig, U as DocsConfig, Z as DocsObservabilityConfig, _ as DocsAnalyticsConfig, _t as DocsSearchResult, a as ApiReferenceRenderer, bt as DocsSitemapConfig, dt as DocsSearchAdapterFactory, g as DocsAgentTraceStatus, gt as DocsSearchQuery, h as DocsAgentTraceEventType, it as DocsReviewRulesConfig, k as DocsAskAIMcpConfig, lt as DocsSearchAdapter, m as DocsAgentTraceEventInput, mt as DocsSearchDocument, nt as DocsReviewCiMode, pt as DocsSearchConfig, rt as DocsReviewConfig, ut as DocsSearchAdapterContext, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, yt as DocsSearchSourcePage } from "./types-C-C-9SMJ.mjs";
2
- import { $ as createDocsAgentTraceId, A as resolveDocsSitemapRequest, B as normalizePromptProviderName, C as buildDocsSitemapManifest, D as renderDocsSitemapXml, E as renderDocsSitemapMarkdown, F as DEFAULT_PROMPT_PROVIDER_TEMPLATES, G as serializeDocsIconRegistry, H as resolvePromptProviderChoices, I as PromptAction, J as DOCS_AGENT_TRACE_EVENT_TYPES, K as serializeOpenDocsProvider, L as PromptProviderChoice, M as DEFAULT_OPEN_DOCS_PROMPT, N as DEFAULT_OPEN_DOCS_PROVIDER_IDS, O as resolveDocsSitemapConfig, P as DEFAULT_OPEN_DOCS_TARGET, Q as createDocsAgentTraceContext, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, U as sanitizePromptText, V as parsePromptStringArray, W as serializeDocsIcon, X as ResolvedDocsAnalyticsConfig, Y as DocsAgentTraceContext, Z as ResolvedDocsObservabilityConfig, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, at as DocsCloudAnalyticsOptions, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAgentTraceEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, it as resolveDocsObservabilityConfig, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, nt as emitDocsObservabilityEvent, o as createSimpleSearchAdapter, ot as createDocsCloudAnalytics, p as DEFAULT_SITEMAP_MANIFEST_PATH, q as serializeOpenDocsProviders, r as createAlgoliaSearchAdapter, rt as resolveDocsAnalyticsConfig, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsAnalyticsEvent, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider } from "./search-CNoiftmI.mjs";
1
+ import { $ as DocsObservabilityEventInput, At as McpDocsSearchConfig, D as DocsAskAIFeedbackMessage, E as DocsAskAIFeedbackData, O as DocsAskAIFeedbackValue, Q as DocsObservabilityEvent, T as DocsAskAIFeedbackConfig, U as DocsConfig, Z as DocsObservabilityConfig, _ as DocsAnalyticsConfig, _t as DocsSearchResult, a as ApiReferenceRenderer, bt as DocsSitemapConfig, dt as DocsSearchAdapterFactory, g as DocsAgentTraceStatus, gt as DocsSearchQuery, h as DocsAgentTraceEventType, it as DocsReviewRulesConfig, k as DocsAskAIMcpConfig, lt as DocsSearchAdapter, m as DocsAgentTraceEventInput, mt as DocsSearchDocument, nt as DocsReviewCiMode, pt as DocsSearchConfig, rt as DocsReviewConfig, ut as DocsSearchAdapterContext, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, yt as DocsSearchSourcePage } from "./types-DK56Wlul.mjs";
2
+ import { $ as createDocsAgentTraceId, A as resolveDocsSitemapRequest, B as normalizePromptProviderName, C as buildDocsSitemapManifest, D as renderDocsSitemapXml, E as renderDocsSitemapMarkdown, F as DEFAULT_PROMPT_PROVIDER_TEMPLATES, G as serializeDocsIconRegistry, H as resolvePromptProviderChoices, I as PromptAction, J as DOCS_AGENT_TRACE_EVENT_TYPES, K as serializeOpenDocsProvider, L as PromptProviderChoice, M as DEFAULT_OPEN_DOCS_PROMPT, N as DEFAULT_OPEN_DOCS_PROVIDER_IDS, O as resolveDocsSitemapConfig, P as DEFAULT_OPEN_DOCS_TARGET, Q as createDocsAgentTraceContext, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, U as sanitizePromptText, V as parsePromptStringArray, W as serializeDocsIcon, X as ResolvedDocsAnalyticsConfig, Y as DocsAgentTraceContext, Z as ResolvedDocsObservabilityConfig, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, at as DocsCloudAnalyticsOptions, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAgentTraceEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, it as resolveDocsObservabilityConfig, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, nt as emitDocsObservabilityEvent, o as createSimpleSearchAdapter, ot as createDocsCloudAnalytics, p as DEFAULT_SITEMAP_MANIFEST_PATH, q as serializeOpenDocsProviders, r as createAlgoliaSearchAdapter, rt as resolveDocsAnalyticsConfig, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsAnalyticsEvent, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider } from "./search-Dpkyz-z9.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/code-group-mdx.d.ts
@@ -765,7 +765,13 @@ interface DocsCloudApiKeyConfig {
765
765
  env?: string;
766
766
  }
767
767
  interface DocsCloudPreviewConfig {
768
- /** Whether Docs Cloud should request live preview deployments. @default true */
768
+ /**
769
+ * Legacy hosted preview deployment gate.
770
+ *
771
+ * Prefer `cloud.deploy.enabled` in new configs.
772
+ *
773
+ * @default true when this legacy object is provided
774
+ */
769
775
  enabled?: boolean;
770
776
  }
771
777
  interface DocsCloudPublishConfig {
@@ -787,9 +793,9 @@ interface DocsCloudConfig {
787
793
  * compatibility with older docs.json files.
788
794
  */
789
795
  enabled?: boolean;
790
- /** API key lookup used by `docs preview` and other cloud CLI commands. */
796
+ /** API key lookup used by `docs deploy` and other cloud CLI commands. */
791
797
  apiKey?: DocsCloudApiKeyConfig;
792
- /** Hosted preview deployment settings. */
798
+ /** Legacy hosted preview deployment settings. Prefer `deploy` in new configs. */
793
799
  preview?: DocsCloudPreviewConfig;
794
800
  /** Generated docs publishing settings. */
795
801
  publish?: DocsCloudPublishConfig;
@@ -797,7 +803,7 @@ interface DocsCloudConfig {
797
803
  analytics?: boolean | Omit<DocsAnalyticsConfig, "onEvent">;
798
804
  /** Hosted AI feature toggle. */
799
805
  ai?: DocsCloudFeatureConfig;
800
- /** Hosted deployment feature toggle. */
806
+ /** Hosted deployment feature toggle used by `docs deploy`. */
801
807
  deploy?: DocsCloudFeatureConfig;
802
808
  }
803
809
  interface DocsObservabilityConfig {
@@ -2337,7 +2343,7 @@ interface DocsConfig {
2337
2343
  /**
2338
2344
  * Docs Cloud integration settings.
2339
2345
  *
2340
- * Use this to configure the API key env var and cloud preview defaults once
2346
+ * Use this to configure the API key env var and cloud deploy defaults once
2341
2347
  * in `docs.config.ts`; cloud CLI commands mirror the serializable subset into
2342
2348
  * `docs.json` automatically.
2343
2349
  *
@@ -2345,7 +2351,7 @@ interface DocsConfig {
2345
2351
  * ```ts
2346
2352
  * cloud: {
2347
2353
  * apiKey: { env: "DOCS_CLOUD_API_KEY" },
2348
- * preview: { enabled: true },
2354
+ * deploy: { enabled: true },
2349
2355
  * publish: { mode: "draft-pr", baseBranch: "main" },
2350
2356
  * }
2351
2357
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.1.132",
3
+ "version": "0.1.134",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "keywords": [
6
6
  "docs",