@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.
Files changed (43) hide show
  1. package/dist/{agent-qJNbZUCZ.d.mts → agent-C598zLsD.d.mts} +6 -3
  2. package/dist/{agent-D68WI6-N.mjs → agent-CTOUI2BK.mjs} +30 -245
  3. package/dist/{agent-DuwSq3C7.mjs → agent-FyPQ2AZ4.mjs} +2 -2
  4. package/dist/{agent-evals-CEvUQb_Z.mjs → agent-evals-DCptRrdP.mjs} +2 -2
  5. package/dist/{agent-export-BMljO4ll.mjs → agent-export-Di1Ofstb.mjs} +41 -25
  6. package/dist/agent-skills-bundle.d.mts +1 -1
  7. package/dist/agent-skills-progressive-disclosure-BVvj7nM8.mjs +308 -0
  8. package/dist/{agent-skills-server-D5qYU19g.mjs → agent-skills-server-CwmzAzf_.mjs} +1 -1
  9. package/dist/{agent-skills-server-aKgt9CR9.d.mts → agent-skills-server-DEqyYAhL.d.mts} +2 -2
  10. package/dist/agent-skills-vite.d.mts +3 -3
  11. package/dist/agent-skills-vite.mjs +2 -2
  12. package/dist/{agents-D1j3fKjv.mjs → agents-DjUz5voa.mjs} +6 -6
  13. package/dist/cli/index.mjs +44 -17
  14. package/dist/client/react.d.mts +1 -1
  15. package/dist/{cloud-ask-ai-Bx-qtqHL.d.mts → cloud-ask-ai-uzDpy0um.d.mts} +1 -1
  16. package/dist/{content-change-hydration-CiMxs3LF.mjs → content-change-hydration-DLBinuFR.mjs} +2 -1
  17. package/dist/docs-cloud-server.d.mts +2 -2
  18. package/dist/{doctor-DaZp33gE.mjs → doctor-DUnOjP9T.mjs} +11 -10
  19. package/dist/{downgrade-w7e6Se0L.mjs → downgrade-Wcgqbfv_.mjs} +1 -1
  20. package/dist/{golden-evaluations-BKxcJ1qw.mjs → golden-evaluations-CNDwoUOe.mjs} +2 -306
  21. package/dist/index.d.mts +29 -5
  22. package/dist/index.mjs +6 -6
  23. package/dist/{mcp-CwTbgrZm.mjs → mcp-7bvRe9Da.mjs} +6 -6
  24. package/dist/mcp.d.mts +3 -3
  25. package/dist/mcp.mjs +3 -3
  26. package/dist/{prompt-references-ClTizbsa.mjs → prompt-references-B6gxePm8.mjs} +3 -3
  27. package/dist/{retrieval-digest-CG9QWgw-.d.mts → retrieval-digest-sY-uhDFJ.d.mts} +10 -7
  28. package/dist/{review-BMO-4X_5.mjs → review-DEnzotkg.mjs} +7 -6
  29. package/dist/{robots-CLtbWSEJ.mjs → robots-DXy1xW3D.mjs} +3 -3
  30. package/dist/{robots-HWKsiZQS.mjs → robots-DaU38DZw.mjs} +2 -2
  31. package/dist/{search-ZY4rf1fy.mjs → search-DznddPqw.mjs} +6 -6
  32. package/dist/server.d.mts +5 -5
  33. package/dist/server.mjs +6 -6
  34. package/dist/{sitemap-CAzZFDic.mjs → sitemap-DCsrVSPf.mjs} +6 -6
  35. package/dist/{sitemap-server-_AeFxJQB.mjs → sitemap-server-Ds5z4WQB.mjs} +1 -1
  36. package/dist/skills-CPDwsMq4.mjs +467 -0
  37. package/dist/{standards-discovery-UdXpOfmN.d.mts → standards-discovery-CG_cZRSx.d.mts} +5 -2
  38. package/dist/{standards-discovery-BKlEnK_H.mjs → standards-discovery-Ckx0tN7B.mjs} +342 -41
  39. package/dist/{upgrade-oz-GChgt.mjs → upgrade-BSCjUH0V.mjs} +1 -1
  40. package/package.json +1 -1
  41. /package/dist/{init-DAkI0Lkf.mjs → init-D0GcUKJ0.mjs} +0 -0
  42. /package/dist/{package-version-n5AFur8a.mjs → package-version-B3PJ6IDr.mjs} +0 -0
  43. /package/dist/{types-DQl2dvDl.d.mts → types-CigzkdLB.d.mts} +0 -0
