@farming-labs/docs 0.2.64 → 0.2.66

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 (40) hide show
  1. package/dist/{agent-CQTH7NFu.mjs → agent-B81ztzxZ.mjs} +2 -2
  2. package/dist/{agent-DKKptIgy.mjs → agent-CcR8_Yyd.mjs} +1 -1
  3. package/dist/{agent-evals-B7MIxuEX.mjs → agent-evals-Bn_dA1_A.mjs} +1 -1
  4. package/dist/{agent-export-CBgWgPvH.mjs → agent-export-CyhCaE8J.mjs} +7 -7
  5. package/dist/agent-skills-bundle.d.mts +1 -1
  6. package/dist/{agent-skills-server-CPja6Syt.d.mts → agent-skills-server-CHvqnM4R.d.mts} +2 -2
  7. package/dist/{agent-skills-server-DraIb6FV.mjs → agent-skills-server-Cuoqu8Jv.mjs} +1 -1
  8. package/dist/agent-skills-vite.d.mts +3 -3
  9. package/dist/agent-skills-vite.mjs +2 -2
  10. package/dist/{agents-XWZBub6f.mjs → agents-BZ_hXI_Z.mjs} +6 -6
  11. package/dist/cli/index.mjs +16 -16
  12. package/dist/client/react.d.mts +1 -1
  13. package/dist/{cloud-ask-ai-zpwkdwnF.d.mts → cloud-ask-ai-BD1SeVZv.d.mts} +1 -1
  14. package/dist/{dev-Cmy6DtdF.mjs → dev-Cc1cFFj-.mjs} +2 -2
  15. package/dist/docs-cloud-server.d.mts +2 -2
  16. package/dist/{doctor-DtGYZ41i.mjs → doctor-BJt0ZFkJ.mjs} +11 -11
  17. package/dist/{golden-evaluations-Dj-9Eo3v.mjs → golden-evaluations-D7lSUeQl.mjs} +1 -1
  18. package/dist/index.d.mts +4 -4
  19. package/dist/index.mjs +7 -7
  20. package/dist/{init-CQY0Woe3.mjs → init-DAkI0Lkf.mjs} +1 -1
  21. package/dist/{mcp-B9dcsivk.mjs → mcp-jGoU4pLD.mjs} +6 -6
  22. package/dist/mcp.d.mts +2 -2
  23. package/dist/mcp.mjs +314 -14
  24. package/dist/{metadata-DWExHQnx.mjs → metadata-Cna0CtWZ.mjs} +1 -1
  25. package/dist/{reading-time-CYZ5VvKU.mjs → reading-time-oAnc4Brq.mjs} +3 -3
  26. package/dist/{review-CLoHTywU.mjs → review-CUo6iXMw.mjs} +6 -6
  27. package/dist/{robots-CUTahhoY.mjs → robots-NL_OsxEC.mjs} +3 -3
  28. package/dist/{robots-BIpC4j4P.mjs → robots-vU80KRFy.mjs} +2 -2
  29. package/dist/{search-CaSyi6H6.d.mts → search-B-BfnROL.d.mts} +2 -2
  30. package/dist/{search-DSjCeOk7.mjs → search-B_CixCu9.mjs} +6 -6
  31. package/dist/{search-B6V6qtiI.mjs → search-D0A9lRGJ.mjs} +1 -1
  32. package/dist/server.d.mts +4 -4
  33. package/dist/server.mjs +6 -6
  34. package/dist/{sitemap-Cykpe3Tz.mjs → sitemap-B4mIK0ka.mjs} +6 -6
  35. package/dist/{sitemap-server-C_6Wes83.mjs → sitemap-server-atbbiVzW.mjs} +1 -1
  36. package/dist/{standards-discovery-jkykaXq1.mjs → standards-discovery-C7p5lBhc.mjs} +314 -37
  37. package/dist/{standards-discovery-C4HUqMd2.d.mts → standards-discovery-iOmUel-o.d.mts} +21 -38
  38. package/dist/{templates-Bq_P7ctv.mjs → templates-C6avM0U3.mjs} +92 -26
  39. package/dist/{types-lMBIdZg0.d.mts → types-BQC05SQm.d.mts} +203 -9
  40. package/package.json +1 -1
@@ -831,6 +831,13 @@ export const Route = createFileRoute("${entryUrl}/$")({
831
831
  }
832
832
  return undefined;
833
833
  },
834
+ HEAD: async ({ request }) => {
835
+ const url = new URL(request.url);
836
+ if (isDocsPublicGetRequest(${JSON.stringify(opts.entry)}, url, request, { sitemap: docsConfig.sitemap, llms: docsConfig.llmsTxt, robots: docsConfig.robots })) {
837
+ return docsServer.HEAD({ request });
838
+ }
839
+ return undefined;
840
+ },
834
841
  },
835
842
  },
