@farming-labs/docs 0.2.52 → 0.2.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-BXvi0uhS.mjs +623 -0
- package/dist/{agent-CaOBIVFy.mjs → agent-DXkXi-pS.mjs} +765 -22
- package/dist/agent-evals-BD17jOqL.mjs +1166 -0
- package/dist/agent-export-n-a0GbeU.mjs +854 -0
- package/dist/agent-scope-B8lptqCd.mjs +283 -0
- package/dist/agent-surface-drift-LS8zQgbq.mjs +1429 -0
- package/dist/{agents-DjhjZaNP.mjs → agents-BJaRQimo.mjs} +7 -5
- package/dist/{analytics-BZEwTK-8.mjs → analytics-Bx44lg6d.mjs} +1 -1
- package/dist/cli/index.mjs +43 -28
- package/dist/client/react.d.mts +1 -1
- package/dist/client/react.mjs +1 -1
- package/dist/{cloud-C_Ok9rC5.mjs → cloud-HWFlbfLJ.mjs} +4 -4
- package/dist/{cloud-ask-ai-Cl-xaV8j.mjs → cloud-ask-ai-1k0q6OAH.mjs} +1 -1
- package/dist/{cloud-ask-ai-DcMe6xOf.d.mts → cloud-ask-ai-466g6uAi.d.mts} +1 -1
- package/dist/code-blocks-C9awWzEQ.mjs +871 -0
- package/dist/codeblocks-BzfkREEC.mjs +250 -0
- package/dist/{config-tiQCZ46q.mjs → config-CydaZ5PB.mjs} +52 -11
- package/dist/{dev-Tm9Ss4D6.mjs → dev-BA2kRuCn.mjs} +3 -3
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +2 -2
- package/dist/{doctor-O9o9kjN8.mjs → doctor-CQpQ2zZm.mjs} +177 -47
- package/dist/{downgrade-CYEaOctn.mjs → downgrade-BStNhyCc.mjs} +2 -2
- package/dist/i18n-CAlj1ADU.mjs +40 -0
- package/dist/index.d.mts +158 -3
- package/dist/index.mjs +7 -6
- package/dist/{init-Ch5On0zm.mjs → init-gnHQ_Pz9.mjs} +3 -3
- package/dist/{mcp-DuCPNHS-.mjs → mcp-DnxZZWpY.mjs} +10 -5
- package/dist/mcp.d.mts +122 -6
- package/dist/mcp.mjs +1943 -86
- package/dist/{package-version-C8PigBZk.mjs → package-version-DRIc08EU.mjs} +1 -1
- package/dist/{reading-time-CPAy1SWO.mjs → reading-time-BrTd3DIh.mjs} +277 -33
- package/dist/{review-lm3dt7yy.mjs → review-B6gyEFkD.mjs} +184 -14
- package/dist/{robots-DV7u4Ire.mjs → robots-4BUJxlvV.mjs} +4 -4
- package/dist/{robots-XVPs9lVz.mjs → robots-DAptQnkx.mjs} +1 -1
- package/dist/{search-BWuU70B0.mjs → search-CJIC1Cqo.mjs} +173 -79
- package/dist/{search-B6nEkx86.mjs → search-CbPm2x5g.mjs} +6 -4
- package/dist/{search-DFEhf9-s.d.mts → search-CfWvmVYA.d.mts} +3 -1
- package/dist/server.d.mts +108 -5
- package/dist/server.mjs +9 -8
- package/dist/{sitemap-BEiKy4Iy.mjs → sitemap-D6nP3J1Q.mjs} +8 -6
- package/dist/{sitemap-server-xEHtDUDB.mjs → sitemap-server-wsNLyVkb.mjs} +1 -1
- package/dist/{templates-uaauJcTO.mjs → templates-1Cod8KrJ.mjs} +11 -5
- package/dist/{types-XqGLsmOD.d.mts → types-BVgucdVm.d.mts} +194 -2
- package/dist/{upgrade-DzQtpgJM.mjs → upgrade-CXYRNV0C.mjs} +2 -2
- package/package.json +1 -1
- package/dist/agent-DXDOMJBw.mjs +0 -9
- package/dist/codeblocks-z9iT794h.mjs +0 -1713
- package/dist/review-B7goPYUb.mjs +0 -541
- /package/dist/{cloud-analytics-Dlk_byos.mjs → cloud-analytics-CSyFE6SS.mjs} +0 -0
- /package/dist/{errors-CW1LnxaQ.mjs → errors-BFUtdZfC.mjs} +0 -0
- /package/dist/{utils-D-xTRNuh.mjs → utils-DBCCkkJS.mjs} +0 -0
|
@@ -894,12 +894,13 @@ async function handlePublicDocsRequest(request: Request) {
|
|
|
894
894
|
const method = request.method.toUpperCase();
|
|
895
895
|
|
|
896
896
|
if (isDocsMcpRequest(url)) {
|
|
897
|
+
if (method === "OPTIONS") return docsServer.MCP.OPTIONS({ request });
|
|
897
898
|
if (method === "POST") return docsServer.MCP.POST({ request });
|
|
898
899
|
if (method === "DELETE") return docsServer.MCP.DELETE({ request });
|
|
899
900
|
if (method === "GET" || method === "HEAD") return docsServer.MCP.GET({ request });
|
|
900
901
|
return new Response("Method Not Allowed", {
|
|
901
902
|
status: 405,
|
|
902
|
-
headers: { Allow: "GET, HEAD, POST, DELETE" },
|
|
903
|
+
headers: { Allow: "GET, HEAD, POST, DELETE, OPTIONS" },
|
|
903
904
|
});
|
|
904
905
|
}
|
|
905
906
|
|
|
@@ -916,6 +917,7 @@ export const Route = createFileRoute("/$")({
|
|
|
916
917
|
GET: async ({ request }) => handlePublicDocsRequest(request),
|
|
917
918
|
POST: async ({ request }) => handlePublicDocsRequest(request),
|
|
918
919
|
DELETE: async ({ request }) => handlePublicDocsRequest(request),
|
|
920
|
+
OPTIONS: async ({ request }) => handlePublicDocsRequest(request),
|
|
919
921
|
},
|
|
920
922
|
},
|
|
921
923
|
});
|
|
@@ -1313,12 +1315,13 @@ export const handle: Handle = async ({ event, resolve }) => {
|
|
|
1313
1315
|
const method = event.request.method.toUpperCase();
|
|
1314
1316
|
|
|
1315
1317
|
if (isDocsMcpRequest(event.url)) {
|
|
1318
|
+
if (method === "OPTIONS") return MCP.OPTIONS({ request: event.request });
|
|
1316
1319
|
if (method === "POST") return MCP.POST({ request: event.request });
|
|
1317
1320
|
if (method === "DELETE") return MCP.DELETE({ request: event.request });
|
|
1318
1321
|
if (method === "GET" || method === "HEAD") return MCP.GET({ request: event.request });
|
|
1319
1322
|
return new Response("Method Not Allowed", {
|
|
1320
1323
|
status: 405,
|
|
1321
|
-
headers: { Allow: "GET, HEAD, POST, DELETE" },
|
|
1324
|
+
headers: { Allow: "GET, HEAD, POST, DELETE, OPTIONS" },
|
|
1322
1325
|
});
|
|
1323
1326
|
}
|
|
1324
1327
|
|
|
@@ -1366,12 +1369,13 @@ const docsPublicHandle: Handle = async ({ event, resolve }) => {
|
|
|
1366
1369
|
const method = event.request.method.toUpperCase();
|
|
1367
1370
|
|
|
1368
1371
|
if (isDocsMcpRequest(event.url)) {
|
|
1372
|
+
if (method === "OPTIONS") return docsMCP.OPTIONS({ request: event.request });
|
|
1369
1373
|
if (method === "POST") return docsMCP.POST({ request: event.request });
|
|
1370
1374
|
if (method === "DELETE") return docsMCP.DELETE({ request: event.request });
|
|
1371
1375
|
if (method === "GET" || method === "HEAD") return docsMCP.GET({ request: event.request });
|
|
1372
1376
|
return new Response("Method Not Allowed", {
|
|
1373
1377
|
status: 405,
|
|
1374
|
-
headers: { Allow: "GET, HEAD, POST, DELETE" },
|
|
1378
|
+
headers: { Allow: "GET, HEAD, POST, DELETE, OPTIONS" },
|
|
1375
1379
|
});
|
|
1376
1380
|
}
|
|
1377
1381
|
|
|
@@ -1787,12 +1791,13 @@ export const onRequest: MiddlewareHandler = async (context, next) => {
|
|
|
1787
1791
|
const method = context.request.method.toUpperCase();
|
|
1788
1792
|
|
|
1789
1793
|
if (isDocsMcpRequest(context.url)) {
|
|
1794
|
+
if (method === "OPTIONS") return MCP.OPTIONS({ request: context.request });
|
|
1790
1795
|
if (method === "POST") return MCP.POST({ request: context.request });
|
|
1791
1796
|
if (method === "DELETE") return MCP.DELETE({ request: context.request });
|
|
1792
1797
|
if (method === "GET" || method === "HEAD") return MCP.GET({ request: context.request });
|
|
1793
1798
|
return new Response("Method Not Allowed", {
|
|
1794
1799
|
status: 405,
|
|
1795
|
-
headers: { Allow: "GET, HEAD, POST, DELETE" },
|
|
1800
|
+
headers: { Allow: "GET, HEAD, POST, DELETE, OPTIONS" },
|
|
1796
1801
|
});
|
|
1797
1802
|
}
|
|
1798
1803
|
|
|
@@ -1840,12 +1845,13 @@ const docsPublicMiddleware: MiddlewareHandler = async (context, next) => {
|
|
|
1840
1845
|
const method = context.request.method.toUpperCase();
|
|
1841
1846
|
|
|
1842
1847
|
if (isDocsMcpRequest(context.url)) {
|
|
1848
|
+
if (method === "OPTIONS") return docsMCP.OPTIONS({ request: context.request });
|
|
1843
1849
|
if (method === "POST") return docsMCP.POST({ request: context.request });
|
|
1844
1850
|
if (method === "DELETE") return docsMCP.DELETE({ request: context.request });
|
|
1845
1851
|
if (method === "GET" || method === "HEAD") return docsMCP.GET({ request: context.request });
|
|
1846
1852
|
return new Response("Method Not Allowed", {
|
|
1847
1853
|
status: 405,
|
|
1848
|
-
headers: { Allow: "GET, HEAD, POST, DELETE" },
|
|
1854
|
+
headers: { Allow: "GET, HEAD, POST, DELETE, OPTIONS" },
|
|
1849
1855
|
});
|
|
1850
1856
|
}
|
|
1851
1857
|
|
|
@@ -246,12 +246,62 @@ type DocsRelatedItem = string;
|
|
|
246
246
|
interface ResolvedDocsRelatedLink {
|
|
247
247
|
href: string;
|
|
248
248
|
}
|
|
249
|
+
interface PageAgentAppliesTo {
|
|
250
|
+
/** Framework name or names this task applies to, for example `"nextjs"`. */
|
|
251
|
+
framework?: string | string[];
|
|
252
|
+
/** Version range or ranges this task applies to, for example `">=16"`. */
|
|
253
|
+
version?: string | string[];
|
|
254
|
+
/** Package name or names this task applies to, for example `"@farming-labs/next"`. */
|
|
255
|
+
package?: string | string[];
|
|
256
|
+
}
|
|
257
|
+
interface PageAgentCommand {
|
|
258
|
+
/** Exact command an agent may run. */
|
|
259
|
+
run: string;
|
|
260
|
+
/** Optional working directory, relative to the project root unless documented otherwise. */
|
|
261
|
+
cwd?: string;
|
|
262
|
+
/** Short explanation of what the command does. */
|
|
263
|
+
description?: string;
|
|
264
|
+
}
|
|
265
|
+
interface PageAgentVerification {
|
|
266
|
+
/** Human-readable verification step. */
|
|
267
|
+
description?: string;
|
|
268
|
+
/** Optional command used to verify the result. */
|
|
269
|
+
run?: string;
|
|
270
|
+
/** Observable result that indicates success. */
|
|
271
|
+
expect?: string;
|
|
272
|
+
}
|
|
273
|
+
interface PageAgentFailureMode {
|
|
274
|
+
/** Symptom an agent may observe. */
|
|
275
|
+
symptom: string;
|
|
276
|
+
/** Recovery guidance for the symptom. */
|
|
277
|
+
resolution?: string;
|
|
278
|
+
}
|
|
249
279
|
interface PageAgentFrontmatter {
|
|
250
280
|
/**
|
|
251
281
|
* Approximate output token target for machine-readable compaction on this page.
|
|
252
282
|
* Used by `docs agent compact` as a per-page override.
|
|
253
283
|
*/
|
|
254
284
|
tokenBudget?: number;
|
|
285
|
+
/** Concrete task the page helps an agent complete. */
|
|
286
|
+
task?: string;
|
|
287
|
+
/** Observable end state the agent should reach. */
|
|
288
|
+
outcome?: string;
|
|
289
|
+
/** Framework, version, and package applicability constraints. */
|
|
290
|
+
appliesTo?: PageAgentAppliesTo;
|
|
291
|
+
/** Conditions or setup that must already be true. */
|
|
292
|
+
prerequisites?: string[];
|
|
293
|
+
/** Files the task is expected to read or change. */
|
|
294
|
+
files?: string[];
|
|
295
|
+
/** Commands the task may require. Strings are supported as a concise shorthand. */
|
|
296
|
+
commands?: Array<string | PageAgentCommand>;
|
|
297
|
+
/** Material state changes or external effects the task can cause. */
|
|
298
|
+
sideEffects?: string[];
|
|
299
|
+
/** Checks that prove the task completed successfully. */
|
|
300
|
+
verification?: Array<string | PageAgentVerification>;
|
|
301
|
+
/** Steps that restore the previous state when the task must be undone. */
|
|
302
|
+
rollback?: string[];
|
|
303
|
+
/** Common symptoms and optional recovery guidance. */
|
|
304
|
+
failureModes?: Array<string | PageAgentFailureMode>;
|
|
255
305
|
}
|
|
256
306
|
interface PageSidebarFrontmatter {
|
|
257
307
|
/**
|
|
@@ -1133,6 +1183,10 @@ interface DocsMcpToolsConfig {
|
|
|
1133
1183
|
listPages?: boolean;
|
|
1134
1184
|
/** Expose a `read_page` tool that returns a page by slug or URL path. */
|
|
1135
1185
|
readPage?: boolean;
|
|
1186
|
+
/** Expose a `list_tasks` tool for pages with actionable agent contracts. */
|
|
1187
|
+
listTasks?: boolean;
|
|
1188
|
+
/** Expose a `read_task` tool that returns a page's full agent contract. */
|
|
1189
|
+
readTask?: boolean;
|
|
1136
1190
|
/** Expose a `search_docs` tool for keyword search over page content. */
|
|
1137
1191
|
searchDocs?: boolean;
|
|
1138
1192
|
/** Expose a `get_navigation` tool for the docs tree. */
|
|
@@ -1141,6 +1195,65 @@ interface DocsMcpToolsConfig {
|
|
|
1141
1195
|
getCodeExamples?: boolean;
|
|
1142
1196
|
/** Expose a `get_config_schema` tool for docs.config option metadata. */
|
|
1143
1197
|
getConfigSchema?: boolean;
|
|
1198
|
+
/** Expose deterministic `get_context` retrieval with a conservative UTF-8 byte ceiling. */
|
|
1199
|
+
getContext?: boolean;
|
|
1200
|
+
}
|
|
1201
|
+
/** Authenticated identity returned by an MCP authentication callback. */
|
|
1202
|
+
interface DocsMcpAuthPrincipal {
|
|
1203
|
+
/** Stable identifier for the authenticated user, service, or agent. */
|
|
1204
|
+
id: string;
|
|
1205
|
+
/** Optional authorization scopes that source adapters can inspect. */
|
|
1206
|
+
scopes?: string[];
|
|
1207
|
+
/** Additional application-specific identity claims. */
|
|
1208
|
+
claims?: Record<string, unknown>;
|
|
1209
|
+
}
|
|
1210
|
+
/** Context passed to an MCP Origin policy callback. */
|
|
1211
|
+
interface DocsMcpOriginContext {
|
|
1212
|
+
/** Origin header supplied by the HTTP client. */
|
|
1213
|
+
origin: string;
|
|
1214
|
+
/** Portable Web Request for the incoming MCP request. */
|
|
1215
|
+
request: Request;
|
|
1216
|
+
}
|
|
1217
|
+
/** Context passed to an opt-in MCP authentication callback. */
|
|
1218
|
+
interface DocsMcpAuthenticateContext {
|
|
1219
|
+
/** Portable Web Request for the incoming MCP request. */
|
|
1220
|
+
request: Request;
|
|
1221
|
+
/** Normalized pathname of the MCP endpoint being requested. */
|
|
1222
|
+
pathname: string;
|
|
1223
|
+
}
|
|
1224
|
+
type DocsMcpAllowedOrigins = "same-origin" | readonly string[] | ((context: DocsMcpOriginContext) => boolean | Promise<boolean>);
|
|
1225
|
+
type DocsMcpAuthenticateResult = DocsMcpAuthPrincipal | null | Response;
|
|
1226
|
+
type DocsMcpAuthenticate = (context: DocsMcpAuthenticateContext) => DocsMcpAuthenticateResult | Promise<DocsMcpAuthenticateResult>;
|
|
1227
|
+
/** Browser CORS response controls for an Origin already accepted by `allowedOrigins`. */
|
|
1228
|
+
interface DocsMcpCorsConfig {
|
|
1229
|
+
/** Additional request headers accepted during browser preflight. */
|
|
1230
|
+
allowedHeaders?: readonly string[];
|
|
1231
|
+
/** Additional response headers exposed to browser clients. */
|
|
1232
|
+
exposedHeaders?: readonly string[];
|
|
1233
|
+
/** Emit `Access-Control-Allow-Credentials: true`. Defaults to `false`. */
|
|
1234
|
+
allowCredentials?: boolean;
|
|
1235
|
+
/** Browser preflight cache lifetime in seconds. Defaults to 600. */
|
|
1236
|
+
maxAgeSeconds?: number;
|
|
1237
|
+
}
|
|
1238
|
+
/** Security controls for the Streamable HTTP MCP transport. */
|
|
1239
|
+
interface DocsMcpSecurityConfig {
|
|
1240
|
+
/**
|
|
1241
|
+
* Allowed values for a supplied HTTP Origin header.
|
|
1242
|
+
* Defaults to `"same-origin"`. Requests without Origin remain supported for non-browser clients.
|
|
1243
|
+
*/
|
|
1244
|
+
allowedOrigins?: DocsMcpAllowedOrigins;
|
|
1245
|
+
/**
|
|
1246
|
+
* Optional authentication callback. HTTP MCP stays public when omitted. When present,
|
|
1247
|
+
* returning `null` rejects the request with 401 and returning a Response passes it through.
|
|
1248
|
+
*/
|
|
1249
|
+
authenticate?: DocsMcpAuthenticate;
|
|
1250
|
+
/** Maximum POST body size in bytes. Defaults to 1 MiB. */
|
|
1251
|
+
maxBodyBytes?: number;
|
|
1252
|
+
/**
|
|
1253
|
+
* CORS responses for accepted browser Origins. Defaults to enabled with exact-Origin responses;
|
|
1254
|
+
* set `false` to suppress CORS headers or use an object for credential/header controls.
|
|
1255
|
+
*/
|
|
1256
|
+
cors?: boolean | DocsMcpCorsConfig;
|
|
1144
1257
|
}
|
|
1145
1258
|
/**
|
|
1146
1259
|
* Built-in MCP server configuration.
|
|
@@ -1169,6 +1282,8 @@ interface DocsMcpConfig {
|
|
|
1169
1282
|
version?: string;
|
|
1170
1283
|
/** Fine-grained tool toggles. Omitted tools stay enabled. */
|
|
1171
1284
|
tools?: DocsMcpToolsConfig;
|
|
1285
|
+
/** Streamable HTTP security controls. Authentication is opt-in; stdio is unaffected. */
|
|
1286
|
+
security?: DocsMcpSecurityConfig;
|
|
1172
1287
|
}
|
|
1173
1288
|
type DocsSearchResultType = "page" | "heading" | "text";
|
|
1174
1289
|
interface DocsSearchSourcePage {
|
|
@@ -1177,6 +1292,7 @@ interface DocsSearchSourcePage {
|
|
|
1177
1292
|
content: string;
|
|
1178
1293
|
description?: string;
|
|
1179
1294
|
related?: ResolvedDocsRelatedLink[];
|
|
1295
|
+
agent?: PageAgentFrontmatter;
|
|
1180
1296
|
sourcePath?: string;
|
|
1181
1297
|
lastModified?: string;
|
|
1182
1298
|
lastmod?: string;
|
|
@@ -2238,11 +2354,77 @@ interface DocsAgentCompactConfig {
|
|
|
2238
2354
|
*/
|
|
2239
2355
|
protectJson?: boolean;
|
|
2240
2356
|
}
|
|
2357
|
+
interface DocsAgentGoldenTaskFilters {
|
|
2358
|
+
/** Limit retrieval to a framework such as `nextjs`, `astro`, or `nuxt`. */
|
|
2359
|
+
framework?: string;
|
|
2360
|
+
/** Limit retrieval to an exact documented version. */
|
|
2361
|
+
version?: string;
|
|
2362
|
+
/** Limit retrieval to a locale. */
|
|
2363
|
+
locale?: string;
|
|
2364
|
+
}
|
|
2365
|
+
interface DocsAgentGoldenTaskExpectation {
|
|
2366
|
+
/** Canonical page or section URLs that should answer this task. */
|
|
2367
|
+
relevantSources: string[];
|
|
2368
|
+
/** Additional sources that may be cited without reducing precision. */
|
|
2369
|
+
allowedSources?: string[];
|
|
2370
|
+
/** Sources that must not be selected, for example an obsolete version. */
|
|
2371
|
+
forbiddenSources?: string[];
|
|
2372
|
+
/** Citations that must appear. Defaults to `relevantSources`. */
|
|
2373
|
+
requiredCitations?: string[];
|
|
2374
|
+
/** Minimum relevant-source recall in the top K results. Defaults to `1`. */
|
|
2375
|
+
minRecallAtK?: number;
|
|
2376
|
+
/** Maximum acceptable rank for the first relevant source. Defaults to `topK`. */
|
|
2377
|
+
maxFirstRelevantRank?: number;
|
|
2378
|
+
/** Runnable examples that must be found in retrieved context. */
|
|
2379
|
+
examples?: DocsAgentGoldenExpectedExample[];
|
|
2380
|
+
/** Minimum share of context bytes that must come from relevant sources. */
|
|
2381
|
+
minUsefulByteRatio?: number;
|
|
2382
|
+
}
|
|
2383
|
+
interface DocsAgentGoldenExpectedExample {
|
|
2384
|
+
/** Canonical page or section URL containing the example. */
|
|
2385
|
+
source?: string;
|
|
2386
|
+
language?: string;
|
|
2387
|
+
framework?: string;
|
|
2388
|
+
packageManager?: string;
|
|
2389
|
+
title?: string;
|
|
2390
|
+
/** Defaults to true. Set false for an intentionally non-runnable example. */
|
|
2391
|
+
runnable?: boolean;
|
|
2392
|
+
/** Literal fragments that must occur in the example. */
|
|
2393
|
+
includes?: string[];
|
|
2394
|
+
}
|
|
2395
|
+
interface DocsAgentGoldenTask {
|
|
2396
|
+
/** Stable identifier shown in doctor/review reports. */
|
|
2397
|
+
id: string;
|
|
2398
|
+
/** User-shaped retrieval query. */
|
|
2399
|
+
query: string;
|
|
2400
|
+
/** Optional retrieval scope. */
|
|
2401
|
+
filters?: DocsAgentGoldenTaskFilters;
|
|
2402
|
+
/** Conservative context budget. Uses the MCP context UTF-8 accounting strategy. */
|
|
2403
|
+
tokenBudget?: number;
|
|
2404
|
+
/** Number of ranked search results to evaluate. */
|
|
2405
|
+
topK?: number;
|
|
2406
|
+
/** Deterministic expectations used to score the task. */
|
|
2407
|
+
expect: DocsAgentGoldenTaskExpectation;
|
|
2408
|
+
}
|
|
2409
|
+
interface DocsAgentEvaluationsConfig {
|
|
2410
|
+
/** Enable deterministic golden-task evaluation. */
|
|
2411
|
+
enabled?: boolean;
|
|
2412
|
+
/** Default conservative context budget for tasks that omit `tokenBudget`. */
|
|
2413
|
+
tokenBudget?: number;
|
|
2414
|
+
/** Default retrieval depth for tasks that omit `topK`. */
|
|
2415
|
+
topK?: number;
|
|
2416
|
+
/** Golden tasks evaluated offline by `docs doctor` and `docs review`. */
|
|
2417
|
+
tasks?: DocsAgentGoldenTask[];
|
|
2418
|
+
}
|
|
2241
2419
|
interface DocsAgentConfig {
|
|
2242
2420
|
/**
|
|
2243
2421
|
* Defaults for `docs agent compact`.
|
|
2244
2422
|
*/
|
|
2245
2423
|
compact?: DocsAgentCompactConfig;
|
|
2424
|
+
/**
|
|
2425
|
+
* Deterministic retrieval, citation, version, example, and token-budget evaluations.
|
|
2426
|
+
*/
|
|
2427
|
+
evaluations?: boolean | DocsAgentEvaluationsConfig;
|
|
2246
2428
|
}
|
|
2247
2429
|
type DocsReviewSeverity = "off" | "suggestion" | "warn" | "error";
|
|
2248
2430
|
type DocsReviewCiMode = "off" | "warn" | "block";
|
|
@@ -2261,8 +2443,18 @@ interface DocsReviewRulesConfig {
|
|
|
2261
2443
|
codeFenceMetadata?: DocsReviewSeverity;
|
|
2262
2444
|
/** Check runnable command/code fences for package manager context. */
|
|
2263
2445
|
runnableMetadata?: DocsReviewSeverity;
|
|
2264
|
-
/**
|
|
2446
|
+
/** Validate structured page agent contracts and suggest context for implementation-heavy pages. */
|
|
2265
2447
|
agentContext?: DocsReviewSeverity;
|
|
2448
|
+
/** Statically validate commands referenced by agent contracts and runnable examples. */
|
|
2449
|
+
commandHealth?: DocsReviewSeverity;
|
|
2450
|
+
/** Require useful related-page coverage on actionable docs pages. */
|
|
2451
|
+
relatedCoverage?: DocsReviewSeverity;
|
|
2452
|
+
/** Report when docs.config could not be evaluated and only partial static parsing is available. */
|
|
2453
|
+
configConfidence?: DocsReviewSeverity;
|
|
2454
|
+
/** Detect disagreement between discovery, resolved config, and the public config schema. */
|
|
2455
|
+
agentSurfaceDrift?: DocsReviewSeverity;
|
|
2456
|
+
/** Run deterministic agent golden tasks and report failed or unmeasured behavior. */
|
|
2457
|
+
goldenTasks?: DocsReviewSeverity;
|
|
2266
2458
|
}
|
|
2267
2459
|
interface DocsReviewScoreConfig {
|
|
2268
2460
|
/**
|
|
@@ -2962,4 +3154,4 @@ interface DocsConfig {
|
|
|
2962
3154
|
og?: OGConfig;
|
|
2963
3155
|
}
|
|
2964
3156
|
//#endregion
|
|
2965
|
-
export {
|
|
3157
|
+
export { DocsFeedbackValue as $, McpDocsSearchConfig as $t, DocsAnalyticsSource as A, TypesenseDocsSearchConfig as An, DocsSearchDocument as At, DocsCloudFeatureConfig as B, DocsTelemetryEventInput as Bt, DocsAgentTraceEventType as C, SidebarFolderIndexBehavior as Cn, DocsRobotsConfig as Ct, DocsAnalyticsEventInput as D, SidebarTree as Dn, DocsSearchAdapterFactory as Dt, DocsAnalyticsEvent as E, SidebarPageNode as En, DocsSearchAdapterContext as Et, DocsAskAIFeedbackMessage as F, DocsSearchSourcePage as Ft, DocsCodeBlocksPlannerProvider as G, FeedbackConfig as Gt, DocsCloudPublishConfig as H, DocsTelemetryFeatures as Ht, DocsAskAIFeedbackValue as I, DocsSitemapConfig as It, DocsCodeBlocksValidateConfig as J, LastUpdatedConfig as Jt, DocsCodeBlocksRunnerConfig as K, FontStyle as Kt, DocsAskAIMcpConfig as L, DocsTelemetryAgentSurface as Lt, DocsAskAIActionType as M, UIConfig as Mn, DocsSearchQuery as Mt, DocsAskAIFeedbackConfig as N, DocsSearchResult as Nt, DocsAnalyticsEventType as O, SimpleDocsSearchConfig as On, DocsSearchChunkingConfig as Ot, DocsAskAIFeedbackData as P, DocsSearchResultType as Pt, DocsFeedbackData as Q, LlmsTxtSectionConfig as Qt, DocsCloudApiKeyConfig as R, DocsTelemetryConfig as Rt, DocsAgentTraceEventInput as S, SidebarConfig as Sn, DocsReviewSeverity as St, DocsAnalyticsConfig as T, SidebarNode as Tn, DocsSearchAdapter as Tt, DocsCodeBlocksConfig as U, DocsTelemetryFramework as Ut, DocsCloudPreviewConfig as V, DocsTelemetryEventType as Vt, DocsCodeBlocksPlannerConfig as W, DocsTheme as Wt, DocsCodeBlocksValidationPolicy as X, LlmsTxtMaxCharsConfig as Xt, DocsCodeBlocksValidationMode as Y, LlmsTxtConfig as Yt, DocsConfig as Z, LlmsTxtMaxCharsMode as Zt, DocsAgentFeedbackData as _, PageTwitter as _n, DocsReviewCiConfig as _t, ApiReferenceRenderer as a, OpenDocsTarget as an, DocsMcpAuthenticateResult as at, DocsAgentGoldenTaskExpectation as b, ResolvedDocsRelatedLink as bn, DocsReviewRulesConfig as bt, ChangelogFrontmatter as c, PageActionsConfig as cn, DocsMcpOriginContext as ct, CopyMarkdownFormat as d, PageAgentFailureMode as dn, DocsMetadata as dt, OGConfig as en, DocsI18nConfig as et, CustomDocsSearchConfig as f, PageAgentFrontmatter as fn, DocsNav as ft, DocsAgentFeedbackContext as g, PageSidebarFrontmatter as gn, DocsRelatedItem as gt, DocsAgentEvaluationsConfig as h, PageOpenGraph as hn, DocsObservabilityEventInput as ht, ApiReferenceConfig as i, OpenDocsProviderId as in, DocsMcpAuthenticateContext as it, DocsAskAIActionData as j, TypographyConfig as jn, DocsSearchEmbeddingsConfig as jt, DocsAnalyticsInput as k, ThemeToggleConfig as kn, DocsSearchConfig as kt, CodeBlockCopyData as l, PageAgentAppliesTo as ln, DocsMcpSecurityConfig as lt, DocsAgentConfig as m, PageFrontmatter as mn, DocsObservabilityEvent as mt, AgentFeedbackConfig as n, OpenDocsProvider as nn, DocsMcpAuthPrincipal as nt, BreadcrumbConfig as o, OpenGraphImage as on, DocsMcpConfig as ot, DocsAgentCompactConfig as p, PageAgentVerification as pn, DocsObservabilityConfig as pt, DocsCodeBlocksRunnerProvider as q, GithubConfig as qt, AlgoliaDocsSearchConfig as r, OpenDocsProviderConfig as rn, DocsMcpAuthenticate as rt, ChangelogConfig as s, OrderingItem as sn, DocsMcpCorsConfig as st, AIConfig as t, OpenDocsConfig as tn, DocsMcpAllowedOrigins as tt, CopyMarkdownConfig as u, PageAgentCommand as un, DocsMcpToolsConfig as ut, DocsAgentGoldenExpectedExample as v, ReadingTimeConfig as vn, DocsReviewCiMode as vt, DocsAgentTraceStatus as w, SidebarFolderNode as wn, DocsRobotsRule as wt, DocsAgentGoldenTaskFilters as x, SidebarComponentProps as xn, DocsReviewScoreConfig as xt, DocsAgentGoldenTask as y, ReadingTimeFormat as yn, DocsReviewConfig as yt, DocsCloudConfig as z, DocsTelemetryEvent as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as fileExists, o as exec } from "./utils-
|
|
2
|
-
import { a as getPackagesForFramework, c as resolveDocsPackageManager, i as frameworkFromPreset, l as validateUpgradeVersion, n as PRESETS, o as presetFromFramework, r as buildDocsPackageInstallCommand, s as resolveDocsPackageFramework, t as PACKAGES_BY_FRAMEWORK } from "./package-version-
|
|
1
|
+
import { c as fileExists, o as exec } from "./utils-DBCCkkJS.mjs";
|
|
2
|
+
import { a as getPackagesForFramework, c as resolveDocsPackageManager, i as frameworkFromPreset, l as validateUpgradeVersion, n as PRESETS, o as presetFromFramework, r as buildDocsPackageInstallCommand, s as resolveDocsPackageFramework, t as PACKAGES_BY_FRAMEWORK } from "./package-version-DRIc08EU.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import pc from "picocolors";
|
|
5
5
|
import * as p from "@clack/prompts";
|
package/package.json
CHANGED
package/dist/agent-DXDOMJBw.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./reading-time-CPAy1SWO.mjs";
|
|
2
|
-
import "./agent-CaOBIVFy.mjs";
|
|
3
|
-
import "./search-BWuU70B0.mjs";
|
|
4
|
-
import "./robots-XVPs9lVz.mjs";
|
|
5
|
-
import "./sitemap-server-xEHtDUDB.mjs";
|
|
6
|
-
import "./config-tiQCZ46q.mjs";
|
|
7
|
-
import { a as readPageTokenBudget, i as printAgentCompactHelp, n as inspectAgentCompactionState, o as scanDocsPageTargets, r as parseAgentCompactArgs, t as compactAgentDocs } from "./codeblocks-z9iT794h.mjs";
|
|
8
|
-
|
|
9
|
-
export { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp };
|