@farming-labs/docs 0.2.84 → 0.2.87
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-qJNbZUCZ.d.mts → agent-C598zLsD.d.mts} +6 -3
- package/dist/{agent-D68WI6-N.mjs → agent-CTOUI2BK.mjs} +30 -245
- package/dist/{agent-DuwSq3C7.mjs → agent-FyPQ2AZ4.mjs} +2 -2
- package/dist/{agent-evals-CEvUQb_Z.mjs → agent-evals-DCptRrdP.mjs} +2 -2
- package/dist/{agent-export-BMljO4ll.mjs → agent-export-Di1Ofstb.mjs} +41 -25
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/agent-skills-progressive-disclosure-BVvj7nM8.mjs +308 -0
- package/dist/{agent-skills-server-D5qYU19g.mjs → agent-skills-server-CwmzAzf_.mjs} +1 -1
- package/dist/{agent-skills-server-aKgt9CR9.d.mts → agent-skills-server-DEqyYAhL.d.mts} +2 -2
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-D1j3fKjv.mjs → agents-DjUz5voa.mjs} +6 -6
- package/dist/cli/index.mjs +44 -17
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-ask-ai-Bx-qtqHL.d.mts → cloud-ask-ai-uzDpy0um.d.mts} +1 -1
- package/dist/{content-change-hydration-CiMxs3LF.mjs → content-change-hydration-DLBinuFR.mjs} +2 -1
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/{doctor-DaZp33gE.mjs → doctor-DUnOjP9T.mjs} +11 -10
- package/dist/{downgrade-w7e6Se0L.mjs → downgrade-Wcgqbfv_.mjs} +1 -1
- package/dist/{golden-evaluations-BKxcJ1qw.mjs → golden-evaluations-CNDwoUOe.mjs} +2 -306
- package/dist/index.d.mts +29 -5
- package/dist/index.mjs +6 -6
- package/dist/{mcp-CwTbgrZm.mjs → mcp-7bvRe9Da.mjs} +6 -6
- package/dist/mcp.d.mts +3 -3
- package/dist/mcp.mjs +3 -3
- package/dist/{prompt-references-ClTizbsa.mjs → prompt-references-B6gxePm8.mjs} +3 -3
- package/dist/{retrieval-digest-CG9QWgw-.d.mts → retrieval-digest-sY-uhDFJ.d.mts} +10 -7
- package/dist/{review-BMO-4X_5.mjs → review-DEnzotkg.mjs} +7 -6
- package/dist/{robots-CLtbWSEJ.mjs → robots-DXy1xW3D.mjs} +3 -3
- package/dist/{robots-HWKsiZQS.mjs → robots-DaU38DZw.mjs} +2 -2
- package/dist/{search-ZY4rf1fy.mjs → search-DznddPqw.mjs} +6 -6
- package/dist/server.d.mts +5 -5
- package/dist/server.mjs +6 -6
- package/dist/{sitemap-CAzZFDic.mjs → sitemap-DCsrVSPf.mjs} +6 -6
- package/dist/{sitemap-server-_AeFxJQB.mjs → sitemap-server-Ds5z4WQB.mjs} +1 -1
- package/dist/skills-CPDwsMq4.mjs +467 -0
- package/dist/{standards-discovery-UdXpOfmN.d.mts → standards-discovery-CG_cZRSx.d.mts} +5 -2
- package/dist/{standards-discovery-BKlEnK_H.mjs → standards-discovery-Ckx0tN7B.mjs} +342 -41
- package/dist/{upgrade-oz-GChgt.mjs → upgrade-BSCjUH0V.mjs} +1 -1
- package/package.json +1 -1
- /package/dist/{init-DAkI0Lkf.mjs → init-D0GcUKJ0.mjs} +0 -0
- /package/dist/{package-version-n5AFur8a.mjs → package-version-B3PJ6IDr.mjs} +0 -0
- /package/dist/{types-DQl2dvDl.d.mts → types-CigzkdLB.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dn as DocsSearchDocument, Dr as PageAgentFrontmatter, En as DocsSearchConfig, F as DocsAgentContentChangesConfig, Fn as DocsSearchFilterField, Fr as ResolvedDocsRelatedLink, Gr as TypesenseDocsSearchConfig, In as DocsSearchFilterInput, Jn as DocsSearchSourcePage, K as DocsAgentFeedbackData, Kn as DocsSearchResult, Ln as DocsSearchFilters, Mn as DocsSearchFacetsResponse, Mt as DocsConfig, Rt as DocsContentChangesResponse, Tn as DocsSearchChunkingConfig, Ut as DocsI18nConfig, Wn as DocsSearchRequest, Yt as DocsMcpConfig, Zn as DocsSitemapConfig, bn as DocsSearchAdapterFactory, dr as LlmsTxtMaxCharsConfig, f as CustomDocsSearchConfig, fr as LlmsTxtMaxCharsMode, gn as DocsRobotsConfig, mr as McpDocsSearchConfig, on as DocsPaginatedSearchResponse, or as FeedbackConfig, pr as LlmsTxtSectionConfig, r as AlgoliaDocsSearchConfig, ur as LlmsTxtConfig, vn as DocsSearchAdapter, vt as DocsAskAIMcpConfig, zt as DocsContentSnapshot } from "./types-
|
|
2
|
-
import { O as DocsA2AAgentCardOptions, R as DocsDiscoveryApiRouteOptions, z as DocsPublishedAgentSkill } from "./standards-discovery-
|
|
1
|
+
import { Dn as DocsSearchDocument, Dr as PageAgentFrontmatter, En as DocsSearchConfig, F as DocsAgentContentChangesConfig, Fn as DocsSearchFilterField, Fr as ResolvedDocsRelatedLink, Gr as TypesenseDocsSearchConfig, In as DocsSearchFilterInput, Jn as DocsSearchSourcePage, K as DocsAgentFeedbackData, Kn as DocsSearchResult, Ln as DocsSearchFilters, Mn as DocsSearchFacetsResponse, Mt as DocsConfig, Rt as DocsContentChangesResponse, Tn as DocsSearchChunkingConfig, Ut as DocsI18nConfig, Wn as DocsSearchRequest, Yt as DocsMcpConfig, Zn as DocsSitemapConfig, bn as DocsSearchAdapterFactory, dr as LlmsTxtMaxCharsConfig, f as CustomDocsSearchConfig, fr as LlmsTxtMaxCharsMode, gn as DocsRobotsConfig, mr as McpDocsSearchConfig, on as DocsPaginatedSearchResponse, or as FeedbackConfig, pr as LlmsTxtSectionConfig, r as AlgoliaDocsSearchConfig, ur as LlmsTxtConfig, vn as DocsSearchAdapter, vt as DocsAskAIMcpConfig, zt as DocsContentSnapshot } from "./types-CigzkdLB.mjs";
|
|
2
|
+
import { O as DocsA2AAgentCardOptions, R as DocsDiscoveryApiRouteOptions, z as DocsPublishedAgentSkill } from "./standards-discovery-CG_cZRSx.mjs";
|
|
3
3
|
import { DocsMcpPage, DocsMcpResolvedConfig } from "./mcp.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/i18n.d.ts
|
|
@@ -737,6 +737,8 @@ interface DocsStandardsDiscoveryResponseOptions extends DocsAgentDiscoverySpecOp
|
|
|
737
737
|
request: Request;
|
|
738
738
|
preferredSkillDocument?: string | null;
|
|
739
739
|
fallbackSkillDocument: string;
|
|
740
|
+
/** Stable representation generation or source modification time. */
|
|
741
|
+
lastModified?: string | Date | null;
|
|
740
742
|
}
|
|
741
743
|
interface DocsAgentContractMcpTools {
|
|
742
744
|
list?: "list_tasks";
|
|
@@ -918,7 +920,8 @@ declare function createDocsStandardsDiscoveryResponse({
|
|
|
918
920
|
openapi,
|
|
919
921
|
markdown: _markdown,
|
|
920
922
|
publishedSkills,
|
|
921
|
-
agentCard
|
|
923
|
+
agentCard,
|
|
924
|
+
lastModified
|
|
922
925
|
}: DocsStandardsDiscoveryResponseOptions): Promise<Response | null>;
|
|
923
926
|
declare function isDocsAgentDiscoveryRequest(url: URL, options?: DocsDiscoveryApiRouteOptions): boolean;
|
|
924
927
|
declare function buildDocsMcpEndpointCandidates(baseUrl: string, routes?: readonly string[], options?: DocsMcpEndpointCandidateOptions): DocsMcpEndpointCandidate[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as upsertPageAgentContractMarkdown, a as findDocsGeneratedAgentContractRanges, b as renderPageAgentFrontmatterYamlLines, d as PAGE_AGENT_CONTRACT_END_MARKER, l as stripDocsGeneratedAgentContractMarkers, m as PAGE_AGENT_CONTRACT_START_MARKER, o as findDocsMarkdownSection, p as PAGE_AGENT_CONTRACT_FIELD_SCHEMA, s as parseDocsMarkdownSections, y as renderPageAgentContractMarkdown } from "./markdown-sections-7OoA7ylx.mjs";
|
|
2
|
-
import { F as isDocsStandardsDiscoveryRequest, I as resolveDocsDiscoveryApiRoute, M as createDocsStandardsResponse, S as DOCS_AGENT_MANIFEST_FORMAT, T as DOCS_AGENT_MANIFEST_VERSION, _ as DEFAULT_API_CATALOG_FORMAT, a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, c as DEFAULT_AGENT_SKILLS_ARCHIVE_ROUTE_PATTERN, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, k as buildDocsApiCatalog, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, n as API_CATALOG_MEDIA_TYPE, r as API_CATALOG_PROFILE_URI, t as AGENT_SKILLS_DISCOVERY_SCHEMA_URI, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, w as DOCS_AGENT_MANIFEST_SCHEMA_URI } from "./standards-discovery-
|
|
2
|
+
import { B as createDocsCacheableResponse, F as isDocsStandardsDiscoveryRequest, I as resolveDocsDiscoveryApiRoute, K as digestDocsRetrievalContent, M as createDocsStandardsResponse, S as DOCS_AGENT_MANIFEST_FORMAT, T as DOCS_AGENT_MANIFEST_VERSION, W as resolveDocsHttpDate, _ as DEFAULT_API_CATALOG_FORMAT, a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, c as DEFAULT_AGENT_SKILLS_ARCHIVE_ROUTE_PATTERN, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, k as buildDocsApiCatalog, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, n as API_CATALOG_MEDIA_TYPE, q as isDocsRetrievalCanonicalUrl, r as API_CATALOG_PROFILE_URI, t as AGENT_SKILLS_DISCOVERY_SCHEMA_URI, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, w as DOCS_AGENT_MANIFEST_SCHEMA_URI } from "./standards-discovery-Ckx0tN7B.mjs";
|
|
3
3
|
import { createProcessor } from "@mdx-js/mdx";
|
|
4
4
|
|
|
5
5
|
//#region src/mcp-auth.ts
|
|
@@ -148,172 +148,6 @@ function normalizeInlineText(value) {
|
|
|
148
148
|
return value.replace(/\s+/g, " ").trim();
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/retrieval-digest.ts
|
|
153
|
-
const SHA256_INITIAL_STATE = [
|
|
154
|
-
1779033703,
|
|
155
|
-
3144134277,
|
|
156
|
-
1013904242,
|
|
157
|
-
2773480762,
|
|
158
|
-
1359893119,
|
|
159
|
-
2600822924,
|
|
160
|
-
528734635,
|
|
161
|
-
1541459225
|
|
162
|
-
];
|
|
163
|
-
const SHA256_ROUND_CONSTANTS = [
|
|
164
|
-
1116352408,
|
|
165
|
-
1899447441,
|
|
166
|
-
3049323471,
|
|
167
|
-
3921009573,
|
|
168
|
-
961987163,
|
|
169
|
-
1508970993,
|
|
170
|
-
2453635748,
|
|
171
|
-
2870763221,
|
|
172
|
-
3624381080,
|
|
173
|
-
310598401,
|
|
174
|
-
607225278,
|
|
175
|
-
1426881987,
|
|
176
|
-
1925078388,
|
|
177
|
-
2162078206,
|
|
178
|
-
2614888103,
|
|
179
|
-
3248222580,
|
|
180
|
-
3835390401,
|
|
181
|
-
4022224774,
|
|
182
|
-
264347078,
|
|
183
|
-
604807628,
|
|
184
|
-
770255983,
|
|
185
|
-
1249150122,
|
|
186
|
-
1555081692,
|
|
187
|
-
1996064986,
|
|
188
|
-
2554220882,
|
|
189
|
-
2821834349,
|
|
190
|
-
2952996808,
|
|
191
|
-
3210313671,
|
|
192
|
-
3336571891,
|
|
193
|
-
3584528711,
|
|
194
|
-
113926993,
|
|
195
|
-
338241895,
|
|
196
|
-
666307205,
|
|
197
|
-
773529912,
|
|
198
|
-
1294757372,
|
|
199
|
-
1396182291,
|
|
200
|
-
1695183700,
|
|
201
|
-
1986661051,
|
|
202
|
-
2177026350,
|
|
203
|
-
2456956037,
|
|
204
|
-
2730485921,
|
|
205
|
-
2820302411,
|
|
206
|
-
3259730800,
|
|
207
|
-
3345764771,
|
|
208
|
-
3516065817,
|
|
209
|
-
3600352804,
|
|
210
|
-
4094571909,
|
|
211
|
-
275423344,
|
|
212
|
-
430227734,
|
|
213
|
-
506948616,
|
|
214
|
-
659060556,
|
|
215
|
-
883997877,
|
|
216
|
-
958139571,
|
|
217
|
-
1322822218,
|
|
218
|
-
1537002063,
|
|
219
|
-
1747873779,
|
|
220
|
-
1955562222,
|
|
221
|
-
2024104815,
|
|
222
|
-
2227730452,
|
|
223
|
-
2361852424,
|
|
224
|
-
2428436474,
|
|
225
|
-
2756734187,
|
|
226
|
-
3204031479,
|
|
227
|
-
3329325298
|
|
228
|
-
];
|
|
229
|
-
function rotateRight(value, bits) {
|
|
230
|
-
return value >>> bits | value << 32 - bits;
|
|
231
|
-
}
|
|
232
|
-
function normalizeDigestContent(value) {
|
|
233
|
-
return value.replace(/\r\n?/gu, "\n").replace(/^\uFEFF/u, "").trimEnd();
|
|
234
|
-
}
|
|
235
|
-
/** Validate the bounded HTTP(S) URL or root-relative URI reference used by provenance. */
|
|
236
|
-
function isDocsRetrievalCanonicalUrl(value) {
|
|
237
|
-
const hasUnsafeCharacter = value.includes("\\") || Array.from(value).some((character) => {
|
|
238
|
-
const codePoint = character.codePointAt(0) ?? 0;
|
|
239
|
-
return codePoint <= 31 || codePoint === 127;
|
|
240
|
-
});
|
|
241
|
-
if (!value || value !== value.trim() || value.length > 4096 || hasUnsafeCharacter) return false;
|
|
242
|
-
if (/^\/(?!\/)/u.test(value)) try {
|
|
243
|
-
new URL(value, "https://docs.local");
|
|
244
|
-
return true;
|
|
245
|
-
} catch {
|
|
246
|
-
return false;
|
|
247
|
-
}
|
|
248
|
-
try {
|
|
249
|
-
const url = new URL(value);
|
|
250
|
-
return (url.protocol === "http:" || url.protocol === "https:") && !url.username && !url.password;
|
|
251
|
-
} catch {
|
|
252
|
-
return false;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Hash a retrieval source projection with portable SHA-256.
|
|
257
|
-
*
|
|
258
|
-
* The projection is normalized by removing one leading BOM, converting CRLF/CR
|
|
259
|
-
* line endings to LF, and trimming trailing whitespace. The helper is exported so
|
|
260
|
-
* agents can independently verify provenance in Node, edge, and browser runtimes.
|
|
261
|
-
*/
|
|
262
|
-
function digestDocsRetrievalContent(value) {
|
|
263
|
-
const input = new TextEncoder().encode(normalizeDigestContent(value));
|
|
264
|
-
const paddedLength = Math.ceil((input.length + 9) / 64) * 64;
|
|
265
|
-
const padded = new Uint8Array(paddedLength);
|
|
266
|
-
padded.set(input);
|
|
267
|
-
padded[input.length] = 128;
|
|
268
|
-
const bitLength = input.length * 8;
|
|
269
|
-
const dataView = new DataView(padded.buffer);
|
|
270
|
-
dataView.setUint32(paddedLength - 8, Math.floor(bitLength / 4294967296), false);
|
|
271
|
-
dataView.setUint32(paddedLength - 4, bitLength >>> 0, false);
|
|
272
|
-
const state = Uint32Array.from(SHA256_INITIAL_STATE);
|
|
273
|
-
const words = new Uint32Array(64);
|
|
274
|
-
for (let offset = 0; offset < padded.length; offset += 64) {
|
|
275
|
-
for (let index = 0; index < 16; index += 1) words[index] = dataView.getUint32(offset + index * 4, false);
|
|
276
|
-
for (let index = 16; index < 64; index += 1) {
|
|
277
|
-
const previous15 = words[index - 15];
|
|
278
|
-
const previous2 = words[index - 2];
|
|
279
|
-
const sigma0 = rotateRight(previous15, 7) ^ rotateRight(previous15, 18) ^ previous15 >>> 3;
|
|
280
|
-
const sigma1 = rotateRight(previous2, 17) ^ rotateRight(previous2, 19) ^ previous2 >>> 10;
|
|
281
|
-
words[index] = words[index - 16] + sigma0 + words[index - 7] + sigma1 >>> 0;
|
|
282
|
-
}
|
|
283
|
-
let a = state[0];
|
|
284
|
-
let b = state[1];
|
|
285
|
-
let c = state[2];
|
|
286
|
-
let d = state[3];
|
|
287
|
-
let e = state[4];
|
|
288
|
-
let f = state[5];
|
|
289
|
-
let g = state[6];
|
|
290
|
-
let h = state[7];
|
|
291
|
-
for (let index = 0; index < 64; index += 1) {
|
|
292
|
-
const sum1 = rotateRight(e, 6) ^ rotateRight(e, 11) ^ rotateRight(e, 25);
|
|
293
|
-
const choice = e & f ^ ~e & g;
|
|
294
|
-
const temporary1 = h + sum1 + choice + SHA256_ROUND_CONSTANTS[index] + words[index] >>> 0;
|
|
295
|
-
const temporary2 = (rotateRight(a, 2) ^ rotateRight(a, 13) ^ rotateRight(a, 22)) + (a & b ^ a & c ^ b & c) >>> 0;
|
|
296
|
-
h = g;
|
|
297
|
-
g = f;
|
|
298
|
-
f = e;
|
|
299
|
-
e = d + temporary1 >>> 0;
|
|
300
|
-
d = c;
|
|
301
|
-
c = b;
|
|
302
|
-
b = a;
|
|
303
|
-
a = temporary1 + temporary2 >>> 0;
|
|
304
|
-
}
|
|
305
|
-
state[0] = state[0] + a >>> 0;
|
|
306
|
-
state[1] = state[1] + b >>> 0;
|
|
307
|
-
state[2] = state[2] + c >>> 0;
|
|
308
|
-
state[3] = state[3] + d >>> 0;
|
|
309
|
-
state[4] = state[4] + e >>> 0;
|
|
310
|
-
state[5] = state[5] + f >>> 0;
|
|
311
|
-
state[6] = state[6] + g >>> 0;
|
|
312
|
-
state[7] = state[7] + h >>> 0;
|
|
313
|
-
}
|
|
314
|
-
return `sha256:${Array.from(state, (word) => word.toString(16).padStart(8, "0")).join("")}`;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
151
|
//#endregion
|
|
318
152
|
//#region src/pagination.ts
|
|
319
153
|
const DOCS_PAGINATION_CURSOR_VERSION = 1;
|
|
@@ -7422,7 +7256,7 @@ function resolveDocsStandardsOrigin(preferred, fallback) {
|
|
|
7422
7256
|
return new URL(fallback).origin;
|
|
7423
7257
|
}
|
|
7424
7258
|
/** Build and serve standards-based discovery without replacing the custom agent manifest. */
|
|
7425
|
-
async function createDocsStandardsDiscoveryResponse({ request, preferredSkillDocument, fallbackSkillDocument, origin, entry = "docs", docsPath, apiCatalog: explicitApiCatalog, apiRoute, i18n: _i18n, search: _search, mcp, feedback, llms, sitemap, robots, openapi, markdown: _markdown, publishedSkills, agentCard }) {
|
|
7259
|
+
async function createDocsStandardsDiscoveryResponse({ request, preferredSkillDocument, fallbackSkillDocument, origin, entry = "docs", docsPath, apiCatalog: explicitApiCatalog, apiRoute, i18n: _i18n, search: _search, mcp, feedback, llms, sitemap, robots, openapi, markdown: _markdown, publishedSkills, agentCard, lastModified }) {
|
|
7426
7260
|
const url = new URL(request.url);
|
|
7427
7261
|
const resolvedApiRoute = resolveDocsDiscoveryApiRoute(apiRoute);
|
|
7428
7262
|
if (!isDocsStandardsDiscoveryRequest(url, { apiRoute: resolvedApiRoute })) return null;
|
|
@@ -7459,6 +7293,7 @@ async function createDocsStandardsDiscoveryResponse({ request, preferredSkillDoc
|
|
|
7459
7293
|
fallbackSkillDocument,
|
|
7460
7294
|
publishedSkills,
|
|
7461
7295
|
agentCard,
|
|
7296
|
+
lastModified,
|
|
7462
7297
|
apiCatalog: apiCatalogEnabled ? buildDocsApiCatalog({
|
|
7463
7298
|
origin: catalogOrigin,
|
|
7464
7299
|
docsRoute: normalizedDocsPath ? `/${normalizedDocsPath}` : "/",
|
|
@@ -8131,34 +7966,6 @@ function renderDocsMarkdownNotFound({ entry = "docs", apiRoute, requestedPath, o
|
|
|
8131
7966
|
markdownUrl: resolveDocsMarkdownMetadataUrl(requestedMarkdownRoute, origin)
|
|
8132
7967
|
}), sitemap);
|
|
8133
7968
|
}
|
|
8134
|
-
function hashDocsMarkdownRepresentation(value) {
|
|
8135
|
-
let hash = 2166136261;
|
|
8136
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
8137
|
-
hash ^= value.charCodeAt(index);
|
|
8138
|
-
hash = Math.imul(hash, 16777619);
|
|
8139
|
-
}
|
|
8140
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
8141
|
-
}
|
|
8142
|
-
function createDocsMarkdownEtag(document) {
|
|
8143
|
-
return `W/"${document.length.toString(16)}-${hashDocsMarkdownRepresentation(document)}"`;
|
|
8144
|
-
}
|
|
8145
|
-
function normalizeDocsMarkdownEtag(value) {
|
|
8146
|
-
return value.trim().replace(/^W\//i, "");
|
|
8147
|
-
}
|
|
8148
|
-
function requestMatchesDocsMarkdownEtag(request, etag) {
|
|
8149
|
-
const header = request.headers.get("if-none-match");
|
|
8150
|
-
if (!header) return false;
|
|
8151
|
-
if (header.trim() === "*") return true;
|
|
8152
|
-
const expected = normalizeDocsMarkdownEtag(etag);
|
|
8153
|
-
return header.split(",").some((candidate) => normalizeDocsMarkdownEtag(candidate) === expected);
|
|
8154
|
-
}
|
|
8155
|
-
function resolveDocsMarkdownHttpDate(value) {
|
|
8156
|
-
if (!value) return void 0;
|
|
8157
|
-
if (typeof value === "string" && !/(?:T|\s)\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?/.test(value.trim())) return;
|
|
8158
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
8159
|
-
if (Number.isNaN(date.getTime())) return void 0;
|
|
8160
|
-
return date.toUTCString();
|
|
8161
|
-
}
|
|
8162
7969
|
function extractDocsMarkdownLastModified(document) {
|
|
8163
7970
|
const frontmatter = document.match(/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/)?.[1];
|
|
8164
7971
|
if (!frontmatter) return void 0;
|
|
@@ -8167,14 +7974,6 @@ function extractDocsMarkdownLastModified(document) {
|
|
|
8167
7974
|
if (raw.startsWith("\"") && raw.endsWith("\"") || raw.startsWith("'") && raw.endsWith("'")) return raw.slice(1, -1);
|
|
8168
7975
|
return raw;
|
|
8169
7976
|
}
|
|
8170
|
-
function requestHasFreshDocsMarkdownDate(request, lastModified) {
|
|
8171
|
-
if (!lastModified || request.headers.has("if-none-match")) return false;
|
|
8172
|
-
const ifModifiedSince = request.headers.get("if-modified-since");
|
|
8173
|
-
if (!ifModifiedSince) return false;
|
|
8174
|
-
const resourceTime = Date.parse(lastModified);
|
|
8175
|
-
const requestTime = Date.parse(ifModifiedSince);
|
|
8176
|
-
return Number.isFinite(resourceTime) && Number.isFinite(requestTime) && Math.floor(resourceTime / 1e3) <= Math.floor(requestTime / 1e3);
|
|
8177
|
-
}
|
|
8178
7977
|
function resolveDocsMarkdownContentLocation(canonicalUrl) {
|
|
8179
7978
|
const url = new URL(canonicalUrl);
|
|
8180
7979
|
url.pathname = toDocsMarkdownUrl(url.pathname);
|
|
@@ -8255,35 +8054,27 @@ function createDocsMarkdownResponse(options) {
|
|
|
8255
8054
|
byteBudget: sectionIndexRequest.byteBudget
|
|
8256
8055
|
});
|
|
8257
8056
|
const responseDocument = JSON.stringify(sectionIndex);
|
|
8258
|
-
const
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
return new Response(null, {
|
|
8280
|
-
status: 304,
|
|
8281
|
-
headers: notModifiedHeaders
|
|
8282
|
-
});
|
|
8283
|
-
}
|
|
8284
|
-
return new Response(request.method.toUpperCase() === "HEAD" ? null : responseDocument, {
|
|
8285
|
-
status: 200,
|
|
8286
|
-
headers: responseHeaders
|
|
8057
|
+
const lastModified = resolveDocsHttpDate(options.lastModified ?? extractDocsMarkdownLastModified(document));
|
|
8058
|
+
return createDocsCacheableResponse({
|
|
8059
|
+
request,
|
|
8060
|
+
content: responseDocument,
|
|
8061
|
+
lastModified,
|
|
8062
|
+
headers: {
|
|
8063
|
+
...baseSharedHeaders,
|
|
8064
|
+
"Content-Location": sectionIndexContentLocation,
|
|
8065
|
+
Link: `<${canonicalUrl}>; rel="canonical", <${contentLocation}>; rel="alternate"; type="text/markdown"`,
|
|
8066
|
+
"Cache-Control": options.cacheControl ?? "public, max-age=0, s-maxage=3600",
|
|
8067
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
8068
|
+
"X-Docs-Markdown-Section-Index": DOCS_MARKDOWN_SECTION_INDEX_FORMAT,
|
|
8069
|
+
"X-Docs-Markdown-Section-Count": String(sectionIndex.sectionCount),
|
|
8070
|
+
"X-Docs-Markdown-Source-Estimated-Tokens": String(sectionIndex.estimatedTokens),
|
|
8071
|
+
"X-Docs-Markdown-Source-Utf8-Bytes": String(sectionIndex.utf8Bytes),
|
|
8072
|
+
"X-Docs-Markdown-Estimated-Tokens": String(estimateDocsMarkdownTokens(responseDocument)),
|
|
8073
|
+
"X-Docs-Markdown-Utf8-Bytes": String(docsMarkdownUtf8Bytes(responseDocument)),
|
|
8074
|
+
...sectionIndexRequest.tokenBudget ? { "X-Docs-Markdown-Token-Budget": String(sectionIndexRequest.tokenBudget) } : {},
|
|
8075
|
+
...sectionIndexRequest.byteBudget ? { "X-Docs-Markdown-Byte-Budget": String(sectionIndexRequest.byteBudget) } : {},
|
|
8076
|
+
...lastModified ? { "Last-Modified": lastModified } : {}
|
|
8077
|
+
}
|
|
8287
8078
|
});
|
|
8288
8079
|
}
|
|
8289
8080
|
const sectionResult = sectionRequest ? selectDocsMarkdownSection(document, sectionRequest) : void 0;
|
|
@@ -8299,27 +8090,21 @@ function createDocsMarkdownResponse(options) {
|
|
|
8299
8090
|
...sectionResult.tokenBudget ? { "X-Docs-Markdown-Token-Budget": String(sectionResult.tokenBudget) } : {},
|
|
8300
8091
|
...sectionResult.byteBudget ? { "X-Docs-Markdown-Byte-Budget": String(sectionResult.byteBudget) } : {}
|
|
8301
8092
|
} : {};
|
|
8302
|
-
const
|
|
8303
|
-
const lastModified = resolveDocsMarkdownHttpDate(options.lastModified ?? extractDocsMarkdownLastModified(document));
|
|
8093
|
+
const lastModified = resolveDocsHttpDate(options.lastModified ?? extractDocsMarkdownLastModified(document));
|
|
8304
8094
|
const responseHeaders = {
|
|
8305
8095
|
...baseSharedHeaders,
|
|
8306
8096
|
"Content-Location": sectionContentLocation,
|
|
8307
8097
|
Link: `<${sectionCanonicalUrl}>; rel="canonical"`,
|
|
8308
8098
|
"Cache-Control": sectionResult?.found === false ? "no-store" : options.cacheControl ?? "public, max-age=0, s-maxage=3600",
|
|
8309
8099
|
"Content-Type": "text/markdown; charset=utf-8",
|
|
8310
|
-
ETag: etag,
|
|
8311
8100
|
...sectionHeaders,
|
|
8312
8101
|
...lastModified ? { "Last-Modified": lastModified } : {}
|
|
8313
8102
|
};
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
status: 304,
|
|
8318
|
-
headers: notModifiedHeaders
|
|
8319
|
-
});
|
|
8320
|
-
}
|
|
8321
|
-
return new Response(responseDocument, {
|
|
8103
|
+
return createDocsCacheableResponse({
|
|
8104
|
+
request,
|
|
8105
|
+
content: responseDocument,
|
|
8322
8106
|
status: sectionResult?.found === false ? 404 : 200,
|
|
8107
|
+
lastModified,
|
|
8323
8108
|
headers: responseHeaders
|
|
8324
8109
|
});
|
|
8325
8110
|
}
|
|
@@ -8972,4 +8757,4 @@ function toYamlString(value) {
|
|
|
8972
8757
|
}
|
|
8973
8758
|
|
|
8974
8759
|
//#endregion
|
|
8975
|
-
export { matchesDocsLlmsTxtSection as $,
|
|
8760
|
+
export { matchesDocsLlmsTxtSection as $, normalizeDocsMcpEndpointPath as $n, buildDocsRetrievalDigestProjection as $t, buildDocsAgentDiscoverySpec as A, normalizeAgentFramework as An, DEFAULT_SITEMAP_XML_ROUTE as At, findDocsMarkdownPage as B, DEFAULT_MCP_PROTECTED_RESOURCE_METADATA_ROUTE as Bn, DOCS_CONTENT_CHANGES_FORMAT as Bt, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN as C, findDocsAudienceMdxTags as Cn, selectDocsMarkdownSection as Ct, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER as D, agentVersionConstraintGroupsOverlap as Dn, DEFAULT_SITEMAP_MD_DOCS_ROUTE as Dt, DOCS_MARKDOWN_SECTION_INDEX_FORMAT as E, resolveDocsAudienceMdxContent as En, DEFAULT_SITEMAP_MANIFEST_PATH as Et, buildDocsMcpEndpointCandidates as F, createDocsPaginationCursor as Fn, renderDocsSitemapXml as Ft, isDocsAgentDiscoveryRequest as G, getDocsMcpProtectedResourceMetadataRoutes as Gn, createDocsContentChangesHttpResponse as Gt, getDocsMarkdownCanonicalLinkHeader as H, DEFAULT_MCP_ROUTE as Hn, DOCS_CONTENT_SNAPSHOT_FORMAT as Ht, collectDocsMarkdownSections as I, paginateDocsItems as In, resolveDocsSitemapConfig as It, isDocsDiagnosticsRequest as J, isDocsMcpOAuthScopeToken as Jn, resolveDocsContentChangesConfig as Jt, isDocsAgentsRequest as K, getDocsMcpResourcePaths as Kn, isDocsContentChangeGeneration as Kt, createDocsMarkdownResponse as L, resolveDocsPaginationOffset as Ln, resolveDocsSitemapPageLastmod as Lt, buildDocsConfigMap as M, normalizeAgentScopeValues as Mn, createDocsSitemapResponse as Mt, buildDocsDiagnostics as N, normalizeAgentVersion as Nn, readDocsSitemapManifestFromContentMap as Nt, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN as O, agentVersionConstraintMatches as On, DEFAULT_SITEMAP_MD_ROUTE as Ot, buildDocsMarkdownSectionIndex as P, DocsPaginationCursorError as Pn, renderDocsSitemapMarkdown as Pt, isDocsSkillRequest as Q, normalizeDocsMcpAuthorizationServerUrls as Qn, buildDocsContentSnapshot as Qt, createDocsStandardsDiscoveryResponse as R, normalizeDocsRelated as Rn, resolveDocsSitemapRequest as Rt, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE as S, findDocsAudienceMdxIssues as Sn, selectDocsLlmsTxtContent as St, DOCS_CONFIG_MAP_TOP_LEVEL_KEYS as T, resolveDocsAudienceExposure as Tn, validateDocsAgentFeedbackPayload as Tt, getDocsMarkdownVaryHeader as U, DEFAULT_MCP_WELL_KNOWN_ROUTE as Un, DocsContentChangesRequestError as Ut, getDocsLlmsTxtMaxCharsIssue as V, DEFAULT_MCP_PUBLIC_ROUTE as Vn, DOCS_CONTENT_CHANGES_RESPONSE_VALUE as Vt, hasDocsMarkdownSignatureAgent as W, buildDocsMcpProtectedResourceMetadataRoute as Wn, createDocsContentChangeFeed as Wt, isDocsMarkdownSectionIndexRequest as X, isDocsMcpRequest as Xn, DocsSearchRequestError as Xt, isDocsLlmsTxtPublicRequest as Y, isDocsMcpProtectedResourceMetadataPath as Yn, resolveDocsContentChangesRequest as Yt, isDocsPublicGetRequest as Z, isDocsMcpResourcePath as Zn, buildDocsAskAIContext as Zt, DEFAULT_LLMS_TXT_MAX_CHARS as _, resolveDocsSearchFilters as _n, resolveDocsMarkdownRequest as _t, DEFAULT_AGENT_MD_ROUTE as a, createSimpleSearchAdapter as an, renderDocsMarkdownDocument as at, DEFAULT_OPENAPI_SCHEMA_ROUTE as b, resolveSearchRequestConfig as bn, resolveDocsRequestApiRoute as bt, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE as c, formatDocsAskAIPackageHints as cn, resolveDocsAgentContractMcpTools as ct, DEFAULT_DOCS_CONFIG_FORMAT as d, performDocsSearch as dn, resolveDocsAgentsFormat as dt, buildDocsSearchDocuments as en, resolveDocsMcpProtectedResourceMetadataLocation as er, normalizeDocsPathSegment as et, DEFAULT_DOCS_CONFIG_ROUTE as f, performDocsSearchWithMetadata as fn, resolveDocsLlmsTxtFormat as ft, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE as g, resolveDocsSearchError as gn, resolveDocsMarkdownRecovery as gt, DEFAULT_LLMS_FULL_TXT_ROUTE as h, resolveDocsSearchAudience as hn, resolveDocsMarkdownCanonicalUrl as ht, DEFAULT_AGENT_FEEDBACK_ROUTE as i, createMcpSearchAdapter as in, renderDocsLlmsTxt as it, buildDocsAgentFeedbackSchema as j, normalizeAgentLocale as jn, buildDocsSitemapManifest as jt, acceptsDocsMarkdown as k, agentVersionConstraintsOverlap as kn, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE as kt, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE as l, inferDocsAskAIPackageHints as ln, resolveDocsAgentFeedbackConfig as lt, DEFAULT_DOCS_DIAGNOSTICS_ROUTE as m, resolveDocsRetrievalLastModified as mn, resolveDocsLlmsTxtSections as mt, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE as n, createAlgoliaSearchAdapter as nn, parseDocsAgentFeedbackData as nt, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE as o, createTypesenseSearchAdapter as on, renderDocsMarkdownNotFound as ot, DEFAULT_DOCS_DIAGNOSTICS_FORMAT as p, resolveAskAISearchRequestConfig as pn, resolveDocsLlmsTxtRequest as pt, isDocsConfigRequest as q, hasDocsMcpProtectedResourceConfig as qn, isDocsContentChangesRequest as qt, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA as r, createCustomSearchAdapter as rn, renderDocsAgentsDocument as rt, DEFAULT_AGENT_SPEC_ROUTE as s, enrichDocsSearchDocumentsWithProvenance as sn, renderDocsSkillDocument as st, DEFAULT_AGENTS_MD_ROUTE as t, buildDocsSearchFacets as tn, resolveDocsMcpResourceLocation as tr, normalizeDocsUrlPath as tt, DEFAULT_DOCS_API_ROUTE as u, normalizeDocsSearchFilters as un, resolveDocsAgentFeedbackRequest as ut, DEFAULT_LLMS_TXT_ROUTE as v, resolveDocsSearchRequest as vn, resolveDocsMarkdownSectionRequest as vt, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN as w, resolveDocsAgentMdxContent as wn, toDocsMarkdownUrl as wt, DEFAULT_SKILL_MD_ROUTE as x, extractDocsMarkdownPromptBlocks as xn, resolveDocsSkillFormat as xt, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE as y, resolveLocalDocsMcpSearchConfig as yn, resolveDocsOpenApiDiscoveryConfig as yt, detectDocsMarkdownAgentRequest as z, renderDocsRelatedMarkdownLines as zn, toDocsSitemapMarkdownUrl as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as findDocsMarkdownPage, at as renderDocsMarkdownDocument } from "./agent-
|
|
1
|
+
import { B as findDocsMarkdownPage, at as renderDocsMarkdownDocument } from "./agent-CTOUI2BK.mjs";
|
|
2
2
|
import { v as normalizePageAgentFrontmatter, x as stripGeneratedPageAgentContractMarkdown } from "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
-
import { c as hashGeneratedAgentContent, d as serializeGeneratedAgentDocument, s as GENERATED_AGENT_PROVENANCE_VERSION, u as parseGeneratedAgentDocument } from "./content-change-hydration-
|
|
3
|
+
import { c as hashGeneratedAgentContent, d as serializeGeneratedAgentDocument, s as GENERATED_AGENT_PROVENANCE_VERSION, u as parseGeneratedAgentDocument } from "./content-change-hydration-DLBinuFR.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
5
|
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, c as loadProjectEnv, d as readNavTitle, f as readNumberProperty, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral, u as readEnvReferenceProperty } from "./config-Wcdj-D0a.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { An as normalizeAgentFramework, Dn as agentVersionConstraintGroupsOverlap, Mn as normalizeAgentScopeValues, Nn as normalizeAgentVersion, On as agentVersionConstraintMatches, Zt as buildDocsAskAIContext, bn as resolveSearchRequestConfig, dn as performDocsSearch, jn as normalizeAgentLocale, kn as agentVersionConstraintsOverlap, un as normalizeDocsSearchFilters } from "./agent-
|
|
1
|
+
import { An as normalizeAgentFramework, Dn as agentVersionConstraintGroupsOverlap, Mn as normalizeAgentScopeValues, Nn as normalizeAgentVersion, On as agentVersionConstraintMatches, Zt as buildDocsAskAIContext, bn as resolveSearchRequestConfig, dn as performDocsSearch, jn as normalizeAgentLocale, kn as agentVersionConstraintsOverlap, un as normalizeDocsSearchFilters } from "./agent-CTOUI2BK.mjs";
|
|
2
2
|
import { S as upsertPageAgentContractMarkdown, l as stripDocsGeneratedAgentContractMarkers, o as findDocsMarkdownSection } from "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
-
import { t as getDocsAgentSkillsConfiguredPaths } from "./agent-skills-server-
|
|
3
|
+
import { t as getDocsAgentSkillsConfiguredPaths } from "./agent-skills-server-CwmzAzf_.mjs";
|
|
4
4
|
import { buildDocsMcpContext } from "./mcp.mjs";
|
|
5
5
|
import { i as validateCodeBlockPlans, n as planCodeBlockTargets, r as resolveDocsCodeBlocksValidateConfig, t as extractCodeBlocksFromMarkdown } from "./code-blocks-0wjOsqdJ.mjs";
|
|
6
6
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as buildDocsAgentDiscoverySpec, Ft as renderDocsSitemapXml, It as resolveDocsSitemapConfig, Pt as renderDocsSitemapMarkdown, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, at as renderDocsMarkdownDocument, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, it as renderDocsLlmsTxt, jt as buildDocsSitemapManifest, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as resolveDocsAgentFeedbackConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, rt as renderDocsAgentsDocument, st as renderDocsSkillDocument, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, wt as toDocsMarkdownUrl, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-
|
|
1
|
+
import { A as buildDocsAgentDiscoverySpec, Ft as renderDocsSitemapXml, It as resolveDocsSitemapConfig, Pt as renderDocsSitemapMarkdown, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, at as renderDocsMarkdownDocument, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, it as renderDocsLlmsTxt, jt as buildDocsSitemapManifest, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as resolveDocsAgentFeedbackConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, rt as renderDocsAgentsDocument, st as renderDocsSkillDocument, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, wt as toDocsMarkdownUrl, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-CTOUI2BK.mjs";
|
|
2
2
|
import "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
-
import { A as buildDocsLegacySkillsIndex, D as buildDocsA2AAgentCard, L as resolveDocsPublishedAgentSkill, O as buildDocsAgentSkillsIndex, a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-
|
|
4
|
-
import "./content-change-hydration-
|
|
3
|
+
import { A as buildDocsLegacySkillsIndex, D as buildDocsA2AAgentCard, L as resolveDocsPublishedAgentSkill, O as buildDocsAgentSkillsIndex, V as formatDocsContentDigest, W as resolveDocsHttpDate, a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-Ckx0tN7B.mjs";
|
|
4
|
+
import "./content-change-hydration-DLBinuFR.mjs";
|
|
5
5
|
import { t as resolveDocsI18n } from "./i18n-hHVWcflJ.mjs";
|
|
6
|
-
import { c as renderDocsRobotsGeneratedBlock, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, r as DOCS_ROBOTS_GENERATED_BLOCK_END, u as resolveDocsRobotsConfig } from "./robots-
|
|
7
|
-
import "./sitemap-server-
|
|
8
|
-
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-
|
|
9
|
-
import "./agent-evals-
|
|
6
|
+
import { c as renderDocsRobotsGeneratedBlock, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, r as DOCS_ROBOTS_GENERATED_BLOCK_END, u as resolveDocsRobotsConfig } from "./robots-DaU38DZw.mjs";
|
|
7
|
+
import "./sitemap-server-Ds5z4WQB.mjs";
|
|
8
|
+
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-CwmzAzf_.mjs";
|
|
9
|
+
import "./agent-evals-DCptRrdP.mjs";
|
|
10
10
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
11
11
|
import "./code-blocks-0wjOsqdJ.mjs";
|
|
12
12
|
import "./server.mjs";
|
|
@@ -341,7 +341,7 @@ function formatDateOnly(value) {
|
|
|
341
341
|
}
|
|
342
342
|
function pageGitLastmod(rootDir, page) {
|
|
343
343
|
if (page.sourcePath) try {
|
|
344
|
-
const
|
|
344
|
+
const output = execFileSync("git", [
|
|
345
345
|
"log",
|
|
346
346
|
"-1",
|
|
347
347
|
"--format=%cI",
|
|
@@ -355,8 +355,9 @@ function pageGitLastmod(rootDir, page) {
|
|
|
355
355
|
"pipe",
|
|
356
356
|
"ignore"
|
|
357
357
|
]
|
|
358
|
-
}).trim()
|
|
359
|
-
|
|
358
|
+
}).trim();
|
|
359
|
+
const parsed = new Date(output);
|
|
360
|
+
if (!Number.isNaN(parsed.getTime())) return parsed.toISOString();
|
|
360
361
|
} catch {}
|
|
361
362
|
}
|
|
362
363
|
function deterministicSitemapManifest(options) {
|
|
@@ -399,7 +400,7 @@ function addOutput(outputs, publicDir, route, kind, mediaType, content, managed
|
|
|
399
400
|
if (absolutePath === publicFilePath(publicDir, AGENT_BUNDLE_MANIFEST_ROUTE)) throw new Error(`Agent Bundle output collision at ${route} (reserved bundle manifest). Change the conflicting docs slug or configured route.`);
|
|
400
401
|
const collision = outputs.find((output) => output.absolutePath === absolutePath);
|
|
401
402
|
if (collision) throw new Error(`Agent Bundle output collision at ${route} (${collision.kind} and ${kind}). Change the conflicting docs slug or configured route.`);
|
|
402
|
-
|
|
403
|
+
const output = {
|
|
403
404
|
absolutePath,
|
|
404
405
|
publicPath: publicRelativePath(publicDir, absolutePath),
|
|
405
406
|
route,
|
|
@@ -407,7 +408,9 @@ function addOutput(outputs, publicDir, route, kind, mediaType, content, managed
|
|
|
407
408
|
mediaType,
|
|
408
409
|
content: typeof content === "string" && normalizeText ? normalizeContent(content) : content,
|
|
409
410
|
managed
|
|
410
|
-
}
|
|
411
|
+
};
|
|
412
|
+
outputs.push(output);
|
|
413
|
+
return output;
|
|
411
414
|
}
|
|
412
415
|
function assertOutputPathsDoNotCollide(options) {
|
|
413
416
|
const claimed = new Map([[options.publicManifestPath, "public Agent Bundle manifest"], [options.internalManifestPath, "internal Agent Bundle manifest"]]);
|
|
@@ -430,7 +433,8 @@ function resolveUserOwnedAgentsOutputs(outputs) {
|
|
|
430
433
|
return {
|
|
431
434
|
...output,
|
|
432
435
|
content: normalizeContent(current),
|
|
433
|
-
managed: false
|
|
436
|
+
managed: false,
|
|
437
|
+
lastModified: void 0
|
|
434
438
|
};
|
|
435
439
|
});
|
|
436
440
|
}
|
|
@@ -453,7 +457,8 @@ function resolveUserOwnedOverrides(outputs, previous) {
|
|
|
453
457
|
return {
|
|
454
458
|
...output,
|
|
455
459
|
content: normalizeContent(current),
|
|
456
|
-
managed: false
|
|
460
|
+
managed: false,
|
|
461
|
+
lastModified: void 0
|
|
457
462
|
};
|
|
458
463
|
});
|
|
459
464
|
}
|
|
@@ -490,18 +495,22 @@ function resolveRobotsOutput(publicDir, entry, sitemap, robots, agentCard = fals
|
|
|
490
495
|
};
|
|
491
496
|
}
|
|
492
497
|
function toManifestFile(output) {
|
|
498
|
+
const digest = sha256(output.content);
|
|
493
499
|
return {
|
|
494
500
|
path: output.publicPath,
|
|
495
501
|
route: output.route,
|
|
496
502
|
kind: output.kind,
|
|
497
503
|
mediaType: output.mediaType,
|
|
498
504
|
bytes: byteLength(output.content),
|
|
499
|
-
sha256:
|
|
505
|
+
sha256: digest,
|
|
506
|
+
etag: `"${digest}"`,
|
|
507
|
+
contentDigest: formatDocsContentDigest(digest),
|
|
508
|
+
lastModified: output.lastModified,
|
|
500
509
|
managed: output.managed
|
|
501
510
|
};
|
|
502
511
|
}
|
|
503
512
|
function buildAgentBundleManifest(options) {
|
|
504
|
-
const files = [...options.outputs.map(toManifestFile), ...options.orphanedFiles].sort((left, right) => left.path.localeCompare(right.path));
|
|
513
|
+
const files = [...options.outputs.map((output) => toManifestFile(output)), ...options.orphanedFiles].sort((left, right) => left.path.localeCompare(right.path));
|
|
505
514
|
const internalFiles = [...options.internalOutputs.map((output) => ({
|
|
506
515
|
path: output.path,
|
|
507
516
|
kind: output.kind,
|
|
@@ -564,10 +573,14 @@ function preservedStaleManifestFiles(publicDir, previous, outputs) {
|
|
|
564
573
|
if (!existsSync(filePath)) return [];
|
|
565
574
|
const current = readFileSync(filePath);
|
|
566
575
|
if (file.orphaned !== true && sha256(current) === file.sha256) return [];
|
|
576
|
+
const digest = sha256(current);
|
|
567
577
|
return [{
|
|
568
578
|
...file,
|
|
569
579
|
bytes: byteLength(current),
|
|
570
|
-
sha256:
|
|
580
|
+
sha256: digest,
|
|
581
|
+
etag: `"${digest}"`,
|
|
582
|
+
contentDigest: formatDocsContentDigest(digest),
|
|
583
|
+
lastModified: void 0,
|
|
571
584
|
managed: false,
|
|
572
585
|
orphaned: true
|
|
573
586
|
}];
|
|
@@ -712,14 +725,17 @@ async function exportAgentBundle(options = {}) {
|
|
|
712
725
|
const configuredAgentSkills = await resolveConfiguredAgentSkills(config?.agent?.skills, { rootDir });
|
|
713
726
|
let outputs = [];
|
|
714
727
|
const internalOutputs = [];
|
|
715
|
-
for (const { page } of localizedPages)
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
728
|
+
for (const { page } of localizedPages) {
|
|
729
|
+
const output = addOutput(outputs, publicDir, staticMarkdownRoute(page, sourceEntry, routeEntry), "page", "text/markdown", renderDocsMarkdownDocument({
|
|
730
|
+
...page,
|
|
731
|
+
markdownUrl: staticMarkdownRoute(page, sourceEntry, routeEntry)
|
|
732
|
+
}, {
|
|
733
|
+
llms,
|
|
734
|
+
origin: baseUrl,
|
|
735
|
+
sitemap: sitemapInput
|
|
736
|
+
}));
|
|
737
|
+
output.lastModified = resolveDocsHttpDate(page.lastModified);
|
|
738
|
+
}
|
|
723
739
|
if (llmsEnabled) {
|
|
724
740
|
const llmsContent = renderDocsLlmsTxt(pages.map((page) => ({
|
|
725
741
|
url: page.url,
|