836
843
  loader: async ({ location }) => {
@@ -871,13 +878,28 @@ function DocsCatchAllPage() {
871
878
  function tanstackApiDocsRouteTemplate(useAlias, filePath) {
872
879
  return `\
873
880
  import { createFileRoute } from "@tanstack/react-router";
881
+ import { isDocsStandardsDiscoveryRequest } from "@farming-labs/docs";
874
882
  import { docsServer } from "${useAlias ? "@/lib/docs.server" : relativeImport(filePath, "src/lib/docs.server.ts")}";
883
+ import docsConfig from "${tanstackDocsConfigImport(filePath)}";
884
+
885
+ async function handleUnsupportedDocsMethod(request: Request) {
886
+ const url = new URL(request.url);
887
+ if (isDocsStandardsDiscoveryRequest(url, { apiRoute: docsConfig.cloud?.apiRoute })) {
888
+ return docsServer.GET({ request });
889
+ }
890
+ return new Response("Method Not Allowed", {
891
+ status: 405,
892
+ headers: { Allow: "GET, HEAD, POST" },
893
+ });
894
+ }
875
895
 
876
896
  export const Route = createFileRoute("/api/docs")({
877
897
  server: {
878
898
  handlers: {
879
899
  GET: async ({ request }) => docsServer.GET({ request }),
900
+ HEAD: async ({ request }) => docsServer.HEAD({ request }),
880
901
  POST: async ({ request }) => docsServer.POST({ request }),
902
+ ANY: async ({ request }) => handleUnsupportedDocsMethod(request),
881
903
  },
882
904
  },
883
905
  });
@@ -886,7 +908,7 @@ export const Route = createFileRoute("/api/docs")({
886
908
  function tanstackDocsPublicRouteTemplate(useAlias, filePath, entry) {
887
909
  return `\
888
910
  import { createFileRoute } from "@tanstack/react-router";
889
- import { isDocsMcpRequest, isDocsPublicGetRequest } from "@farming-labs/docs";
911
+ import { isDocsMcpRequest, isDocsPublicGetRequest, isDocsStandardsDiscoveryRequest } from "@farming-labs/docs";
890
912
  import { docsServer } from "${useAlias ? "@/lib/docs.server" : relativeImport(filePath, "src/lib/docs.server.ts")}";
891
913
  import docsConfig from "${tanstackDocsConfigImport(filePath)}";
892
914
 
@@ -907,10 +929,16 @@ async function handlePublicDocsRequest(request: Request) {
907
929
  });
908
930
  }
909
931
 
910
- if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, url, request, { sitemap: docsConfig.sitemap, llms: docsConfig.llmsTxt, robots: docsConfig.robots })) {
932
+ if (isDocsStandardsDiscoveryRequest(url, { apiRoute: docsConfig.cloud?.apiRoute })) {
933
+ if (method === "HEAD") return docsServer.HEAD({ request });
934
+ if (method === "POST") return docsServer.POST({ request });
911
935
  return docsServer.GET({ request });
912
936
  }
913
937
 
938
+ if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, url, request, { apiRoute: docsConfig.cloud?.apiRoute, sitemap: docsConfig.sitemap, llms: docsConfig.llmsTxt, robots: docsConfig.robots })) {
939
+ return method === "HEAD" ? docsServer.HEAD({ request }) : docsServer.GET({ request });
940
+ }
941
+
914
942
  return new Response("Not Found", { status: 404 });
915
943
  }
916
944
 
@@ -918,9 +946,11 @@ export const Route = createFileRoute("/$")({
918
946
  server: {
919
947
  handlers: {
920
948
  GET: async ({ request }) => handlePublicDocsRequest(request),
949
+ HEAD: async ({ request }) => handlePublicDocsRequest(request),
921
950
  POST: async ({ request }) => handlePublicDocsRequest(request),
922
951
  DELETE: async ({ request }) => handlePublicDocsRequest(request),
923
952
  OPTIONS: async ({ request }) => handlePublicDocsRequest(request),
953
+ ANY: async ({ request }) => handlePublicDocsRequest(request),
924
954
  },
925
955
  },
926
956
  });
@@ -1288,7 +1318,7 @@ const contentFiles = import.meta.glob(["/${cfg.entry ?? "docs"}/**/*.{md,mdx,svx
1288
1318
  eager: true,
1289
1319
  }) as Record<string, string>;
1290
1320
 