@@ -1,5 +1,318 @@
1
1
  import { parseDocsAgentSkillFrontmatter, validateDocsAgentSkillFrontmatter } from "./agent-skills-spec.mjs";
2
2
 
3
+ //#region src/retrieval-digest.ts
4
+ const SHA256_INITIAL_STATE = [
5
+ 1779033703,
6
+ 3144134277,
7
+ 1013904242,
8
+ 2773480762,
9
+ 1359893119,
10
+ 2600822924,
11
+ 528734635,
12
+ 1541459225
13
+ ];
14
+ const SHA256_ROUND_CONSTANTS = [
15
+ 1116352408,
16
+ 1899447441,
17
+ 3049323471,
18
+ 3921009573,
19
+ 961987163,
20
+ 1508970993,
21
+ 2453635748,
22
+ 2870763221,
23
+ 3624381080,
24
+ 310598401,
25
+ 607225278,
26
+ 1426881987,
27
+ 1925078388,
28
+ 2162078206,
29
+ 2614888103,
30
+ 3248222580,
31
+ 3835390401,
32
+ 4022224774,
33
+ 264347078,
34
+ 604807628,
35
+ 770255983,
36
+ 1249150122,
37
+ 1555081692,
38
+ 1996064986,
39
+ 2554220882,
40
+ 2821834349,
41
+ 2952996808,
42
+ 3210313671,
43
+ 3336571891,
44
+ 3584528711,
45
+ 113926993,
46
+ 338241895,
47
+ 666307205,
48
+ 773529912,
49
+ 1294757372,
50
+ 1396182291,
51
+ 1695183700,
52
+ 1986661051,
53
+ 2177026350,
54
+ 2456956037,
55
+ 2730485921,
56
+ 2820302411,
57
+ 3259730800,
58
+ 3345764771,
59
+ 3516065817,
60
+ 3600352804,
61
+ 4094571909,
62
+ 275423344,
63
+ 430227734,
64
+ 506948616,
65
+ 659060556,
66
+ 883997877,
67
+ 958139571,
68
+ 1322822218,
69
+ 1537002063,
70
+ 1747873779,
71
+ 1955562222,
72
+ 2024104815,
73
+ 2227730452,
74
+ 2361852424,
75
+ 2428436474,
76
+ 2756734187,
77
+ 3204031479,
78
+ 3329325298
79
+ ];
80
+ function rotateRight(value, bits) {
81
+ return value >>> bits | value << 32 - bits;
82
+ }
83
+ function normalizeDigestContent(value) {
84
+ return value.replace(/\r\n?/gu, "\n").replace(/^\uFEFF/u, "").trimEnd();
85
+ }
86
+ function toSha256Bytes(value) {
87
+ return typeof value === "string" ? new TextEncoder().encode(value) : value;
88
+ }
89
+ /** Validate the bounded HTTP(S) URL or root-relative URI reference used by provenance. */
90
+ function isDocsRetrievalCanonicalUrl(value) {
91
+ const hasUnsafeCharacter = value.includes("\\") || Array.from(value).some((character) => {
92
+ const codePoint = character.codePointAt(0) ?? 0;
93
+ return codePoint <= 31 || codePoint === 127;
94
+ });
95
+ if (!value || value !== value.trim() || value.length > 4096 || hasUnsafeCharacter) return false;
96
+ if (/^\/(?!\/)/u.test(value)) try {
97
+ new URL(value, "https://docs.local");
98
+ return true;
99
+ } catch {
100
+ return false;
101
+ }
102
+ try {
103
+ const url = new URL(value);
104
+ return (url.protocol === "http:" || url.protocol === "https:") && !url.username && !url.password;
105
+ } catch {
106
+ return false;
107
+ }
108
+ }
109
+ /** Hash exact bytes with portable SHA-256 in Node, edge, and browser runtimes. */
110
+ function sha256DocsContent(value) {
111
+ const input = toSha256Bytes(value);
112
+ const paddedLength = Math.ceil((input.length + 9) / 64) * 64;
113
+ const padded = new Uint8Array(paddedLength);
114
+ padded.set(input);
115
+ padded[input.length] = 128;
116
+ const bitLength = input.length * 8;
117
+ const dataView = new DataView(padded.buffer);
118
+ dataView.setUint32(paddedLength - 8, Math.floor(bitLength / 4294967296), false);
119
+ dataView.setUint32(paddedLength - 4, bitLength >>> 0, false);
120
+ const state = Uint32Array.from(SHA256_INITIAL_STATE);
121
+ const words = new Uint32Array(64);
122
+ for (let offset = 0; offset < padded.length; offset += 64) {
123
+ for (let index = 0; index < 16; index += 1) words[index] = dataView.getUint32(offset + index * 4, false);
124
+ for (let index = 16; index < 64; index += 1) {
125
+ const previous15 = words[index - 15];
126
+ const previous2 = words[index - 2];
127
+ const sigma0 = rotateRight(previous15, 7) ^ rotateRight(previous15, 18) ^ previous15 >>> 3;
128
+ const sigma1 = rotateRight(previous2, 17) ^ rotateRight(previous2, 19) ^ previous2 >>> 10;
129
+ words[index] = words[index - 16] + sigma0 + words[index - 7] + sigma1 >>> 0;
130
+ }
131
+ let a = state[0];
132
+ let b = state[1];
133
+ let c = state[2];
134
+ let d = state[3];
135
+ let e = state[4];
136
+ let f = state[5];
137
+ let g = state[6];
138
+ let h = state[7];
139
+ for (let index = 0; index < 64; index += 1) {
140
+ const sum1 = rotateRight(e, 6) ^ rotateRight(e, 11) ^ rotateRight(e, 25);
141
+ const choice = e & f ^ ~e & g;
142
+ const temporary1 = h + sum1 + choice + SHA256_ROUND_CONSTANTS[index] + words[index] >>> 0;
143
+ const temporary2 = (rotateRight(a, 2) ^ rotateRight(a, 13) ^ rotateRight(a, 22)) + (a & b ^ a & c ^ b & c) >>> 0;
144
+ h = g;
145
+ g = f;
146
+ f = e;
147
+ e = d + temporary1 >>> 0;
148
+ d = c;
149
+ c = b;
150
+ b = a;
151
+ a = temporary1 + temporary2 >>> 0;
152
+ }
153
+ state[0] = state[0] + a >>> 0;
154
+ state[1] = state[1] + b >>> 0;
155
+ state[2] = state[2] + c >>> 0;
156
+ state[3] = state[3] + d >>> 0;
157
+ state[4] = state[4] + e >>> 0;
158
+ state[5] = state[5] + f >>> 0;
159
+ state[6] = state[6] + g >>> 0;
160
+ state[7] = state[7] + h >>> 0;
161
+ }
162
+ return Array.from(state, (word) => word.toString(16).padStart(8, "0")).join("");
163
+ }
164
+ /** Hash exact message-content bytes with portable SHA-256. */
165
+ function digestDocsContent(value) {
166
+ return `sha256:${sha256DocsContent(value)}`;
167
+ }
168
+ /**
169
+ * Hash the normalized retrieval projection used by search provenance.
170
+ *
171
+ * The projection removes one leading BOM, normalizes line endings to LF, and trims
172
+ * trailing whitespace. This deliberately differs from HTTP digests over exact bytes.
173
+ */
174
+ function digestDocsRetrievalContent(value) {
175
+ return digestDocsContent(normalizeDigestContent(value));
176
+ }
177
+
178
+ //#endregion
179
+ //#region src/http-cache.ts
180
+ const BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
181
+ const MAX_CACHED_TEXT_REPRESENTATIONS = 64;
182
+ const MAX_CACHED_TEXT_CHARACTERS = 8 * 1024 * 1024;
183
+ const textValidatorCache = /* @__PURE__ */ new Map();
184
+ let cachedTextCharacters = 0;
185
+ function encodeBase64(bytes) {
186
+ let encoded = "";
187
+ for (let offset = 0; offset < bytes.length; offset += 3) {
188
+ const first = bytes[offset];
189
+ const second = bytes[offset + 1];
190
+ const third = bytes[offset + 2];
191
+ const value = first << 16 | (second ?? 0) << 8 | (third ?? 0);
192
+ encoded += BASE64_ALPHABET[value >>> 18 & 63];
193
+ encoded += BASE64_ALPHABET[value >>> 12 & 63];
194
+ encoded += second === void 0 ? "=" : BASE64_ALPHABET[value >>> 6 & 63];
195
+ encoded += third === void 0 ? "=" : BASE64_ALPHABET[value & 63];
196
+ }
197
+ return encoded;
198
+ }
199
+ function sha256HexBytes(sha256) {
200
+ if (!/^[a-f\d]{64}$/iu.test(sha256)) throw new Error("A SHA-256 digest must contain exactly 64 hexadecimal characters.");
201
+ const bytes = new Uint8Array(32);
202
+ for (let index = 0; index < bytes.length; index += 1) bytes[index] = Number.parseInt(sha256.slice(index * 2, index * 2 + 2), 16);
203
+ return bytes;
204
+ }
205
+ /** Format an RFC 9530 Content-Digest field from a SHA-256 hex digest. */
206
+ function formatDocsContentDigest(sha256) {
207
+ return `sha-256=:${encodeBase64(sha256HexBytes(sha256))}:`;
208
+ }
209
+ function resolveDocsContentValidators(content, suppliedSha256) {
210
+ if (suppliedSha256) return {
211
+ sha256: suppliedSha256,
212
+ contentDigest: formatDocsContentDigest(suppliedSha256)
213
+ };
214
+ const cached = typeof content === "string" ? textValidatorCache.get(content) : void 0;
215
+ if (cached) {
216
+ if (typeof content === "string") {
217
+ textValidatorCache.delete(content);
218
+ textValidatorCache.set(content, cached);
219
+ }
220
+ return cached;
221
+ }
222
+ const sha256 = sha256DocsContent(content);
223
+ const validators = {
224
+ sha256,
225
+ contentDigest: formatDocsContentDigest(sha256)
226
+ };
227
+ if (typeof content !== "string") return validators;
228
+ if (content.length <= MAX_CACHED_TEXT_CHARACTERS) {
229
+ textValidatorCache.set(content, validators);
230
+ cachedTextCharacters += content.length;
231
+ while (textValidatorCache.size > MAX_CACHED_TEXT_REPRESENTATIONS || cachedTextCharacters > MAX_CACHED_TEXT_CHARACTERS) {
232
+ const oldest = textValidatorCache.keys().next().value;
233
+ if (oldest === void 0) break;
234
+ textValidatorCache.delete(oldest);
235
+ cachedTextCharacters -= oldest.length;
236
+ }
237
+ }
238
+ return validators;
239
+ }
240
+ /** Normalize an exact source timestamp for Last-Modified. */
241
+ function resolveDocsHttpDate(value) {
242
+ if (!value) return void 0;
243
+ if (typeof value === "string" && !/(?:T|\s)\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?/.test(value.trim())) return;
244
+ const date = value instanceof Date ? value : new Date(value);
245
+ if (Number.isNaN(date.getTime())) return void 0;
246
+ return date.toUTCString();
247
+ }
248
+ function normalizeEtag(value) {
249
+ return value.trim().replace(/^W\//iu, "");
250
+ }
251
+ /** Match strong or weak If-None-Match validators for a GET/HEAD representation. */
252
+ function requestMatchesDocsEtag(request, etag) {
253
+ const header = request.headers.get("if-none-match");
254
+ if (!header) return false;
255
+ if (header.trim() === "*") return true;
256
+ const expected = normalizeEtag(etag);
257
+ return header.split(",").some((candidate) => normalizeEtag(candidate) === expected);
258
+ }
259
+ /** Apply If-Modified-Since only when the stronger If-None-Match validator is absent. */
260
+ function requestHasFreshDocsDate(request, lastModified) {
261
+ const method = request.method.toUpperCase();
262
+ if (method !== "GET" && method !== "HEAD") return false;
263
+ if (!lastModified || request.headers.has("if-none-match")) return false;
264
+ const ifModifiedSince = request.headers.get("if-modified-since");
265
+ if (!ifModifiedSince) return false;
266
+ const resourceTime = Date.parse(lastModified);
267
+ const requestTime = Date.parse(ifModifiedSince);
268
+ return Number.isFinite(resourceTime) && Number.isFinite(requestTime) && Math.floor(resourceTime / 1e3) <= Math.floor(requestTime / 1e3);
269
+ }
270
+ function exposeValidatorHeaders(headers) {
271
+ if (!headers.has("Access-Control-Allow-Origin")) return;
272
+ const exposed = new Set((headers.get("Access-Control-Expose-Headers") ?? "").split(",").map((value) => value.trim()).filter(Boolean));
273
+ exposed.add("Content-Digest");
274
+ exposed.add("ETag");
275
+ if (headers.has("Last-Modified")) exposed.add("Last-Modified");
276
+ headers.set("Access-Control-Expose-Headers", [...exposed].join(", "));
277
+ }
278
+ /**
279
+ * Build a byte-stable GET/HEAD response with HTTP validators and RFC 9530 integrity metadata.
280
+ */
281
+ function createDocsCacheableResponse(options) {
282
+ const method = options.request.method.toUpperCase();
283
+ const isSafeRetrieval = method === "GET" || method === "HEAD";
284
+ const status = options.status ?? 200;
285
+ const canApplyConditionalRequest = status === 200;
286
+ const { sha256, contentDigest } = resolveDocsContentValidators(options.content, options.sha256);
287
+ const etag = `"${sha256}"`;
288
+ const lastModified = resolveDocsHttpDate(options.lastModified);
289
+ const headers = new Headers(options.headers);
290
+ headers.set("Content-Digest", contentDigest);
291
+ headers.set("ETag", etag);
292
+ if (lastModified) headers.set("Last-Modified", lastModified);
293
+ exposeValidatorHeaders(headers);
294
+ if (canApplyConditionalRequest && requestMatchesDocsEtag(options.request, etag)) {
295
+ headers.delete("Content-Type");
296
+ return new Response(null, {
297
+ status: isSafeRetrieval ? 304 : 412,
298
+ headers
299
+ });
300
+ }
301
+ if (canApplyConditionalRequest && isSafeRetrieval && requestHasFreshDocsDate(options.request, lastModified)) {
302
+ headers.delete("Content-Type");
303
+ return new Response(null, {
304
+ status: 304,
305
+ headers
306
+ });
307
+ }
308
+ const body = method === "HEAD" ? null : typeof options.content === "string" ? options.content : options.content;
309
+ return new Response(body, {
310
+ status,
311
+ headers
312
+ });
313
+ }
314
+
315
+ //#endregion
3
316
  //#region src/standards-discovery.ts
4
317
  const DEFAULT_API_CATALOG_ROUTE = "/.well-known/api-catalog";
5
318
  const DEFAULT_API_CATALOG_FORMAT = "api-catalog";
@@ -151,20 +464,11 @@ function buildDocsApiCatalog(options) {
151
464
  }
152
465
  return { linkset };
153
466
  }