1291
- export const { load, GET, POST, MCP } = createDocsServer({
1321
+ export const { load, GET, HEAD, POST, MCP } = createDocsServer({
1292
1322
  ...config,
1293
1323
  _preloadedContent: contentFiles,
1294
1324
  _preloadedAgentSkills: bundledAgentSkills,
@@ -1336,16 +1366,16 @@ export const GET = createSvelteApiReference(config);
1336
1366
  }
1337
1367
  function svelteDocsApiRouteTemplate(filePath, useAlias) {
1338
1368
  return `\
1339
- export { GET, POST } from "${svelteRouteServerImport(filePath, useAlias)}";
1369
+ export { GET, HEAD, POST } from "${svelteRouteServerImport(filePath, useAlias)}";
1340
1370
  `;
1341
1371
  }
1342
1372
  function svelteDocsPublicHookTemplate(filePath, useAlias) {
1343
1373
  const serverImport = svelteRouteServerImport(filePath, useAlias);
1344
1374
  return `\
1345
- import { isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest } from "@farming-labs/docs";
1375
+ import { isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsStandardsDiscoveryRequest } from "@farming-labs/docs";
1346
1376
  import type { Handle } from "@sveltejs/kit";
1347
1377
  import config from "${svelteRouteConfigImport(filePath, useAlias)}";
1348
- import { GET, MCP } from "${serverImport}";
1378
+ import { GET, HEAD, POST, MCP } from "${serverImport}";
1349
1379
 
1350
1380
  const docsEntry = config.entry ?? "docs";
1351
1381
 
@@ -1363,13 +1393,21 @@ export const handle: Handle = async ({ event, resolve }) => {
1363
1393
  });
1364
1394
  }
1365
1395
 
1366
- if ((method === "GET" || method === "HEAD") && isDocsLlmsTxtPublicRequest(event.url, config.llmsTxt, docsEntry)) {
1396
+ if (isDocsStandardsDiscoveryRequest(event.url, { apiRoute: config.cloud?.apiRoute })) {
1397
+ if (method === "HEAD") return HEAD({ url: event.url, request: event.request });
1398
+ if (method === "POST") return POST({ url: event.url, request: event.request });
1399
+ return GET({ url: event.url, request: event.request });
1400
+ }
1401
+
1402
+ if ((method === "GET" || method === "HEAD") && isDocsLlmsTxtPublicRequest(event.url, config.llmsTxt, docsEntry, { apiRoute: config.cloud?.apiRoute })) {
1367
1403
  const nativeResponse = await resolve(event);
1368
1404
  if (nativeResponse.status !== 404) return nativeResponse;
1369
1405
  }
1370
1406
 
1371
- if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, event.url, event.request, { sitemap: config.sitemap, llms: config.llmsTxt, robots: config.robots })) {
1372
- return GET({ url: event.url, request: event.request });
1407
+ if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, event.url, event.request, { apiRoute: config.cloud?.apiRoute, sitemap: config.sitemap, llms: config.llmsTxt, robots: config.robots })) {
1408
+ return method === "HEAD"
1409
+ ? HEAD({ url: event.url, request: event.request })
1410
+ : GET({ url: event.url, request: event.request });
1373
1411
  }
1374
1412
 
1375
1413
  return resolve(event);
@@ -1394,11 +1432,11 @@ function injectSvelteDocsPublicHook(content, filePath, useAlias) {
1394
1432
  break;
1395
1433
  }
1396
1434
  const imports = [
1397
- "import { isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest } from \"@farming-labs/docs\";",
1435
+ "import { isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsStandardsDiscoveryRequest } from \"@farming-labs/docs\";",
1398
1436
  ...next.includes("Handle") ? [] : ["import type { Handle } from \"@sveltejs/kit\";"],
1399
1437
  ...hasExistingHandle && !next.includes("sequence") ? ["import { sequence } from \"@sveltejs/kit/hooks\";"] : [],
1400
1438
  `import docsConfig from "${configImport}";`,
1401
- `import { GET as docsGET, MCP as docsMCP } from "${serverImport}";`
1439
+ `import { GET as docsGET, HEAD as docsHEAD, POST as docsPOST, MCP as docsMCP } from "${serverImport}";`
1402
1440
  ];
1403
1441
  const docsHandle = `\
1404
1442
  const docsEntry = docsConfig.entry ?? "docs";
@@ -1417,13 +1455,21 @@ const docsPublicHandle: Handle = async ({ event, resolve }) => {
1417
1455
  });
1418
1456
  }
1419
1457
 
1420
- if ((method === "GET" || method === "HEAD") && isDocsLlmsTxtPublicRequest(event.url, docsConfig.llmsTxt, docsEntry)) {
1458
+ if (isDocsStandardsDiscoveryRequest(event.url, { apiRoute: docsConfig.cloud?.apiRoute })) {
1459
+ if (method === "HEAD") return docsHEAD({ url: event.url, request: event.request });
1460
+ if (method === "POST") return docsPOST({ url: event.url, request: event.request });
1461
+ return docsGET({ url: event.url, request: event.request });
1462
+ }
1463
+
1464
+ if ((method === "GET" || method === "HEAD") && isDocsLlmsTxtPublicRequest(event.url, docsConfig.llmsTxt, docsEntry, { apiRoute: docsConfig.cloud?.apiRoute })) {
1421
1465
  const nativeResponse = await resolve(event);
1422
1466
  if (nativeResponse.status !== 404) return nativeResponse;
1423
1467
  }
1424
1468
 
1425
- if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, event.url, event.request, { sitemap: docsConfig.sitemap, llms: docsConfig.llmsTxt, robots: docsConfig.robots })) {
1426
- return docsGET({ url: event.url, request: event.request });
1469
+ if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, event.url, event.request, { apiRoute: docsConfig.cloud?.apiRoute, sitemap: docsConfig.sitemap, llms: docsConfig.llmsTxt, robots: docsConfig.robots })) {
1470
+ return method === "HEAD"
1471
+ ? docsHEAD({ url: event.url, request: event.request })
1472
+ : docsGET({ url: event.url, request: event.request });
1427
1473
  }
1428
1474
 
1429
1475
  return resolve(event);
@@ -1706,7 +1752,7 @@ const contentFiles = import.meta.glob(["/${cfg.entry ?? "docs"}/**/*.{md,mdx}",
1706
1752
  eager: true,
1707
1753
  }) as Record<string, string>;
1708
1754
 