154
- function toDiscoveryBytes(content) {
155
- if (typeof content === "string") return new TextEncoder().encode(content);
156
- const bytes = new Uint8Array(new ArrayBuffer(content.byteLength));
157
- bytes.set(content);
158
- return bytes;
159
- }
160
467
  function toPublishedSkillArray(skills) {
161
468
  return Array.isArray(skills) ? skills : [skills];
162
469
  }
163
470
  async function sha256DocsDiscoveryContent(content) {
164
- const subtle = globalThis.crypto?.subtle;
165
- if (!subtle) throw new Error("Web Crypto SHA-256 support is required for Agent Skills discovery.");
166
- const digest = await subtle.digest("SHA-256", toDiscoveryBytes(content));
167
- return [...new Uint8Array(digest)].map((value) => value.toString(16).padStart(2, "0")).join("");
471
+ return sha256DocsContent(content);
168
472
  }
169
473
  function createDocsPublishedAgentSkill(content, metadata, sha256) {
170
474
  return {
@@ -672,33 +976,23 @@ function appendDocsDiscoveryLinkHeader(headers, value) {
672
976
  next.set("Link", existing ? `${existing}, ${discoveryLinks}` : discoveryLinks);
673
977
  return next;
674
978
  }
675
- function requestMatchesEtag(request, etag) {
676
- const value = request.headers.get("if-none-match");
677
- if (!value) return false;
678
- if (value.trim() === "*") return true;
679
- return value.split(",").some((candidate) => candidate.trim().replace(/^W\//i, "") === etag);
680
- }
681
979
  async function createHashedDiscoveryResponse(options) {
682
- const etag = `"${options.sha256 ?? await sha256DocsDiscoveryContent(options.content)}"`;
683
- const headers = {
684
- "Access-Control-Allow-Origin": "*",
685
- "Access-Control-Expose-Headers": "ETag, Link",
686
- Allow: "GET, HEAD",
687
- "Cache-Control": DISCOVERY_CACHE_CONTROL,
688
- "Content-Type": options.contentType,
689
- ETag: etag,
690
- Link: options.linkHeader,
691
- "X-Robots-Tag": "noindex"
692
- };
693
- if (requestMatchesEtag(options.request, etag)) {
694
- const { "Content-Type": _contentType, ...notModifiedHeaders } = headers;
695
- return new Response(null, {
696
- status: 304,
697
- headers: notModifiedHeaders
698
- });
699
- }
700
- const body = options.request.method.toUpperCase() === "HEAD" ? null : typeof options.content === "string" ? options.content : toDiscoveryBytes(options.content).buffer;
701
- return new Response(body, { headers });
980
+ const sha256 = options.sha256 ?? await sha256DocsDiscoveryContent(options.content);
981
+ return createDocsCacheableResponse({
982
+ request: options.request,
983
+ content: options.content,
984
+ sha256,
985
+ lastModified: options.lastModified,
986
+ headers: {
987
+ "Access-Control-Allow-Origin": "*",
988
+ "Access-Control-Expose-Headers": "Link",
989
+ Allow: "GET, HEAD",
990
+ "Cache-Control": DISCOVERY_CACHE_CONTROL,
991
+ "Content-Type": options.contentType,
992
+ Link: options.linkHeader,
993
+ "X-Robots-Tag": "noindex"
994
+ }
995
+ });
702
996
  }
703
997
  function standardsNotFoundResponse(request, linkHeader) {
704
998
  return new Response(request.method.toUpperCase() === "HEAD" ? null : "Not Found", {
@@ -728,7 +1022,7 @@ function standardsMethodNotAllowedResponse(linkHeader) {
728
1022
  });
729
1023
  }
730
1024
  /** Return one RFC 9727 or Agent Skills discovery response, or null for unrelated requests. */
731
- async function createDocsStandardsResponse({ request, apiCatalog, apiCatalogEnabled = true, apiRoute, preferredSkillDocument, fallbackSkillDocument, publishedSkills = [], agentCard }) {
1025
+ async function createDocsStandardsResponse({ request, apiCatalog, apiCatalogEnabled = true, apiRoute, preferredSkillDocument, fallbackSkillDocument, publishedSkills = [], agentCard, lastModified }) {
732
1026
  const resolved = resolveDocsStandardsDiscoveryRequest(new URL(request.url), { apiRoute });
733
1027
  if (!resolved) return null;
734
1028
  const linkHeader = getDocsDiscoveryLinkHeader({
@@ -742,7 +1036,8 @@ async function createDocsStandardsResponse({ request, apiCatalog, apiCatalogEnab
742
1036
  request,
743
1037
  content: `${JSON.stringify(apiCatalog, null, 2)}\n`,
744
1038
  contentType: `${API_CATALOG_MEDIA_TYPE}; profile="${API_CATALOG_PROFILE_URI}"; charset=utf-8`,
745
- linkHeader
1039
+ linkHeader,
1040
+ lastModified
746
1041
  });
747
1042
  const skills = [await resolveDocsPublishedAgentSkill({
748
1043
  preferredDocument: preferredSkillDocument,
@@ -762,6 +1057,7 @@ async function createDocsStandardsResponse({ request, apiCatalog, apiCatalogEnab
762
1057
  content: file?.content ?? skill.content,
763
1058
  contentType: file ? "text/markdown; charset=utf-8" : skill.type === "archive" ? "application/gzip" : "text/markdown; charset=utf-8",
764
1059
  sha256: file?.sha256 ?? skill.sha256,
1060
+ lastModified,
765
1061
  linkHeader: [linkHeader, formatLinkTarget(DEFAULT_AGENT_SKILLS_INDEX_ROUTE, "collection", { type: "application/json" })].join(", ")
766
1062
  });
767
1063
  }
@@ -773,6 +1069,7 @@ async function createDocsStandardsResponse({ request, apiCatalog, apiCatalogEnab
773
1069
  content: skill.content,
774
1070
  contentType: "application/gzip",
775
1071
  sha256: skill.sha256,
1072
+ lastModified,
776
1073
  linkHeader: [linkHeader, formatLinkTarget(DEFAULT_AGENT_SKILLS_INDEX_ROUTE, "collection", { type: "application/json" })].join(", ")
777
1074
  });
778
1075
  }
@@ -787,6 +1084,7 @@ async function createDocsStandardsResponse({ request, apiCatalog, apiCatalogEnab
787
1084
  content: file.content,
788
1085
  contentType: `${file.mediaType}${file.mediaType.startsWith("text/") ? "; charset=utf-8" : ""}`,
789
1086
  sha256: file.sha256,
1087
+ lastModified,
790
1088
  linkHeader: [linkHeader, formatLinkTarget(DEFAULT_AGENT_SKILLS_INDEX_ROUTE, "collection", { type: "application/json" })].join(", ")
791
1089
  });
792
1090
  }
@@ -796,22 +1094,25 @@ async function createDocsStandardsResponse({ request, apiCatalog, apiCatalogEnab
796
1094
  request,
797
1095
  content: `${JSON.stringify(buildDocsA2AAgentCard(agentCard, skills), null, 2)}\n`,
798
1096
  contentType: "application/json; charset=utf-8",
799
- linkHeader
1097
+ linkHeader,
1098
+ lastModified
800
1099
  });
801
1100
  }
802
1101
  if (resolved.kind === "legacy-skills-index") return createHashedDiscoveryResponse({
803
1102
  request,
804
1103
  content: `${JSON.stringify(buildDocsLegacySkillsIndex(skills), null, 2)}\n`,
805
1104
  contentType: "application/json; charset=utf-8",
806
- linkHeader
1105
+ linkHeader,
1106
+ lastModified
807
1107
  });
808
1108
  return createHashedDiscoveryResponse({
809
1109
  request,
810
1110
  content: `${JSON.stringify(buildDocsAgentSkillsIndex(skills), null, 2)}\n`,
811
1111
  contentType: "application/json; charset=utf-8",
1112
+ lastModified,
812
1113
  linkHeader: [linkHeader, ...skills.map((skill) => formatLinkTarget(skill.url, "item", { type: skill.type === "archive" ? "application/gzip" : "text/markdown" }))].join(", ")
813
1114
  });
814
1115
  }
815
1116
 
816
1117
  //#endregion
817
- export { buildDocsLegacySkillsIndex as A, DOCS_AGENT_MANIFEST_SCHEMA_MEDIA_TYPE as C, buildDocsA2AAgentCard as D, appendDocsDiscoveryLinkHeader as E, isDocsStandardsDiscoveryRequest as F, resolveDocsDiscoveryApiRoute as I, resolveDocsPublishedAgentSkill as L, createDocsStandardsResponse as M, getDocsAgentManifestLinkHeader as N, buildDocsAgentSkillsIndex as O, getDocsDiscoveryLinkHeader as P, resolveDocsStandardsDiscoveryRequest as R, DOCS_AGENT_MANIFEST_FORMAT as S, DOCS_AGENT_MANIFEST_VERSION as T, DEFAULT_API_CATALOG_FORMAT as _, DEFAULT_A2A_AGENT_CARD_ROUTE as a, DEFAULT_LEGACY_SKILLS_INDEX_ROUTE as b, DEFAULT_AGENT_SKILLS_ARCHIVE_ROUTE_PATTERN as c, DEFAULT_AGENT_SKILLS_ROUTE_PATTERN as d, DEFAULT_AGENT_SKILLS_ROUTE_PREFIX as f, DEFAULT_AGENT_SKILL_RESOURCE_FORMAT as g, DEFAULT_AGENT_SKILL_FORMAT as h, DEFAULT_A2A_AGENT_CARD_FORMAT as i, buildDocsPublishedAgentSkill as j, buildDocsApiCatalog as k, DEFAULT_AGENT_SKILLS_INDEX_FORMAT as l, DEFAULT_AGENT_SKILL_FILE_FORMAT as m, API_CATALOG_MEDIA_TYPE as n, DEFAULT_A2A_PROTOCOL_BINDING as o, DEFAULT_AGENT_SKILL_ARCHIVE_FORMAT as p, API_CATALOG_PROFILE_URI as r, DEFAULT_A2A_PROTOCOL_VERSION as s, AGENT_SKILLS_DISCOVERY_SCHEMA_URI as t, DEFAULT_AGENT_SKILLS_INDEX_ROUTE as u, DEFAULT_API_CATALOG_ROUTE as v, DOCS_AGENT_MANIFEST_SCHEMA_URI as w, DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX as x, DEFAULT_LEGACY_SKILLS_INDEX_FORMAT as y, sha256DocsDiscoveryContent as z };
1118
+ export { buildDocsLegacySkillsIndex as A, createDocsCacheableResponse as B, DOCS_AGENT_MANIFEST_SCHEMA_MEDIA_TYPE as C, buildDocsA2AAgentCard as D, appendDocsDiscoveryLinkHeader as E, isDocsStandardsDiscoveryRequest as F, digestDocsContent as G, requestHasFreshDocsDate as H, resolveDocsDiscoveryApiRoute as I, sha256DocsContent as J, digestDocsRetrievalContent as K, resolveDocsPublishedAgentSkill as L, createDocsStandardsResponse as M, getDocsAgentManifestLinkHeader as N, buildDocsAgentSkillsIndex as O, getDocsDiscoveryLinkHeader as P, resolveDocsStandardsDiscoveryRequest as R, DOCS_AGENT_MANIFEST_FORMAT as S, DOCS_AGENT_MANIFEST_VERSION as T, requestMatchesDocsEtag as U, formatDocsContentDigest as V, resolveDocsHttpDate as W, DEFAULT_API_CATALOG_FORMAT as _, DEFAULT_A2A_AGENT_CARD_ROUTE as a, DEFAULT_LEGACY_SKILLS_INDEX_ROUTE as b, DEFAULT_AGENT_SKILLS_ARCHIVE_ROUTE_PATTERN as c, DEFAULT_AGENT_SKILLS_ROUTE_PATTERN as d, DEFAULT_AGENT_SKILLS_ROUTE_PREFIX as f, DEFAULT_AGENT_SKILL_RESOURCE_FORMAT as g, DEFAULT_AGENT_SKILL_FORMAT as h, DEFAULT_A2A_AGENT_CARD_FORMAT as i, buildDocsPublishedAgentSkill as j, buildDocsApiCatalog as k, DEFAULT_AGENT_SKILLS_INDEX_FORMAT as l, DEFAULT_AGENT_SKILL_FILE_FORMAT as m, API_CATALOG_MEDIA_TYPE as n, DEFAULT_A2A_PROTOCOL_BINDING as o, DEFAULT_AGENT_SKILL_ARCHIVE_FORMAT as p, isDocsRetrievalCanonicalUrl as q, API_CATALOG_PROFILE_URI as r, DEFAULT_A2A_PROTOCOL_VERSION as s, AGENT_SKILLS_DISCOVERY_SCHEMA_URI as t, DEFAULT_AGENT_SKILLS_INDEX_ROUTE as u, DEFAULT_API_CATALOG_ROUTE as v, DOCS_AGENT_MANIFEST_SCHEMA_URI as w, DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX as x, DEFAULT_LEGACY_SKILLS_INDEX_FORMAT as y, sha256DocsDiscoveryContent as z };
@@ -1,5 +1,5 @@
1
1
  import { c as fileExists, o as exec } from "./utils-DpiIioYb.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-n5AFur8a.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-B3PJ6IDr.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.2.84",
3
+ "version": "0.2.87",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "keywords": [
6
6
  "docs",
File without changes