1709
- export const { load, GET, POST, MCP } = createDocsServer({
1755
+ export const { load, GET, HEAD, POST, MCP } = createDocsServer({
1710
1756
  ...config,
1711
1757
  _preloadedContent: contentFiles,
1712
1758
  _preloadedAgentSkills: bundledAgentSkills,
@@ -1827,12 +1873,16 @@ const data = await load(Astro.url.pathname);
1827
1873
  function astroApiRouteTemplate(cfg) {
1828
1874
  return `\
1829
1875
  import type { APIRoute } from "astro";
1830
- import { GET as docsGET, POST as docsPOST } from "${astroPageServerImport(cfg.useAlias, 2)}";
1876
+ import { GET as docsGET, HEAD as docsHEAD, POST as docsPOST } from "${astroPageServerImport(cfg.useAlias, 2)}";
1831
1877
 
1832
1878
  export const GET: APIRoute = async ({ request }) => {
1833
1879
  return docsGET({ request });
1834
1880
  };
1835
1881
 
1882
+ export const HEAD: APIRoute = async ({ request }) => {
1883
+ return docsHEAD({ request });
1884
+ };
1885
+
1836
1886
  export const POST: APIRoute = async ({ request }) => {
1837
1887
  return docsPOST({ request });
1838
1888
  };
@@ -1841,10 +1891,10 @@ export const POST: APIRoute = async ({ request }) => {
1841
1891
  function astroDocsMiddlewareTemplate(filePath, useAlias) {
1842
1892
  const serverImport = astroRouteServerImport(filePath, useAlias);
1843
1893
  return `\
1844
- import { isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest } from "@farming-labs/docs";
1894
+ import { isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsStandardsDiscoveryRequest } from "@farming-labs/docs";
1845
1895
  import type { MiddlewareHandler } from "astro";
1846
1896
  import config from "${astroRouteConfigImport(filePath, useAlias)}";
1847
- import { GET, MCP } from "${serverImport}";
1897
+ import { GET, HEAD, POST, MCP } from "${serverImport}";
1848
1898
 
1849
1899
  const docsEntry = config.entry ?? "docs";
1850
1900
 
@@ -1862,13 +1912,21 @@ export const onRequest: MiddlewareHandler = async (context, next) => {
1862
1912
  });
1863
1913
  }
1864
1914
 
1865
- if ((method === "GET" || method === "HEAD") && isDocsLlmsTxtPublicRequest(context.url, config.llmsTxt, docsEntry)) {
1915
+ if (isDocsStandardsDiscoveryRequest(context.url, { apiRoute: config.cloud?.apiRoute })) {
1916
+ if (method === "HEAD") return HEAD({ request: context.request });
1917
+ if (method === "POST") return POST({ request: context.request });
1918
+ return GET({ request: context.request });
1919
+ }
1920
+
1921
+ if ((method === "GET" || method === "HEAD") && isDocsLlmsTxtPublicRequest(context.url, config.llmsTxt, docsEntry, { apiRoute: config.cloud?.apiRoute })) {
1866
1922
  const nativeResponse = await next();
1867
1923
  if (nativeResponse.status !== 404) return nativeResponse;
1868
1924
  }
1869
1925
 
1870
- if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, context.url, context.request, { sitemap: config.sitemap, llms: config.llmsTxt, robots: config.robots })) {
1871
- return GET({ request: context.request });
1926
+ if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, context.url, context.request, { apiRoute: config.cloud?.apiRoute, sitemap: config.sitemap, llms: config.llmsTxt, robots: config.robots })) {
1927
+ return method === "HEAD"
1928
+ ? HEAD({ request: context.request })
1929
+ : GET({ request: context.request });
1872
1930
  }
1873
1931
 
1874
1932
  return next();
@@ -1893,11 +1951,11 @@ function injectAstroDocsMiddleware(content, filePath, useAlias) {
1893
1951
  break;
1894
1952
  }
1895
1953
  const imports = [
1896
- "import { isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest } from \"@farming-labs/docs\";",
1954
+ "import { isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsStandardsDiscoveryRequest } from \"@farming-labs/docs\";",
1897
1955
  ...next.includes("MiddlewareHandler") ? [] : ["import type { MiddlewareHandler } from \"astro\";"],
1898
1956
  ...hasExistingMiddleware && !next.includes("sequence") ? ["import { sequence } from \"astro:middleware\";"] : [],
1899
1957
  `import docsConfig from "${configImport}";`,
1900
- `import { GET as docsGET, MCP as docsMCP } from "${serverImport}";`
1958
+ `import { GET as docsGET, HEAD as docsHEAD, POST as docsPOST, MCP as docsMCP } from "${serverImport}";`
1901
1959
  ];
1902
1960
  const docsMiddleware = `\
1903
1961
  const docsEntry = docsConfig.entry ?? "docs";
@@ -1916,13 +1974,21 @@ const docsPublicMiddleware: MiddlewareHandler = async (context, next) => {
1916
1974
  });
1917
1975
  }
1918
1976
 
1919
- if ((method === "GET" || method === "HEAD") && isDocsLlmsTxtPublicRequest(context.url, docsConfig.llmsTxt, docsEntry)) {
1977
+ if (isDocsStandardsDiscoveryRequest(context.url, { apiRoute: docsConfig.cloud?.apiRoute })) {
1978
+ if (method === "HEAD") return docsHEAD({ request: context.request });
1979
+ if (method === "POST") return docsPOST({ request: context.request });
1980
+ return docsGET({ request: context.request });
1981
+ }
1982
+
1983
+ if ((method === "GET" || method === "HEAD") && isDocsLlmsTxtPublicRequest(context.url, docsConfig.llmsTxt, docsEntry, { apiRoute: docsConfig.cloud?.apiRoute })) {
1920
1984
  const nativeResponse = await next();
1921
1985
  if (nativeResponse.status !== 404) return nativeResponse;
1922
1986
  }
1923
1987
 
1924
- if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, context.url, context.request, { sitemap: docsConfig.sitemap, llms: docsConfig.llmsTxt, robots: docsConfig.robots })) {
1925
- return docsGET({ request: context.request });
1988
+ if ((method === "GET" || method === "HEAD") && isDocsPublicGetRequest(docsEntry, context.url, context.request, { apiRoute: docsConfig.cloud?.apiRoute, sitemap: docsConfig.sitemap, llms: docsConfig.llmsTxt, robots: docsConfig.robots })) {
1989
+ return method === "HEAD"
1990
+ ? docsHEAD({ request: context.request })
1991
+ : docsGET({ request: context.request });
1926
1992
  }
1927
1993
 
1928
1994
  return next();
@@ -2553,22 +2553,216 @@ interface DocsAgentSkillsConfig {
2553
2553
  }
2554
2554
  /** Concise array shorthand for `agent.skills.paths`. */
2555
2555
  type DocsAgentSkillsInput = string | readonly string[] | DocsAgentSkillsConfig;
2556
- /** Explicit A2A service metadata. Configure this only when the URL implements A2A. */
2557
- interface DocsAgentA2AConfig {
2558
- interfaceUrl: string;
2556
+ /** Core A2A v1 bindings plus URI-identified custom bindings. */
2557
+ type DocsAgentA2AProtocolBinding = "JSONRPC" | "GRPC" | "HTTP+JSON" | (string & {});
2558
+ /** One A2A protocol interface advertised by an Agent Card. */
2559
+ interface DocsAgentA2AInterfaceConfig {
2560
+ /** Absolute binding-appropriate URL. Core bindings require HTTPS outside loopback development. */
2561
+ url: string;
2562
+ /** A2A protocol binding implemented at this URL. @default "HTTP+JSON" */
2563
+ protocolBinding?: DocsAgentA2AProtocolBinding;
2564
+ /** A2A protocol version implemented at this URL. @default "1.0" */
2565
+ protocolVersion?: string;
2566
+ /** Optional tenant identifier clients must send when calling this interface. */
2567
+ tenant?: string;
2568
+ }
2569
+ /** A protocol extension implemented by the configured A2A service. */
2570
+ interface DocsAgentA2AExtension {
2571
+ /** Stable URI identifying the extension. */
2572
+ uri: string;
2573
+ /** How this agent implements the extension. */
2574
+ description?: string;
2575
+ /** Whether clients must understand the extension before using the agent. */
2576
+ required?: boolean;
2577
+ /** Extension-specific JSON configuration. */
2578
+ params?: Readonly<Record<string, unknown>>;
2579
+ }
2580
+ /** Optional capabilities implemented by the configured A2A service. */
2581
+ interface DocsAgentA2ACapabilities {
2582
+ streaming?: boolean;
2583
+ pushNotifications?: boolean;
2584
+ extensions?: readonly DocsAgentA2AExtension[];
2585
+ /** Requires implemented GetExtendedAgentCard plus a declared scheme and security requirement. */
2586
+ extendedAgentCard?: boolean;
2587
+ }
2588
+ /** A list of OAuth scopes associated with one named security scheme. */
2589
+ interface DocsAgentA2ASecurityScopeList {
2590
+ list: readonly string[];
2591
+ }
2592
+ /** One alternative set of security schemes required to call an A2A service or skill. */
2593
+ interface DocsAgentA2ASecurityRequirement {
2594
+ schemes: Readonly<Record<string, DocsAgentA2ASecurityScopeList>>;
2595
+ }
2596
+ interface DocsAgentA2AApiKeySecurityScheme {
2597
+ description?: string;
2598
+ location: "query" | "header" | "cookie";
2599
+ name: string;
2600
+ }
2601
+ interface DocsAgentA2AHttpAuthSecurityScheme {
2602
+ description?: string;
2603
+ scheme: string;
2604
+ bearerFormat?: string;
2605
+ }
2606
+ interface DocsAgentA2AOAuthAuthorizationCodeFlow {
2607
+ authorizationUrl: string;
2608
+ tokenUrl: string;
2609
+ refreshUrl?: string;
2610
+ scopes: Readonly<Record<string, string>>;
2611
+ pkceRequired?: boolean;
2612
+ }
2613
+ interface DocsAgentA2AOAuthClientCredentialsFlow {
2614
+ tokenUrl: string;
2615
+ refreshUrl?: string;
2616
+ scopes: Readonly<Record<string, string>>;
2617
+ }
2618
+ interface DocsAgentA2AOAuthDeviceCodeFlow {
2619
+ deviceAuthorizationUrl: string;
2620
+ tokenUrl: string;
2621
+ refreshUrl?: string;
2622
+ scopes: Readonly<Record<string, string>>;
2623
+ }
2624
+ /** @deprecated A2A v1 retains this OAuth flow for compatibility only. */
2625
+ interface DocsAgentA2AOAuthImplicitFlow {
2626
+ authorizationUrl: string;
2627
+ refreshUrl?: string;
2628
+ scopes: Readonly<Record<string, string>>;
2629
+ }
2630
+ /** @deprecated A2A v1 retains this OAuth flow for compatibility only. */
2631
+ interface DocsAgentA2AOAuthPasswordFlow {
2632
+ tokenUrl: string;
2633
+ refreshUrl?: string;
2634
+ scopes: Readonly<Record<string, string>>;
2635
+ }
2636
+ /** A2A v1 OAuth flow union. Exactly one flow is allowed by the protocol. */
2637
+ type DocsAgentA2AOAuthFlows = {
2638
+ authorizationCode: DocsAgentA2AOAuthAuthorizationCodeFlow;
2639
+ clientCredentials?: never;
2640
+ deviceCode?: never;
2641
+ implicit?: never;
2642
+ password?: never;
2643
+ } | {
2644
+ authorizationCode?: never;
2645
+ clientCredentials: DocsAgentA2AOAuthClientCredentialsFlow;
2646
+ deviceCode?: never;
2647
+ implicit?: never;
2648
+ password?: never;
2649
+ } | {
2650
+ authorizationCode?: never;
2651
+ clientCredentials?: never;
2652
+ deviceCode: DocsAgentA2AOAuthDeviceCodeFlow;
2653
+ implicit?: never;
2654
+ password?: never;
2655
+ } | {
2656
+ authorizationCode?: never;
2657
+ clientCredentials?: never;
2658
+ deviceCode?: never;
2659
+ implicit: DocsAgentA2AOAuthImplicitFlow;
2660
+ password?: never;
2661
+ } | {
2662
+ authorizationCode?: never;
2663
+ clientCredentials?: never;
2664
+ deviceCode?: never;
2665
+ implicit?: never;
2666
+ password: DocsAgentA2AOAuthPasswordFlow;
2667
+ };
2668
+ interface DocsAgentA2AOAuth2SecurityScheme {
2669
+ description?: string;
2670
+ flows: DocsAgentA2AOAuthFlows;
2671
+ oauth2MetadataUrl?: string;
2672
+ }
2673
+ interface DocsAgentA2AOpenIdConnectSecurityScheme {
2674
+ description?: string;
2675
+ openIdConnectUrl: string;
2676
+ }
2677
+ interface DocsAgentA2AMutualTlsSecurityScheme {
2678
+ description?: string;
2679
+ }
2680
+ /** A2A v1 security scheme union. Exactly one scheme is allowed by the protocol. */
2681
+ type DocsAgentA2ASecurityScheme = {
2682
+ apiKeySecurityScheme: DocsAgentA2AApiKeySecurityScheme;
2683
+ httpAuthSecurityScheme?: never;
2684
+ oauth2SecurityScheme?: never;
2685
+ openIdConnectSecurityScheme?: never;
2686
+ mtlsSecurityScheme?: never;
2687
+ } | {
2688
+ apiKeySecurityScheme?: never;
2689
+ httpAuthSecurityScheme: DocsAgentA2AHttpAuthSecurityScheme;
2690
+ oauth2SecurityScheme?: never;
2691
+ openIdConnectSecurityScheme?: never;
2692
+ mtlsSecurityScheme?: never;
2693
+ } | {
2694
+ apiKeySecurityScheme?: never;
2695
+ httpAuthSecurityScheme?: never;
2696
+ oauth2SecurityScheme: DocsAgentA2AOAuth2SecurityScheme;
2697
+ openIdConnectSecurityScheme?: never;
2698
+ mtlsSecurityScheme?: never;
2699
+ } | {
2700
+ apiKeySecurityScheme?: never;
2701
+ httpAuthSecurityScheme?: never;
2702
+ oauth2SecurityScheme?: never;
2703
+ openIdConnectSecurityScheme: DocsAgentA2AOpenIdConnectSecurityScheme;
2704
+ mtlsSecurityScheme?: never;
2705
+ } | {
2706
+ apiKeySecurityScheme?: never;
2707
+ httpAuthSecurityScheme?: never;
2708
+ oauth2SecurityScheme?: never;
2709
+ openIdConnectSecurityScheme?: never;
2710
+ mtlsSecurityScheme: DocsAgentA2AMutualTlsSecurityScheme;
2711
+ };
2712
+ /** One capability implemented by the configured A2A service. */
2713
+ interface DocsAgentA2ASkill {
2714
+ id: string;
2559
2715
  name: string;
2560
2716
  description: string;
2561
- documentationUrl: string;
2562
- provider: {
2717
+ tags: readonly string[];
2718
+ examples?: readonly string[];
2719
+ inputModes?: readonly string[];
2720
+ outputModes?: readonly string[];
2721
+ securityRequirements?: readonly DocsAgentA2ASecurityRequirement[];
2722
+ }
2723
+ interface DocsAgentA2ABaseConfig {
2724
+ name: string;
2725
+ description: string;
2726
+ /** Absolute HTTPS documentation URL; HTTP is allowed only for loopback development. */
2727
+ documentationUrl?: string;
2728
+ /** Provider identity with an absolute HTTPS URL outside loopback development. */
2729
+ provider?: {
2563
2730
  organization: string;
2564
2731
  url: string;
2565
2732
  };
2566
2733
  version?: string;
2567
- /** A2A protocol version exposed by the interface. @default "0.3" */
2734
+ /** Absolute HTTPS icon URL; HTTP is allowed only for loopback development. */
2735
+ iconUrl?: string;
2736
+ capabilities?: DocsAgentA2ACapabilities;
2737
+ /** Agent-wide supported input media types. @default ["text/plain"] */
2738
+ defaultInputModes?: readonly string[];
2739
+ /** Agent-wide supported output media types. @default ["text/plain"] */
2740
+ defaultOutputModes?: readonly string[];
2741
+ securitySchemes?: Readonly<Record<string, DocsAgentA2ASecurityScheme>>;
2742
+ securityRequirements?: readonly DocsAgentA2ASecurityRequirement[];
2743
+ }
2744
+ interface DocsAgentA2ASingleInterfaceConfig {
2745
+ /** @deprecated Prefer `supportedInterfaces` for new A2A v1 configurations. */
2746
+ interfaceUrl: string;
2747
+ supportedInterfaces?: never;
2748
+ /** A2A protocol version exposed by the shorthand interface. @default "0.3" */
2568
2749
  protocolVersion?: string;
2569
- /** Transport binding exposed by the interface. @default "HTTP+JSON" */
2570
- protocolBinding?: string;
2750
+ /** Transport binding exposed by the shorthand interface. @default "HTTP+JSON" */
2751
+ protocolBinding?: DocsAgentA2AProtocolBinding;
2752
+ /** Explicit A2A skills; published documentation skills are projected when omitted. */
2753
+ skills?: readonly DocsAgentA2ASkill[];
2754
+ }
2755
+ interface DocsAgentA2AInterfacesConfig {
2756
+ /** Ordered interfaces; the first entry is preferred. At least one is required. */
2757
+ supportedInterfaces: readonly [DocsAgentA2AInterfaceConfig, ...DocsAgentA2AInterfaceConfig[]];
2758
+ /** Capabilities actually implemented by the configured A2A interfaces. */
2759
+ skills: readonly DocsAgentA2ASkill[];
2760
+ interfaceUrl?: never;
2761
+ protocolVersion?: never;
2762
+ protocolBinding?: never;
2571
2763
  }
2764
+ /** Explicit A2A service metadata. Configure this only when the URL implements A2A. */
2765
+ type DocsAgentA2AConfig = DocsAgentA2ABaseConfig & (DocsAgentA2ASingleInterfaceConfig | DocsAgentA2AInterfacesConfig);
2572
2766
  interface DocsAgentConfig {
2573
2767
  /**
2574
2768
  * Defaults for `docs agent compact`.
@@ -3312,4 +3506,4 @@ interface DocsConfig {
3312
3506
  og?: OGConfig;
3313
3507
  }
3314
3508
  //#endregion
3315
- export { DocsCloudFeatureConfig as $, DocsTelemetryEvent as $t, DocsAgentGoldenTask as A, PageSidebarFrontmatter as An, DocsRelatedItem as At, DocsAnalyticsEventInput as B, SidebarPageNode as Bn, DocsSearchAdapterContext as Bt, DocsAgentEvaluationTaskInput as C, PageAgentAppliesTo as Cn, DocsMcpSecurityConfig as Ct, DocsAgentGoldenAnswerExpectation as D, PageAgentVerification as Dn, DocsObservabilityConfig as Dt, DocsAgentFeedbackData as E, PageAgentFrontmatter as En, DocsNav as Et, DocsAgentTraceEventInput as F, SidebarComponentProps as Fn, DocsReviewScoreConfig as Ft, DocsAskAIActionType as G, TypographyConfig as Gn, DocsSearchEmbeddingsConfig as Gt, DocsAnalyticsInput as H, SimpleDocsSearchConfig as Hn, DocsSearchChunkingConfig as Ht, DocsAgentTraceEventType as I, SidebarConfig as In, DocsReviewSeverity as It, DocsAskAIFeedbackMessage as J, DocsSearchResultType as Jt, DocsAskAIFeedbackConfig as K, UIConfig as Kn, DocsSearchQuery as Kt, DocsAgentTraceStatus as L, SidebarFolderIndexBehavior as Ln, DocsRobotsConfig as Lt, DocsAgentGoldenTaskFilters as M, ReadingTimeConfig as Mn, DocsReviewCiMode as Mt, DocsAgentSkillsConfig as N, ReadingTimeFormat as Nn, DocsReviewConfig as Nt, DocsAgentGoldenExampleVerification as O, PageFrontmatter as On, DocsObservabilityEvent as Ot, DocsAgentSkillsInput as P, ResolvedDocsRelatedLink as Pn, DocsReviewRulesConfig as Pt, DocsCloudConfig as Q, DocsTelemetryConfig as Qt, DocsAnalyticsConfig as R, SidebarFolderNode as Rn, DocsRobotsRule as Rt, DocsAgentEvaluationSurface as S, PageActionsConfig as Sn, DocsMcpProtectedResourceConfig as St, DocsAgentFeedbackContext as T, PageAgentFailureMode as Tn, DocsMetadata as Tt, DocsAnalyticsSource as U, ThemeToggleConfig as Un, DocsSearchConfig as Ut, DocsAnalyticsEventType as V, SidebarTree as Vn, DocsSearchAdapterFactory as Vt, DocsAskAIActionData as W, TypesenseDocsSearchConfig as Wn, DocsSearchDocument as Wt, DocsAskAIMcpConfig as X, DocsSitemapConfig as Xt, DocsAskAIFeedbackValue as Y, DocsSearchSourcePage as Yt, DocsCloudApiKeyConfig as Z, DocsTelemetryAgentSurface as Zt, DocsAgentEvaluationAnswerProvider as _, OpenDocsProviderConfig as _n, DocsMcpAuthenticateContext as _t, ApiReferenceRenderer as a, FeedbackConfig as an, DocsCodeBlocksRunnerConfig as at, DocsAgentEvaluationAnswerRunner as b, OpenGraphImage as bn, DocsMcpCorsConfig as bt, ChangelogFrontmatter as c, LastUpdatedConfig as cn, DocsCodeBlocksValidationMode as ct, CopyMarkdownFormat as d, LlmsTxtMaxCharsMode as dn, DocsFeedbackData as dt, DocsTelemetryEventInput as en, DocsCloudPreviewConfig as et, CustomDocsSearchConfig as f, LlmsTxtSectionConfig as fn, DocsFeedbackValue as ft, DocsAgentEvaluationAnswerInput as g, OpenDocsProvider as gn, DocsMcpAuthenticate as gt, DocsAgentConfig as h, OpenDocsConfig as hn, DocsMcpAuthPrincipal as ht, ApiReferenceConfig as i, DocsTheme as in, DocsCodeBlocksPlannerProvider as it, DocsAgentGoldenTaskExpectation as j, PageTwitter as jn, DocsReviewCiConfig as jt, DocsAgentGoldenExpectedExample as k, PageOpenGraph as kn, DocsObservabilityEventInput as kt, CodeBlockCopyData as l, LlmsTxtConfig as ln, DocsCodeBlocksValidationPolicy as lt, DocsAgentCompactConfig as m, OGConfig as mn, DocsMcpAllowedOrigins as mt, AgentFeedbackConfig as n, DocsTelemetryFeatures as nn, DocsCodeBlocksConfig as nt, BreadcrumbConfig as o, FontStyle as on, DocsCodeBlocksRunnerProvider as ot, DocsAgentA2AConfig as p, McpDocsSearchConfig as pn, DocsI18nConfig as pt, DocsAskAIFeedbackData as q, DocsSearchResult as qt, AlgoliaDocsSearchConfig as r, DocsTelemetryFramework as rn, DocsCodeBlocksPlannerConfig as rt, ChangelogConfig as s, GithubConfig as sn, DocsCodeBlocksValidateConfig as st, AIConfig as t, DocsTelemetryEventType as tn, DocsCloudPublishConfig as tt, CopyMarkdownConfig as u, LlmsTxtMaxCharsConfig as un, DocsConfig as ut, DocsAgentEvaluationAnswerRequest as v, OpenDocsProviderId as vn, DocsMcpAuthenticateResult as vt, DocsAgentEvaluationsConfig as w, PageAgentCommand as wn, DocsMcpToolsConfig as wt, DocsAgentEvaluationSourceReference as x, OrderingItem as xn, DocsMcpOriginContext as xt, DocsAgentEvaluationAnswerResult as y, OpenDocsTarget as yn, DocsMcpConfig as yt, DocsAnalyticsEvent as z, SidebarNode as zn, DocsSearchAdapter as zt };
3509
+ export { DocsAgentSkillsInput as $, ResolvedDocsRelatedLink as $n, DocsReviewRulesConfig as $t, DocsAgentA2ASecurityScheme as A, LlmsTxtMaxCharsMode as An, DocsFeedbackData as At, DocsAgentEvaluationSourceReference as B, OrderingItem as Bn, DocsMcpOriginContext as Bt, DocsAgentA2AOAuthDeviceCodeFlow as C, DocsTheme as Cn, DocsCodeBlocksPlannerProvider as Ct, DocsAgentA2AOpenIdConnectSecurityScheme as D, LastUpdatedConfig as Dn, DocsCodeBlocksValidationMode as Dt, DocsAgentA2AOAuthPasswordFlow as E, GithubConfig as En, DocsCodeBlocksValidateConfig as Et, DocsAgentEvaluationAnswerInput as F, OpenDocsProvider as Fn, DocsMcpAuthenticate as Ft, DocsAgentFeedbackData as G, PageAgentFrontmatter as Gn, DocsNav as Gt, DocsAgentEvaluationTaskInput as H, PageAgentAppliesTo as Hn, DocsMcpSecurityConfig as Ht, DocsAgentEvaluationAnswerProvider as I, OpenDocsProviderConfig as In, DocsMcpAuthenticateContext as It, DocsAgentGoldenExpectedExample as J, PageOpenGraph as Jn, DocsObservabilityEventInput as Jt, DocsAgentGoldenAnswerExpectation as K, PageAgentVerification as Kn, DocsObservabilityConfig as Kt, DocsAgentEvaluationAnswerRequest as L, OpenDocsProviderId as Ln, DocsMcpAuthenticateResult as Lt, DocsAgentA2ASkill as M, McpDocsSearchConfig as Mn, DocsI18nConfig as Mt, DocsAgentCompactConfig as N, OGConfig as Nn, DocsMcpAllowedOrigins as Nt, DocsAgentA2AProtocolBinding as O, LlmsTxtConfig as On, DocsCodeBlocksValidationPolicy as Ot, DocsAgentConfig as P, OpenDocsConfig as Pn, DocsMcpAuthPrincipal as Pt, DocsAgentSkillsConfig as Q, ReadingTimeFormat as Qn, DocsReviewConfig as Qt, DocsAgentEvaluationAnswerResult as R, OpenDocsTarget as Rn, DocsMcpConfig as Rt, DocsAgentA2AOAuthClientCredentialsFlow as S, DocsTelemetryFramework as Sn, DocsCodeBlocksPlannerConfig as St, DocsAgentA2AOAuthImplicitFlow as T, FontStyle as Tn, DocsCodeBlocksRunnerProvider as Tt, DocsAgentEvaluationsConfig as U, PageAgentCommand as Un, DocsMcpToolsConfig as Ut, DocsAgentEvaluationSurface as V, PageActionsConfig as Vn, DocsMcpProtectedResourceConfig as Vt, DocsAgentFeedbackContext as W, PageAgentFailureMode as Wn, DocsMetadata as Wt, DocsAgentGoldenTaskExpectation as X, PageTwitter as Xn, DocsReviewCiConfig as Xt, DocsAgentGoldenTask as Y, PageSidebarFrontmatter as Yn, DocsRelatedItem as Yt, DocsAgentGoldenTaskFilters as Z, ReadingTimeConfig as Zn, DocsReviewCiMode as Zt, DocsAgentA2AHttpAuthSecurityScheme as _, DocsTelemetryConfig as _n, DocsCloudConfig as _t, ApiReferenceRenderer as a, DocsSearchAdapterContext as an, SidebarPageNode as ar, DocsAnalyticsEventInput as at, DocsAgentA2AOAuth2SecurityScheme as b, DocsTelemetryEventType as bn, DocsCloudPublishConfig as bt, ChangelogFrontmatter as c, DocsSearchConfig as cn, ThemeToggleConfig as cr, DocsAnalyticsSource as ct, CopyMarkdownFormat as d, DocsSearchQuery as dn, UIConfig as dr, DocsAskAIFeedbackConfig as dt, DocsReviewScoreConfig as en, SidebarComponentProps as er, DocsAgentTraceEventInput as et, CustomDocsSearchConfig as f, DocsSearchResult as fn, DocsAskAIFeedbackData as ft, DocsAgentA2AExtension as g, DocsTelemetryAgentSurface as gn, DocsCloudApiKeyConfig as gt, DocsAgentA2AConfig as h, DocsSitemapConfig as hn, DocsAskAIMcpConfig as ht, ApiReferenceConfig as i, DocsSearchAdapter as in, SidebarNode as ir, DocsAnalyticsEvent as it, DocsAgentA2ASecurityScopeList as j, LlmsTxtSectionConfig as jn, DocsFeedbackValue as jt, DocsAgentA2ASecurityRequirement as k, LlmsTxtMaxCharsConfig as kn, DocsConfig as kt, CodeBlockCopyData as l, DocsSearchDocument as ln, TypesenseDocsSearchConfig as lr, DocsAskAIActionData as lt, DocsAgentA2ACapabilities as m, DocsSearchSourcePage as mn, DocsAskAIFeedbackValue as mt, AgentFeedbackConfig as n, DocsRobotsConfig as nn, SidebarFolderIndexBehavior as nr, DocsAgentTraceStatus as nt, BreadcrumbConfig as o, DocsSearchAdapterFactory as on, SidebarTree as or, DocsAnalyticsEventType as ot, DocsAgentA2AApiKeySecurityScheme as p, DocsSearchResultType as pn, DocsAskAIFeedbackMessage as pt, DocsAgentGoldenExampleVerification as q, PageFrontmatter as qn, DocsObservabilityEvent as qt, AlgoliaDocsSearchConfig as r, DocsRobotsRule as rn, SidebarFolderNode as rr, DocsAnalyticsConfig as rt, ChangelogConfig as s, DocsSearchChunkingConfig as sn, SimpleDocsSearchConfig as sr, DocsAnalyticsInput as st, AIConfig as t, DocsReviewSeverity as tn, SidebarConfig as tr, DocsAgentTraceEventType as tt, CopyMarkdownConfig as u, DocsSearchEmbeddingsConfig as un, TypographyConfig as ur, DocsAskAIActionType as ut, DocsAgentA2AInterfaceConfig as v, DocsTelemetryEvent as vn, DocsCloudFeatureConfig as vt, DocsAgentA2AOAuthFlows as w, FeedbackConfig as wn, DocsCodeBlocksRunnerConfig as wt, DocsAgentA2AOAuthAuthorizationCodeFlow as x, DocsTelemetryFeatures as xn, DocsCodeBlocksConfig as xt, DocsAgentA2AMutualTlsSecurityScheme as y, DocsTelemetryEventInput as yn, DocsCloudPreviewConfig as yt, DocsAgentEvaluationAnswerRunner as z, OpenGraphImage as zn, DocsMcpCorsConfig as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.2.64",
3
+ "version": "0.2.66",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "keywords": [
6
6
  "docs",