@farm.js/core 0.1.31 → 0.1.35

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 (352) hide show
  1. package/README.md +1 -1
  2. package/dist/agent-runtime.cjs +70 -15
  3. package/dist/agent-runtime.d.mts +4 -5
  4. package/dist/agent-runtime.d.ts +4 -5
  5. package/dist/agent-runtime.mjs +59 -4
  6. package/dist/api/route-manager.cjs +17 -14
  7. package/dist/api/route-manager.d.mts +6 -7
  8. package/dist/api/route-manager.d.ts +6 -7
  9. package/dist/api/route-manager.mjs +16 -13
  10. package/dist/api/runtime.cjs +12 -8
  11. package/dist/api/runtime.d.mts +4 -5
  12. package/dist/api/runtime.d.ts +4 -5
  13. package/dist/api/runtime.mjs +12 -8
  14. package/dist/api.cjs +20 -17
  15. package/dist/api.d.mts +7 -8
  16. package/dist/api.d.ts +7 -8
  17. package/dist/api.mjs +19 -16
  18. package/dist/{app-sUJ3jnTZ.d.ts → app-BXB3JZYc.d.ts} +38 -12
  19. package/dist/{app-DAuUTIZf.d.mts → app-D_j9AAVL.d.mts} +38 -12
  20. package/dist/app-markdown.cjs +8 -6
  21. package/dist/app-markdown.d.mts +6 -7
  22. package/dist/app-markdown.d.ts +6 -7
  23. package/dist/app-markdown.mjs +7 -5
  24. package/dist/cache.cjs +2 -2
  25. package/dist/cache.d.mts +10 -1
  26. package/dist/cache.d.ts +10 -1
  27. package/dist/cache.mjs +1 -1
  28. package/dist/{chunk-BXFWA23T.mjs → chunk-22LTEMGQ.mjs} +3 -3
  29. package/dist/{chunk-YZTASLPQ.cjs → chunk-27ZWSI3W.cjs} +2 -2
  30. package/dist/{chunk-WBIH66JK.mjs → chunk-2ELDTQRN.mjs} +5 -2
  31. package/dist/{chunk-K7CELQLK.cjs → chunk-2F2ER724.cjs} +54 -29
  32. package/dist/{chunk-O3DTUAX2.mjs → chunk-2G2NNLE2.mjs} +6 -77
  33. package/dist/{chunk-NRVGEI5I.mjs → chunk-2NNMOPDN.mjs} +4 -210
  34. package/dist/{chunk-CTV2TTNP.cjs → chunk-3BHT4WMP.cjs} +16 -87
  35. package/dist/chunk-3BU22U3M.cjs +237 -0
  36. package/dist/{chunk-MM5D6VLP.mjs → chunk-3KZS4SUS.mjs} +33 -14
  37. package/dist/{chunk-VA62MHFV.mjs → chunk-3PXS2MHU.mjs} +1 -1
  38. package/dist/chunk-3SDFA7UF.cjs +701 -0
  39. package/dist/{chunk-4IEPYMHF.mjs → chunk-3UEVPCGW.mjs} +1 -1
  40. package/dist/{chunk-MXDTKXO6.cjs → chunk-3UH7MRCP.cjs} +73 -26
  41. package/dist/{chunk-7QOCTYBS.mjs → chunk-4JHOT46A.mjs} +37 -1
  42. package/dist/{chunk-6L6DQR5W.mjs → chunk-4KU5Q7C2.mjs} +917 -305
  43. package/dist/{chunk-3FCFQP5V.cjs → chunk-4MMGO7YW.cjs} +25 -25
  44. package/dist/{chunk-5HGR3W6O.mjs → chunk-5SJWVY6R.mjs} +8 -0
  45. package/dist/{chunk-KZLND3D2.cjs → chunk-62XKI4Z3.cjs} +7 -5
  46. package/dist/{chunk-FJZ3DQLK.mjs → chunk-6DU6UFUE.mjs} +13 -12
  47. package/dist/{chunk-TEN4FIZU.mjs → chunk-6ETPZTJI.mjs} +513 -3
  48. package/dist/{chunk-VUMAE7NC.mjs → chunk-6TJOML4E.mjs} +92 -31
  49. package/dist/{chunk-3ATMYLLJ.mjs → chunk-6WCPV6G2.mjs} +1 -1
  50. package/dist/{chunk-FYRBX5IY.cjs → chunk-73MC7ZL6.cjs} +2 -2
  51. package/dist/chunk-75RZHGLS.cjs +135 -0
  52. package/dist/{chunk-QZRVZSPN.cjs → chunk-77GNHH2Z.cjs} +3 -3
  53. package/dist/{chunk-FXUUWYAX.cjs → chunk-7GLPRTTF.cjs} +12 -2
  54. package/dist/{chunk-A777V5WU.cjs → chunk-7L5V3KQO.cjs} +2 -2
  55. package/dist/{chunk-4ZQQL4IU.mjs → chunk-AHGECQEW.mjs} +1 -1
  56. package/dist/{chunk-RG3ZOTG5.cjs → chunk-AI7QMY7O.cjs} +10 -3
  57. package/dist/{chunk-YMCXWPWK.mjs → chunk-BCMSYSN2.mjs} +4 -1
  58. package/dist/{chunk-I6XDAKWQ.mjs → chunk-BTHHUD7Q.mjs} +14 -0
  59. package/dist/{chunk-LI2LMOLR.mjs → chunk-C35ZBVRD.mjs} +12 -3
  60. package/dist/chunk-C4SPBWFM.cjs +26 -0
  61. package/dist/{chunk-YQVSHTMR.mjs → chunk-CP6X4AEU.mjs} +1 -1
  62. package/dist/{chunk-QZCT2CQ4.mjs → chunk-CXEN47J3.mjs} +64 -2
  63. package/dist/{chunk-WNLBF77X.cjs → chunk-D227TIEN.cjs} +28 -16
  64. package/dist/{chunk-ROUTX2E5.cjs → chunk-DBNKI4NF.cjs} +12 -3
  65. package/dist/{chunk-J3LOGE4T.cjs → chunk-DQQOKWYA.cjs} +5 -5
  66. package/dist/chunk-E5GNDG5F.mjs +701 -0
  67. package/dist/{chunk-X7KZBF63.cjs → chunk-EFCQPQMG.cjs} +40 -4
  68. package/dist/{chunk-K3F2E6GS.cjs → chunk-EJQT6KZN.cjs} +2 -2
  69. package/dist/{chunk-3LUF2PE2.cjs → chunk-EK4QAEFZ.cjs} +67 -5
  70. package/dist/{chunk-VVBO3QH7.mjs → chunk-ENLZ4R3Y.mjs} +10 -1
  71. package/dist/{chunk-KJ2TIHZZ.cjs → chunk-EUV4YR3V.cjs} +3 -2
  72. package/dist/{chunk-E76XC6ZG.mjs → chunk-EZDQRNQ7.mjs} +2 -2
  73. package/dist/{chunk-TOVMYGYW.mjs → chunk-F2SE2VDO.mjs} +1 -1
  74. package/dist/{chunk-MNUGPHLN.mjs → chunk-F6Z3Y5KL.mjs} +5 -3
  75. package/dist/{chunk-DFLLARUK.cjs → chunk-F7JZENPF.cjs} +35 -34
  76. package/dist/{chunk-BSPQVJ4A.mjs → chunk-FDR64H6B.mjs} +13 -0
  77. package/dist/{chunk-5OVTOKGH.cjs → chunk-FFFW3OQ7.cjs} +2 -2
  78. package/dist/{chunk-D4JE5NNV.cjs → chunk-FNO7A7CM.cjs} +5 -5
  79. package/dist/{chunk-Z5HIWVDP.cjs → chunk-FTFYRMQQ.cjs} +80 -91
  80. package/dist/chunk-FZ6YYU2W.mjs +65 -0
  81. package/dist/{chunk-X7WVQMIB.mjs → chunk-G5RT7EXW.mjs} +11 -5
  82. package/dist/{chunk-IXUY2F5U.mjs → chunk-GCXWJJKH.mjs} +4 -7
  83. package/dist/{chunk-ES4B2IXW.cjs → chunk-GFHLGIYC.cjs} +8 -8
  84. package/dist/{chunk-SORB3MAR.cjs → chunk-GQ3Z3IZI.cjs} +17 -17
  85. package/dist/{chunk-75WGQVQA.cjs → chunk-HITLGIAO.cjs} +10 -1
  86. package/dist/{chunk-HBTUGXHS.cjs → chunk-HLJ6MBUZ.cjs} +7 -4
  87. package/dist/{chunk-JLCQGPXE.mjs → chunk-HMIJDL7S.mjs} +51 -62
  88. package/dist/{chunk-F6XEGFHO.mjs → chunk-HUMR6LSU.mjs} +11 -1
  89. package/dist/{chunk-IMB4PIAR.cjs → chunk-ICUQICNC.cjs} +1441 -828
  90. package/dist/{chunk-ZCU4NZ3M.cjs → chunk-IE7XCHH3.cjs} +4 -4
  91. package/dist/{chunk-I26CZYPV.cjs → chunk-IHNIDL6H.cjs} +50 -7
  92. package/dist/{chunk-2FQHH5SC.mjs → chunk-IHNMMXHV.mjs} +49 -24
  93. package/dist/{chunk-YVGAEAA5.cjs → chunk-IPXLADVO.cjs} +522 -12
  94. package/dist/{chunk-VHJGDMCG.cjs → chunk-IWZKTWHZ.cjs} +2 -2
  95. package/dist/chunk-JG6DJF5A.mjs +238 -0
  96. package/dist/{chunk-KROWKCUH.cjs → chunk-JGLC4TO3.cjs} +8 -1
  97. package/dist/{chunk-5TISYEQF.mjs → chunk-JM5XPKWH.mjs} +10 -3
  98. package/dist/{chunk-BJJATPEC.mjs → chunk-KN7K4VQN.mjs} +1 -1
  99. package/dist/{chunk-WPYFSQKK.cjs → chunk-KNBBQHO2.cjs} +15 -1
  100. package/dist/{chunk-XWAWFQFS.cjs → chunk-KXWRO25S.cjs} +7 -4
  101. package/dist/chunk-LSKZMJMP.cjs +65 -0
  102. package/dist/{chunk-2N5PX3LS.mjs → chunk-LYV44OIR.mjs} +7 -1
  103. package/dist/chunk-M7MKQXAF.cjs +87 -0
  104. package/dist/{chunk-IV6CQY7O.mjs → chunk-MSSFIQGM.mjs} +63 -13
  105. package/dist/{chunk-KH7BN726.cjs → chunk-N4UOK6ZI.cjs} +8 -2
  106. package/dist/{chunk-JNGIWIY6.mjs → chunk-NPC7VWJE.mjs} +2 -2
  107. package/dist/chunk-NRDBW4MP.mjs +45 -0
  108. package/dist/{chunk-ILWLPEVO.mjs → chunk-NRSN7G7E.mjs} +2 -2
  109. package/dist/chunk-OFZUJMCU.mjs +601 -0
  110. package/dist/{chunk-L4DVIHOC.mjs → chunk-OKZUAXHF.mjs} +1 -1
  111. package/dist/{chunk-EM6SBQKM.cjs → chunk-OMVAU7NT.cjs} +27 -2
  112. package/dist/{chunk-AHAJGAYD.mjs → chunk-PDOCJ6RY.mjs} +2 -2
  113. package/dist/{chunk-IFI5FXEZ.cjs → chunk-PFQKNERH.cjs} +562 -251
  114. package/dist/{chunk-S5GDHOE4.mjs → chunk-PZNL3WEG.mjs} +48 -5
  115. package/dist/{chunk-GZYH4OER.mjs → chunk-Q3VLETLE.mjs} +2 -2
  116. package/dist/{chunk-WG2KHOMN.mjs → chunk-QAU5JD57.mjs} +571 -260
  117. package/dist/{chunk-FV45CKBC.mjs → chunk-QCFBDFRS.mjs} +1 -1
  118. package/dist/{chunk-75BRBIFP.cjs → chunk-QCVE2OCI.cjs} +5 -8
  119. package/dist/{chunk-6ZCMSZ5U.mjs → chunk-QE6VAKLT.mjs} +1 -1
  120. package/dist/{chunk-QG5HNS7P.mjs → chunk-QORUJDIV.mjs} +2 -2
  121. package/dist/chunk-RHAZ22ZN.mjs +87 -0
  122. package/dist/{chunk-CUMINO7Z.cjs → chunk-RU3M2FIK.cjs} +18 -14
  123. package/dist/{chunk-DGXN3L4D.mjs → chunk-SAZVVAJH.mjs} +5 -5
  124. package/dist/{chunk-MKMBQSNQ.mjs → chunk-SC2WYWPF.mjs} +3 -3
  125. package/dist/{chunk-QCFFHV5H.mjs → chunk-SMHH4VDG.mjs} +1 -1
  126. package/dist/{chunk-UAFSBWNT.mjs → chunk-SOMHP6GF.mjs} +63 -16
  127. package/dist/{chunk-ND224OE2.cjs → chunk-TKSCR644.cjs} +34 -15
  128. package/dist/{chunk-4V7GIE2U.mjs → chunk-UAORZ7QA.mjs} +3 -3
  129. package/dist/{chunk-IQXFRNY2.cjs → chunk-UFDAAQFX.cjs} +2 -2
  130. package/dist/{chunk-6VYZOPOT.mjs → chunk-UJD4PHYB.mjs} +15 -11
  131. package/dist/{chunk-ZHVYQL3H.cjs → chunk-ULAWS2PA.cjs} +97 -36
  132. package/dist/{chunk-5ZSWG4UX.cjs → chunk-UXFQ3UDA.cjs} +14 -1
  133. package/dist/{chunk-MPEYMSCF.cjs → chunk-VFQT3LAO.cjs} +5 -5
  134. package/dist/{chunk-2FXWWUE5.cjs → chunk-VZJR7UTG.cjs} +6 -6
  135. package/dist/{chunk-2AKFKCHA.mjs → chunk-W7LF2J2S.mjs} +1 -1
  136. package/dist/chunk-WWFTAUFG.cjs +45 -0
  137. package/dist/{chunk-JBC2FKRW.mjs → chunk-WWIKMBRN.mjs} +2 -1
  138. package/dist/{chunk-75DYEVXI.cjs → chunk-X6W5FFH6.cjs} +11 -11
  139. package/dist/{chunk-EXLKRR4U.cjs → chunk-XBML5KMG.cjs} +12 -12
  140. package/dist/{chunk-PZNCMPJF.cjs → chunk-XCACDAZZ.cjs} +18 -12
  141. package/dist/{chunk-JATSG2ZO.mjs → chunk-XCMCS4DA.mjs} +15 -3
  142. package/dist/{chunk-UJ2C4ICS.cjs → chunk-XJXBIP67.cjs} +4 -4
  143. package/dist/{chunk-XF7Q24PF.mjs → chunk-Y7RKTKYI.mjs} +25 -0
  144. package/dist/{chunk-VYZSOYR4.cjs → chunk-YC6V7PWE.cjs} +1 -1
  145. package/dist/{chunk-F6OHXPWR.mjs → chunk-YFILVET3.mjs} +8 -1
  146. package/dist/{chunk-JLRDISQL.cjs → chunk-YKX5BK66.cjs} +7 -7
  147. package/dist/{chunk-DYEJQTDN.cjs → chunk-YSCV4SJF.cjs} +4 -4
  148. package/dist/chunk-YSLWRWWP.cjs +601 -0
  149. package/dist/{chunk-5LJCOSKT.mjs → chunk-YULD7ICZ.mjs} +1 -1
  150. package/dist/{chunk-2SDO73HK.cjs → chunk-YWN746US.cjs} +64 -14
  151. package/dist/chunk-Z2HLU4IX.cjs +238 -0
  152. package/dist/chunk-ZLAT2CWY.mjs +135 -0
  153. package/dist/{chunk-T5CERMEH.cjs → chunk-ZXGAFZDO.cjs} +2 -2
  154. package/dist/{client-plugins-BX2ptm4H.d.mts → client-plugins-CvIslxWi.d.mts} +232 -8
  155. package/dist/{client-plugins-BmxM5KW_.d.ts → client-plugins-HIyulDym.d.ts} +232 -8
  156. package/dist/client-plugins.d.mts +4 -5
  157. package/dist/client-plugins.d.ts +4 -5
  158. package/dist/client.cjs +10 -10
  159. package/dist/client.d.mts +8 -9
  160. package/dist/client.d.ts +8 -9
  161. package/dist/client.mjs +9 -9
  162. package/dist/config.d.mts +4 -5
  163. package/dist/config.d.ts +4 -5
  164. package/dist/{devtools-EWRDHCD5.cjs → devtools-EAUY43BS.cjs} +14 -12
  165. package/dist/{devtools-BPBCYOU6.mjs → devtools-EE5RIBTH.mjs} +13 -11
  166. package/dist/docs.cjs +17 -15
  167. package/dist/docs.d.mts +46 -4
  168. package/dist/docs.d.ts +46 -4
  169. package/dist/docs.mjs +16 -14
  170. package/dist/environment/vite.cjs +2 -2
  171. package/dist/environment/vite.mjs +1 -1
  172. package/dist/headers.cjs +4 -4
  173. package/dist/headers.mjs +3 -3
  174. package/dist/i18n/client.cjs +14 -13
  175. package/dist/i18n/client.d.mts +2 -2
  176. package/dist/i18n/client.d.ts +2 -2
  177. package/dist/i18n/client.mjs +5 -4
  178. package/dist/i18n/index.cjs +3 -2
  179. package/dist/i18n/index.d.mts +3 -3
  180. package/dist/i18n/index.d.ts +3 -3
  181. package/dist/i18n/index.mjs +2 -1
  182. package/dist/i18n/server.cjs +6 -5
  183. package/dist/i18n/server.d.mts +5 -5
  184. package/dist/i18n/server.d.ts +5 -5
  185. package/dist/i18n/server.mjs +5 -4
  186. package/dist/image/server.cjs +3 -3
  187. package/dist/image/server.mjs +2 -2
  188. package/dist/image/sharp.cjs +10 -10
  189. package/dist/image/sharp.mjs +2 -2
  190. package/dist/{index-a-8Z5kZU.d.mts → index-BJJfLxJo.d.mts} +2 -2
  191. package/dist/{index-BWVfxIsO.d.ts → index-CwoOP-MW.d.ts} +2 -2
  192. package/dist/index.cjs +75 -60
  193. package/dist/index.d.mts +21 -22
  194. package/dist/index.d.ts +21 -22
  195. package/dist/index.mjs +79 -64
  196. package/dist/integrations.cjs +7 -4
  197. package/dist/integrations.d.mts +4 -5
  198. package/dist/integrations.d.ts +4 -5
  199. package/dist/integrations.mjs +8 -5
  200. package/dist/internal/app-markdown-runtime.cjs +7 -5
  201. package/dist/internal/app-markdown-runtime.d.mts +17 -7
  202. package/dist/internal/app-markdown-runtime.d.ts +17 -7
  203. package/dist/internal/app-markdown-runtime.mjs +6 -4
  204. package/dist/internal/build-runtime.cjs +44 -41
  205. package/dist/internal/build-runtime.d.mts +6 -7
  206. package/dist/internal/build-runtime.d.ts +6 -7
  207. package/dist/internal/build-runtime.mjs +43 -40
  208. package/dist/internal/cli-runtime.cjs +23 -20
  209. package/dist/internal/cli-runtime.mjs +22 -19
  210. package/dist/internal/client-error-overlay.cjs +6 -6
  211. package/dist/internal/client-error-overlay.mjs +2 -2
  212. package/dist/internal/client-runtime.cjs +5 -3
  213. package/dist/internal/client-runtime.d.mts +9 -1
  214. package/dist/internal/client-runtime.d.ts +9 -1
  215. package/dist/internal/client-runtime.mjs +4 -2
  216. package/dist/internal/compression-runtime.d.mts +4 -5
  217. package/dist/internal/compression-runtime.d.ts +4 -5
  218. package/dist/internal/config-runtime.cjs +14 -12
  219. package/dist/internal/config-runtime.d.mts +5 -6
  220. package/dist/internal/config-runtime.d.ts +5 -6
  221. package/dist/internal/config-runtime.mjs +13 -11
  222. package/dist/internal/infra-analytics-runtime.cjs +4 -4
  223. package/dist/internal/infra-analytics-runtime.mjs +2 -2
  224. package/dist/internal/isolated-boundary.cjs +3 -2
  225. package/dist/internal/isolated-boundary.d.mts +1 -0
  226. package/dist/internal/isolated-boundary.d.ts +1 -0
  227. package/dist/internal/isolated-boundary.mjs +2 -1
  228. package/dist/internal/metadata-image-runtime.cjs +3 -3
  229. package/dist/internal/metadata-image-runtime.mjs +2 -2
  230. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  231. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  232. package/dist/internal/production-runtime.cjs +61 -31
  233. package/dist/internal/production-runtime.d.mts +165 -18
  234. package/dist/internal/production-runtime.d.ts +165 -18
  235. package/dist/internal/production-runtime.mjs +57 -27
  236. package/dist/internal/request-cookies.cjs +4 -2
  237. package/dist/internal/request-cookies.d.mts +9 -1
  238. package/dist/internal/request-cookies.d.ts +9 -1
  239. package/dist/internal/request-cookies.mjs +3 -1
  240. package/dist/internal/server-tree.cjs +12 -0
  241. package/dist/internal/server-tree.d.mts +27 -0
  242. package/dist/internal/server-tree.d.ts +27 -0
  243. package/dist/internal/server-tree.mjs +12 -0
  244. package/dist/markdown.cjs +4 -4
  245. package/dist/markdown.d.mts +4 -5
  246. package/dist/markdown.d.ts +4 -5
  247. package/dist/markdown.mjs +3 -3
  248. package/dist/{metadata-DsEaK7mQ.d.mts → metadata-BnLDsUOS.d.ts} +16 -2
  249. package/dist/{metadata-fwZ3gfG6.d.ts → metadata-WGpBYcGn.d.mts} +16 -2
  250. package/dist/middleware.cjs +18 -8
  251. package/dist/middleware.d.mts +27 -9
  252. package/dist/middleware.d.ts +27 -9
  253. package/dist/middleware.mjs +18 -8
  254. package/dist/navigation.cjs +7 -7
  255. package/dist/navigation.d.mts +7 -8
  256. package/dist/navigation.d.ts +7 -8
  257. package/dist/navigation.mjs +6 -6
  258. package/dist/{nitro-NAKCRVHX.mjs → nitro-MXRDCXWZ.mjs} +5 -5
  259. package/dist/{nitro-VYDZGYFY.cjs → nitro-OVPLKPE2.cjs} +7 -7
  260. package/dist/{observability-BupkiN0m.d.mts → observability-CoXunYhS.d.mts} +4 -3
  261. package/dist/{observability-BupkiN0m.d.ts → observability-CoXunYhS.d.ts} +4 -3
  262. package/dist/observability.d.mts +1 -1
  263. package/dist/observability.d.ts +1 -1
  264. package/dist/plugin.cjs +39 -36
  265. package/dist/plugin.d.mts +4 -5
  266. package/dist/plugin.d.ts +4 -5
  267. package/dist/plugin.mjs +38 -35
  268. package/dist/{production-runtime-Baqgwtvc.d.mts → production-runtime-0sRnuYc-.d.mts} +11 -4
  269. package/dist/{production-runtime-DNkpFnmg.d.ts → production-runtime-Crq6CJ-2.d.ts} +11 -4
  270. package/dist/query/client.cjs +8 -8
  271. package/dist/query/client.mjs +4 -4
  272. package/dist/{render-plan-rkIK9wd9.d.ts → render-plan-8ozZh2Qv.d.ts} +1 -1
  273. package/dist/{render-plan-DhwQnmmX.d.mts → render-plan-gs9GGPzw.d.mts} +1 -1
  274. package/dist/renderer/react/server.cjs +10 -4
  275. package/dist/renderer/react/server.d.mts +2 -1
  276. package/dist/renderer/react/server.d.ts +2 -1
  277. package/dist/renderer/react/server.mjs +7 -1
  278. package/dist/renderer-client.cjs +40 -20
  279. package/dist/renderer-client.d.mts +6 -7
  280. package/dist/renderer-client.d.ts +6 -7
  281. package/dist/renderer-client.mjs +29 -9
  282. package/dist/renderer.d.mts +2 -0
  283. package/dist/renderer.d.ts +2 -0
  284. package/dist/{request-BcY4RYPC.d.ts → request-B5G8rLBH.d.ts} +7 -2
  285. package/dist/{request-CFy1BltJ.d.mts → request-fkhiynXe.d.mts} +7 -2
  286. package/dist/request.cjs +2 -2
  287. package/dist/request.d.mts +5 -6
  288. package/dist/request.d.ts +5 -6
  289. package/dist/request.mjs +1 -1
  290. package/dist/{resolver-PPEeiJ6M.d.ts → resolver-DadfRL6F.d.ts} +1 -1
  291. package/dist/{resolver-DhW0CqZN.d.mts → resolver-khasx3fU.d.mts} +1 -1
  292. package/dist/{route-rendering-BkS0TBlB.d.mts → route-rendering-CLnS7AZj.d.mts} +1 -1
  293. package/dist/{route-rendering-D4XpMjam.d.ts → route-rendering-lS5nUMua.d.ts} +1 -1
  294. package/dist/{router-Cq7BcZxg.d.ts → router-4iuiYnOW.d.ts} +1 -1
  295. package/dist/{router-C4zPlC3V.d.mts → router-ifU8Dui1.d.mts} +1 -1
  296. package/dist/routes.cjs +3 -3
  297. package/dist/routes.d.mts +4 -5
  298. package/dist/routes.d.ts +4 -5
  299. package/dist/routes.mjs +2 -2
  300. package/dist/{runtime-BirxPwbZ.d.ts → runtime-BgDQzBiu.d.ts} +2 -2
  301. package/dist/{runtime-AOJge4vQ.d.mts → runtime-CV2UCV-5.d.mts} +2 -2
  302. package/dist/server-action-security.cjs +3 -3
  303. package/dist/server-action-security.mjs +2 -2
  304. package/dist/server-fn.cjs +5 -5
  305. package/dist/server-fn.mjs +4 -4
  306. package/dist/server-plugins.cjs +4 -4
  307. package/dist/server-plugins.d.mts +5 -6
  308. package/dist/server-plugins.d.ts +5 -6
  309. package/dist/server-plugins.mjs +3 -3
  310. package/dist/server-query-client.cjs +3 -3
  311. package/dist/server-query-client.mjs +2 -2
  312. package/dist/server-query.cjs +6 -6
  313. package/dist/server-query.mjs +5 -5
  314. package/dist/server.cjs +66 -63
  315. package/dist/server.d.mts +13 -14
  316. package/dist/server.d.ts +13 -14
  317. package/dist/server.mjs +43 -40
  318. package/dist/{spa-router-DzPZH-AO.d.mts → spa-router-Bq7VCOwx.d.mts} +3 -3
  319. package/dist/{spa-router-B1HI3X9k.d.ts → spa-router-DaJk5Re4.d.ts} +3 -3
  320. package/dist/testing.cjs +22 -20
  321. package/dist/testing.d.mts +4 -5
  322. package/dist/testing.d.ts +4 -5
  323. package/dist/testing.mjs +18 -16
  324. package/dist/theme/server.cjs +4 -3
  325. package/dist/theme/server.mjs +3 -2
  326. package/dist/{types-Z0aotQ8w.d.mts → types-CnH8DOqo.d.mts} +1 -1
  327. package/dist/{types-Z0aotQ8w.d.ts → types-CnH8DOqo.d.ts} +1 -1
  328. package/dist/{utils-DMD1Hzta.d.ts → utils-BXLmFsVR.d.ts} +1 -1
  329. package/dist/{utils-CEBktlBG.d.mts → utils-XJn0c9bj.d.mts} +1 -1
  330. package/dist/version.cjs +2 -2
  331. package/dist/version.mjs +1 -1
  332. package/dist/vite.cjs +39 -36
  333. package/dist/vite.d.mts +4 -5
  334. package/dist/vite.d.ts +4 -5
  335. package/dist/vite.mjs +38 -35
  336. package/dist/{workflows-CR9ex-gz.d.ts → workflows-jZ4BcdoZ.d.mts} +1 -1
  337. package/dist/{workflows-CR9ex-gz.d.mts → workflows-jZ4BcdoZ.d.ts} +1 -1
  338. package/dist/workflows.cjs +3 -3
  339. package/dist/workflows.d.mts +1 -1
  340. package/dist/workflows.d.ts +1 -1
  341. package/dist/workflows.mjs +2 -2
  342. package/package.json +10 -2
  343. package/dist/chunk-22GUSVNJ.cjs +0 -351
  344. package/dist/chunk-5MKEDGLD.cjs +0 -53
  345. package/dist/chunk-O6XNAMBV.mjs +0 -53
  346. package/dist/chunk-SWN467MP.cjs +0 -18
  347. package/dist/chunk-XGC343EY.cjs +0 -443
  348. package/dist/chunk-ZSH2Y4LN.mjs +0 -351
  349. package/dist/types-DFbjpjXX.d.mts +0 -105
  350. package/dist/types-DFbjpjXX.d.ts +0 -105
  351. /package/dist/{chunk-SUIBNSNO.cjs → chunk-SJNMVDDF.cjs} +0 -0
  352. /package/dist/{chunk-LNZ7JZUS.mjs → chunk-UDNPLXW7.mjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveFarmI18nMessagePath
3
- } from "./chunk-YMCXWPWK.mjs";
3
+ } from "./chunk-BCMSYSN2.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-LPEX4YW6.mjs";
@@ -1,5 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
+ var _chunkAI7QMY7Ocjs = require('./chunk-AI7QMY7O.cjs');
4
+
5
+
3
6
 
4
7
  var _chunkBIDYX3SLcjs = require('./chunk-BIDYX3SL.cjs');
5
8
 
@@ -139,16 +142,10 @@ function readCookie(header, name) {
139
142
  for (const part of header.split(";")) {
140
143
  const separator = part.indexOf("=");
141
144
  if (separator < 0) continue;
142
- let key;
143
- try {
144
- key = decodeURIComponent(part.slice(0, separator).trim());
145
- } catch (e2) {
146
- continue;
147
- }
148
- if (key !== name) continue;
145
+ if (_chunkAI7QMY7Ocjs.decodeCookieName.call(void 0, part.slice(0, separator).trim()) !== name) continue;
149
146
  try {
150
147
  return decodeURIComponent(part.slice(separator + 1).trim());
151
- } catch (e3) {
148
+ } catch (e2) {
152
149
  return part.slice(separator + 1).trim();
153
150
  }
154
151
  }
@@ -2,7 +2,7 @@ import {
2
2
  attachRevalidationListeners,
3
3
  createServerQueryCallKey,
4
4
  fetchServerQuery
5
- } from "./chunk-2N5PX3LS.mjs";
5
+ } from "./chunk-LYV44OIR.mjs";
6
6
  import {
7
7
  getFarmClientDataCache
8
8
  } from "./chunk-XNPDONUH.mjs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useRouter
3
- } from "./chunk-MKMBQSNQ.mjs";
3
+ } from "./chunk-SC2WYWPF.mjs";
4
4
  import {
5
5
  getRouter
6
- } from "./chunk-JATSG2ZO.mjs";
6
+ } from "./chunk-XCMCS4DA.mjs";
7
7
  import {
8
8
  applyFarmBasePath
9
9
  } from "./chunk-4RB44K6Z.mjs";
@@ -0,0 +1,87 @@
1
+ import {
2
+ parseRoutePath
3
+ } from "./chunk-KI3MESHB.mjs";
4
+ import {
5
+ __name
6
+ } from "./chunk-LPEX4YW6.mjs";
7
+
8
+ // src/routing/route-slots.ts
9
+ var SLOT_SEGMENT = /^@([A-Za-z][A-Za-z0-9_-]*)$/;
10
+ function isRouteSlotSegment(segment) {
11
+ return SLOT_SEGMENT.test(segment);
12
+ }
13
+ __name(isRouteSlotSegment, "isRouteSlotSegment");
14
+ function parseRouteSlotFile(filePath) {
15
+ const normalized = filePath.replace(/\\/g, "/");
16
+ const parts = normalized.split("/").filter(Boolean);
17
+ const fileName = parts.at(-1) ?? "";
18
+ const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte)$/, "");
19
+ if (baseName !== "page" && baseName !== "default") return null;
20
+ const slotIndex = parts.findIndex((part) => SLOT_SEGMENT.test(part));
21
+ if (slotIndex < 0) return null;
22
+ if (parts.slice(slotIndex + 1, -1).some((part) => SLOT_SEGMENT.test(part))) {
23
+ throw new Error(`Nested route slots are not supported in "${filePath}"`);
24
+ }
25
+ const slotMatch = parts[slotIndex].match(SLOT_SEGMENT);
26
+ const name = slotMatch?.[1];
27
+ if (!name) return null;
28
+ const ownerParts = parts.slice(0, slotIndex);
29
+ const contentParts = parts.slice(slotIndex + 1, -1);
30
+ const marker = parseInterceptionMarker(contentParts[0]);
31
+ let targetBase = ownerParts;
32
+ let targetParts = contentParts;
33
+ if (marker) {
34
+ targetBase = marker.root === true ? [] : ownerParts.slice(0, Math.max(0, ownerParts.length - marker.up));
35
+ targetParts = [...marker.remainder ? [marker.remainder] : [], ...contentParts.slice(1)];
36
+ }
37
+ const ownerFile = [...ownerParts, "layout.tsx"].join("/");
38
+ const routeFile = [
39
+ ...baseName === "default" ? ownerParts : targetBase,
40
+ ...baseName === "default" ? [] : targetParts,
41
+ "page.tsx"
42
+ ].join("/");
43
+ return {
44
+ name,
45
+ ownerRoute: parseRoutePath(ownerFile || "layout.tsx"),
46
+ route: parseRoutePath(routeFile || "page.tsx"),
47
+ interception: marker !== null,
48
+ fallback: baseName === "default"
49
+ };
50
+ }
51
+ __name(parseRouteSlotFile, "parseRouteSlotFile");
52
+ function createRouteSlotContainerId(name, ownerPattern) {
53
+ const owner = ownerPattern === "/" ? "root" : ownerPattern.replace(/^\//, "").replace(/[^A-Za-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
54
+ return `__farm_slot_${name}_${owner || "root"}__`;
55
+ }
56
+ __name(createRouteSlotContainerId, "createRouteSlotContainerId");
57
+ function parseInterceptionMarker(segment) {
58
+ if (!segment) return null;
59
+ if (segment.startsWith("(...)")) {
60
+ return {
61
+ up: 0,
62
+ root: true,
63
+ remainder: segment.slice(5)
64
+ };
65
+ }
66
+ if (segment.startsWith("(.)")) {
67
+ return {
68
+ up: 0,
69
+ remainder: segment.slice(3)
70
+ };
71
+ }
72
+ let remainder = segment;
73
+ let up = 0;
74
+ while (remainder.startsWith("(..)")) {
75
+ up += 1;
76
+ remainder = remainder.slice(4);
77
+ }
78
+ return up > 0 ? { up, remainder } : null;
79
+ }
80
+ __name(parseInterceptionMarker, "parseInterceptionMarker");
81
+
82
+ export {
83
+ isRouteSlotSegment,
84
+ parseRouteSlotFile,
85
+ createRouteSlotContainerId,
86
+ parseInterceptionMarker
87
+ };
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkKJ2TIHZZcjs = require('./chunk-KJ2TIHZZ.cjs');
5
+ var _chunkEUV4YR3Vcjs = require('./chunk-EUV4YR3V.cjs');
6
6
 
7
7
 
8
8
  var _chunkJ63ZH5OQcjs = require('./chunk-J63ZH5OQ.cjs');
@@ -70,12 +70,12 @@ function collectFarmLlmsTxtPages(sources, options) {
70
70
  for (const source of sources) {
71
71
  const path = source.pattern;
72
72
  if (path.includes("[") || pages.has(path)) continue;
73
- if (include.length && !include.some((pattern) => _chunkKJ2TIHZZcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
73
+ if (include.length && !include.some((pattern) => _chunkEUV4YR3Vcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
74
74
  continue;
75
75
  }
76
- if (exclude.some((pattern) => _chunkKJ2TIHZZcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
76
+ if (exclude.some((pattern) => _chunkEUV4YR3Vcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
77
77
  if (isMetadataNoIndex(source.metadata)) continue;
78
- const target = _chunkKJ2TIHZZcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? _chunkKJ2TIHZZcjs.getFarmMarkdownMirrorPath.call(void 0, path) : path;
78
+ const target = _chunkEUV4YR3Vcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? _chunkEUV4YR3Vcjs.getFarmMarkdownMirrorPath.call(void 0, path) : path;
79
79
  const description = readMetadataString(source.metadata, "description");
80
80
  pages.set(path, {
81
81
  path,
@@ -100,21 +100,25 @@ function isMetadataNoIndex(metadata) {
100
100
  _chunkS3JO3N4Hcjs.__name.call(void 0, isMetadataNoIndex, "isMetadataNoIndex");
101
101
  function createFarmDefaultLlmsTxt(options) {
102
102
  const { config, pages } = options;
103
+ const mcp = _nullishCoalesce(options.mcp, () => ( []));
103
104
  const summary = _nullishCoalesce(config.summary, () => ( readMetadataString(options.rootMetadata, "description")));
104
105
  return {
105
106
  title: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(config.title, () => ( readMetadataTitle(options.rootMetadata))), () => ( _optionalChain([pages, 'access', _2 => _2.find, 'call', _3 => _3((page) => page.path === "/"), 'optionalAccess', _4 => _4.title]))), () => ( new URL(options.origin).host)),
106
107
  ...summary ? { summary } : {},
107
108
  ...config.details ? { details: config.details } : {},
108
- sections: pages.length ? [
109
- {
110
- title: "Pages",
111
- links: pages.map(({ title, url, description }) => ({
112
- title,
113
- url,
114
- ...description ? { description } : {}
115
- }))
116
- }
117
- ] : []
109
+ sections: [
110
+ ...pages.length ? [
111
+ {
112
+ title: "Pages",
113
+ links: pages.map(({ title, url, description }) => ({
114
+ title,
115
+ url,
116
+ ...description ? { description } : {}
117
+ }))
118
+ }
119
+ ] : [],
120
+ ...mcp.length ? [{ title: "MCP", links: mcp }] : []
121
+ ]
118
122
  };
119
123
  }
120
124
  _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmDefaultLlmsTxt, "createFarmDefaultLlmsTxt");
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-IOEH4VWN.mjs";
7
7
  import {
8
8
  APIRouteConflictError
9
- } from "./chunk-BXFWA23T.mjs";
9
+ } from "./chunk-22LTEMGQ.mjs";
10
10
  import {
11
11
  findProgrammaticRouteFilesInDir
12
- } from "./chunk-LNZ7JZUS.mjs";
12
+ } from "./chunk-UDNPLXW7.mjs";
13
13
  import {
14
14
  isFarmAPIRouteFileName
15
15
  } from "./chunk-CU625VAY.mjs";
@@ -20,7 +20,7 @@ import {
20
20
  matchAPIRouteAtBasePath,
21
21
  mergePluginAPIRoutes,
22
22
  resolveAPIRouteEndpoint
23
- } from "./chunk-X7WVQMIB.mjs";
23
+ } from "./chunk-G5RT7EXW.mjs";
24
24
  import {
25
25
  isProgrammaticRoutesFileName
26
26
  } from "./chunk-EA5K5BKU.mjs";
@@ -28,7 +28,7 @@ import {
28
28
  createFarmRequestBodyErrorResponse,
29
29
  readNodeRequestBody,
30
30
  resolveFarmServerConfig
31
- } from "./chunk-XF7Q24PF.mjs";
31
+ } from "./chunk-Y7RKTKYI.mjs";
32
32
  import {
33
33
  createCliColors
34
34
  } from "./chunk-I2BHUNBU.mjs";
@@ -44,7 +44,7 @@ import {
44
44
  } from "./chunk-Z2RZJZIZ.mjs";
45
45
  import {
46
46
  resolveFarmRequestURL
47
- } from "./chunk-BSPQVJ4A.mjs";
47
+ } from "./chunk-FDR64H6B.mjs";
48
48
  import {
49
49
  AmbiguousRouteError,
50
50
  assertUniqueRouteParameters,
@@ -7,10 +7,10 @@ import {
7
7
  notifyHistoryChange,
8
8
  readPageState,
9
9
  subscribeHistoryChange
10
- } from "./chunk-JATSG2ZO.mjs";
10
+ } from "./chunk-XCMCS4DA.mjs";
11
11
  import {
12
12
  getFarmI18nClientState
13
- } from "./chunk-TOVMYGYW.mjs";
13
+ } from "./chunk-F2SE2VDO.mjs";
14
14
  import {
15
15
  _resolveCurrentRequest
16
16
  } from "./chunk-IZY3V5XW.mjs";
@@ -196,7 +196,7 @@ function readRouterState(basePath, routeMatcher) {
196
196
  }
197
197
  const pathname = normalizeClientPathname(url.pathname, basePath);
198
198
  const i18n = getFarmI18nClientState();
199
- const routePathname = i18n ? stripFarmLocaleFromPathname(pathname, i18n) : pathname;
199
+ const routePathname = i18n ? stripFarmLocaleFromPathname(pathname, { ...i18n, basePath: "/" }) : pathname;
200
200
  return {
201
201
  pathname,
202
202
  searchParams: url.searchParams,
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-FP2INE7H.mjs";
7
7
  import {
8
8
  parseBodySizeLimit
9
- } from "./chunk-XF7Q24PF.mjs";
9
+ } from "./chunk-Y7RKTKYI.mjs";
10
10
  import {
11
11
  subscribeFarmCacheInvalidation,
12
12
  subscribeFarmCacheTask
@@ -3,17 +3,18 @@ import {
3
3
  loadFarmDocsPage,
4
4
  resolveFarmDocsContentDir,
5
5
  toFarmDocsMarkdownPage
6
- } from "./chunk-AHAJGAYD.mjs";
6
+ } from "./chunk-PDOCJ6RY.mjs";
7
7
  import {
8
8
  docsEngine,
9
9
  loadFarmDocsEngine
10
10
  } from "./chunk-2VQKKQ6D.mjs";
11
11
  import {
12
12
  resolveDocsConfig
13
- } from "./chunk-FJZ3DQLK.mjs";
13
+ } from "./chunk-6DU6UFUE.mjs";
14
14
  import {
15
- getFarmDocsAdapterConfigModule
16
- } from "./chunk-VVBO3QH7.mjs";
15
+ getFarmDocsAdapterConfigModule,
16
+ isSecretDocsConfigKey
17
+ } from "./chunk-ENLZ4R3Y.mjs";
17
18
  import {
18
19
  __name
19
20
  } from "./chunk-LPEX4YW6.mjs";
@@ -118,12 +119,14 @@ async function createFarmDocsAdapterHandler(docs, options) {
118
119
  clientEntry: options.clientEntry,
119
120
  stylesheets: getFarmDocsAdapterStylesheets(options),
120
121
  resolveLayoutFonts: options.resolveLayoutFonts,
121
- loadReactModule: /* @__PURE__ */ __name(() => options.loadModule(docs.adapter.react), "loadReactModule")
122
+ loadReactModule: /* @__PURE__ */ __name(() => options.loadModule(docs.adapter.react), "loadReactModule"),
123
+ ...options.registerMCPServer ? { registerMCPServer: options.registerMCPServer } : {}
122
124
  });
123
125
  }
124
126
  __name(createFarmDocsAdapterHandler, "createFarmDocsAdapterHandler");
125
127
 
126
128
  // src/docs/api.ts
129
+ import path2 from "path";
127
130
  function isRecord(value) {
128
131
  return typeof value === "object" && value !== null && !Array.isArray(value);
129
132
  }
@@ -423,10 +426,58 @@ function buildAgentSpec(context, request) {
423
426
  robots: spec.capabilities.robots,
424
427
  post: false
425
428
  },
426
- pages
429
+ // Same root-relative source paths the precompiled runtime serves.
430
+ pages: pages.map(({ sourcePath, ...page }) => {
431
+ const publicSourcePath = toPublicDocsPath(sourcePath, context.root);
432
+ return publicSourcePath ? { ...page, sourcePath: `./${publicSourcePath}` } : page;
433
+ })
427
434
  };
428
435
  }
429
436
  __name(buildAgentSpec, "buildAgentSpec");
437
+ var REDACTED_DOCS_CONFIG_VALUE = "[redacted]";
438
+ function redactDocsConfigValue(value, key, inHeaders) {
439
+ if (Array.isArray(value)) {
440
+ return value.map((entry) => redactDocsConfigValue(entry, key, inHeaders));
441
+ }
442
+ if (isRecord(value) && !(value instanceof Date) && !(value instanceof URL)) {
443
+ const headers = inHeaders || key.toLowerCase() === "headers";
444
+ return Object.fromEntries(
445
+ Object.entries(value).map(([childKey, child]) => [
446
+ childKey,
447
+ redactDocsConfigValue(child, childKey, headers)
448
+ ])
449
+ );
450
+ }
451
+ if (value === null || value === void 0 || typeof value === "function") return value;
452
+ return inHeaders || isSecretDocsConfigKey(key) ? REDACTED_DOCS_CONFIG_VALUE : value;
453
+ }
454
+ __name(redactDocsConfigValue, "redactDocsConfigValue");
455
+ function toPublicDocsPath(value, root) {
456
+ if (typeof value !== "string" || !value) return void 0;
457
+ if (!path2.isAbsolute(value)) return value;
458
+ const relative = path2.relative(root, value);
459
+ if (path2.isAbsolute(relative) || relative === ".." || relative.startsWith(`..${path2.sep}`)) {
460
+ return void 0;
461
+ }
462
+ return relative.split(path2.sep).join("/") || ".";
463
+ }
464
+ __name(toPublicDocsPath, "toPublicDocsPath");
465
+ function buildPublicConfig(context) {
466
+ const redacted = redactDocsConfigValue(context.docs.config, "", false);
467
+ const contentDir = toPublicDocsPath(redacted.contentDir, context.root);
468
+ const publicInput = { ...redacted, contentDir };
469
+ const map = docsEngine().buildDocsConfigMap(publicInput, {
470
+ file: toPublicDocsPath(context.docs.configPath, context.root) || "farm.config.ts"
471
+ });
472
+ const config = Object.fromEntries(Object.keys(map.values).map((key) => [key, publicInput[key]]));
473
+ return {
474
+ entry: context.docs.entry,
475
+ contentDir: toPublicDocsPath(context.docs.contentDir, context.root) || contentDir || null,
476
+ config,
477
+ map
478
+ };
479
+ }
480
+ __name(buildPublicConfig, "buildPublicConfig");
430
481
  function buildDiagnostics(context) {
431
482
  const pages = discoverFarmDocsPages(context.contentDir, context.docs);
432
483
  const diagnostics = docsEngine().buildDocsDiagnostics(context.docs.config, {
@@ -505,7 +556,8 @@ async function resolveAPIContext(options) {
505
556
  root,
506
557
  srcDir,
507
558
  docs,
508
- contentDir: resolveFarmDocsContentDir(docs, { root, srcDir })
559
+ contentDir: resolveFarmDocsContentDir(docs, { root, srcDir }),
560
+ diagnostics: options.diagnostics === true
509
561
  };
510
562
  }
511
563
  __name(resolveAPIContext, "resolveAPIContext");
@@ -517,21 +569,16 @@ async function handleDocsAPIGet(request, context) {
517
569
  const format = getDocsAPIFormat(request);
518
570
  const pathTarget = getDocsAPIPathTarget(request);
519
571
  if (format === "config" || format === "docs-config") {
520
- return json({
521
- entry: context.docs.entry,
522
- contentDir: context.docs.contentDir || context.docs.config.contentDir || null,
523
- config: context.docs.config,
524
- map: docsEngine().buildDocsConfigMap(context.docs.config, {
525
- file: context.docs.configPath || "farm.config.ts"
526
- })
527
- });
572
+ return json(buildPublicConfig(context));
528
573
  }
529
574
  if (format === "skill")
530
575
  return text(renderSkillDocument(context, request), "text/markdown; charset=utf-8");
531
576
  if (format === "agents")
532
577
  return text(renderAgentsDocument(context, request), "text/markdown; charset=utf-8");
533
578
  if (format === "agent" || format === "agent-spec") return json(buildAgentSpec(context, request));
534
- if (format === "diagnostics") return json(buildDiagnostics(context));
579
+ if (format === "diagnostics") {
580
+ return context.diagnostics ? json(buildDiagnostics(context)) : json({ error: "Docs diagnostics are only available in development" }, { status: 404 });
581
+ }
535
582
  if (format === "llms")
536
583
  return text(renderLlmsTxt(context, request, false), "text/plain; charset=utf-8");
537
584
  if (format === "llms-full")
@@ -6,12 +6,13 @@ var _chunkJ63ZH5OQcjs = require('./chunk-J63ZH5OQ.cjs');
6
6
  var _chunkE3UK5IIBcjs = require('./chunk-E3UK5IIB.cjs');
7
7
 
8
8
 
9
- var _chunk5ZSWG4UXcjs = require('./chunk-5ZSWG4UX.cjs');
9
+ var _chunkUXFQ3UDAcjs = require('./chunk-UXFQ3UDA.cjs');
10
10
 
11
11
 
12
12
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
13
13
 
14
14
  // src/plugins/infra-analytics.ts
15
+ var _async_hooks = require('async_hooks');
15
16
  var FARM_PRERENDER_ENV = "FARM_PRERENDER";
16
17
  var DEFAULT_URL = "https://app.farmjs.dev";
17
18
  var EVENTS_PATH = "/api/telemetry/v1/events";
@@ -265,6 +266,20 @@ function requestEvent(metadata, method, status, durationMs) {
265
266
  };
266
267
  }
267
268
  _chunkS3JO3N4Hcjs.__name.call(void 0, requestEvent, "requestEvent");
269
+ function toolEvent(metadata, event) {
270
+ return {
271
+ id: uuid(),
272
+ requestId: metadata.id,
273
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
274
+ route: metadata.route,
275
+ agent: metadata.agent,
276
+ kind: "mcp.tool",
277
+ tool: event.tool,
278
+ outcome: event.outcome,
279
+ durationMs: duration(event.durationMs)
280
+ };
281
+ }
282
+ _chunkS3JO3N4Hcjs.__name.call(void 0, toolEvent, "toolEvent");
268
283
  function farmInfraAnalyticsPlugin(options, send) {
269
284
  const contextKey = `${CONTEXT_KEY}.${uuid()}`;
270
285
  return {
@@ -284,21 +299,11 @@ function farmInfraAnalyticsPlugin(options, send) {
284
299
  context.state.unsubscribe = _chunkE3UK5IIBcjs.onFarmEvent.call(void 0,
285
300
  (event) => {
286
301
  if (!isToolEvent(event)) return;
287
- const request = _chunk5ZSWG4UXcjs.getCurrentRequestOrNull.call(void 0, );
302
+ const request = _chunkUXFQ3UDAcjs.getCurrentRequestOrNull.call(void 0, );
288
303
  if (!request) return;
289
304
  const metadata = context.requestContext.get(request, contextKey);
290
305
  if (!metadata) return;
291
- exporter.enqueue({
292
- id: uuid(),
293
- requestId: metadata.id,
294
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
295
- route: metadata.route,
296
- agent: metadata.agent,
297
- kind: "mcp.tool",
298
- tool: event.tool,
299
- outcome: event.outcome,
300
- durationMs: duration(event.durationMs)
301
- });
306
+ exporter.enqueue(toolEvent(metadata, event));
302
307
  metadata.waitUntil(exporter.flush());
303
308
  },
304
309
  { unfiltered: true }
@@ -333,6 +338,17 @@ function farmInfraAnalyticsPlugin(options, send) {
333
338
  _chunkS3JO3N4Hcjs.__name.call(void 0, farmInfraAnalyticsPlugin, "farmInfraAnalyticsPlugin");
334
339
  function farmInfraAnalyticsRecorder(options, send) {
335
340
  const exporter = createFarmInfraAnalyticsExporter(options, send);
341
+ const requests = new (0, _async_hooks.AsyncLocalStorage)();
342
+ const unsubscribe = _chunkE3UK5IIBcjs.onFarmEvent.call(void 0,
343
+ (event) => {
344
+ if (!isToolEvent(event)) return;
345
+ const metadata = requests.getStore();
346
+ if (!metadata) return;
347
+ exporter.enqueue(toolEvent(metadata, event));
348
+ metadata.waitUntil(exporter.flush());
349
+ },
350
+ { unfiltered: true }
351
+ );
336
352
  return {
337
353
  async record(request, runtime, waitUntil, handler) {
338
354
  if (runtime.kind === "asset") return handler();
@@ -342,7 +358,7 @@ function farmInfraAnalyticsRecorder(options, send) {
342
358
  const startedAt = performance.now();
343
359
  let response;
344
360
  try {
345
- response = await handler();
361
+ response = await requests.run(metadata, handler);
346
362
  } catch (error) {
347
363
  background(exporter.flush());
348
364
  throw error;
@@ -355,7 +371,10 @@ function farmInfraAnalyticsRecorder(options, send) {
355
371
  background(exporter.flush());
356
372
  return response;
357
373
  },
358
- close: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => exporter.close(), "close")
374
+ close() {
375
+ unsubscribe();
376
+ return exporter.close();
377
+ }
359
378
  };
360
379
  }
361
380
  _chunkS3JO3N4Hcjs.__name.call(void 0, farmInfraAnalyticsRecorder, "farmInfraAnalyticsRecorder");
@@ -4,17 +4,17 @@ import {
4
4
  _runServerFunctionForCaller,
5
5
  createServerFn,
6
6
  createServerFunctionDescriptor
7
- } from "./chunk-GZYH4OER.mjs";
7
+ } from "./chunk-Q3VLETLE.mjs";
8
8
  import {
9
9
  createFarmServerQueryResult
10
10
  } from "./chunk-KGB5UXJJ.mjs";
11
11
  import {
12
12
  getServerActionExecutionContext
13
- } from "./chunk-QCFFHV5H.mjs";
13
+ } from "./chunk-SMHH4VDG.mjs";
14
14
  import {
15
15
  createRouteDataCacheTag,
16
16
  getFarmDataCache
17
- } from "./chunk-IV6CQY7O.mjs";
17
+ } from "./chunk-MSSFIQGM.mjs";
18
18
  import {
19
19
  createFarmCacheKey,
20
20
  createRouteDataCacheKey
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkHBTUGXHScjs = require('./chunk-HBTUGXHS.cjs');
3
+ var _chunkHLJ6MBUZcjs = require('./chunk-HLJ6MBUZ.cjs');
4
4
 
5
5
 
6
6
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
@@ -14,7 +14,7 @@ async function readFarmI18nCatalogs(config) {
14
14
  }
15
15
  const catalogs = {};
16
16
  for (const locale of config.locales) {
17
- const filePath = _chunkHBTUGXHScjs.resolveFarmI18nMessagePath.call(void 0, config, locale);
17
+ const filePath = _chunkHLJ6MBUZcjs.resolveFarmI18nMessagePath.call(void 0, config, locale);
18
18
  let source;
19
19
  try {
20
20
  source = await _promises.readFile.call(void 0, filePath, "utf8");
@@ -2,7 +2,7 @@ import {
2
2
  getFarmMarkdownMirrorPath,
3
3
  isFarmMarkdownMirrorExposed,
4
4
  matchesFarmMarkdownRoutePattern
5
- } from "./chunk-JBC2FKRW.mjs";
5
+ } from "./chunk-WWIKMBRN.mjs";
6
6
  import {
7
7
  FARM_INTERNAL_READ_HEADER
8
8
  } from "./chunk-MVL2RAJW.mjs";
@@ -100,21 +100,25 @@ function isMetadataNoIndex(metadata) {
100
100
  __name(isMetadataNoIndex, "isMetadataNoIndex");
101
101
  function createFarmDefaultLlmsTxt(options) {
102
102
  const { config, pages } = options;
103
+ const mcp = options.mcp ?? [];
103
104
  const summary = config.summary ?? readMetadataString(options.rootMetadata, "description");
104
105
  return {
105
106
  title: config.title ?? readMetadataTitle(options.rootMetadata) ?? pages.find((page) => page.path === "/")?.title ?? new URL(options.origin).host,
106
107
  ...summary ? { summary } : {},
107
108
  ...config.details ? { details: config.details } : {},
108
- sections: pages.length ? [
109
- {
110
- title: "Pages",
111
- links: pages.map(({ title, url, description }) => ({
112
- title,
113
- url,
114
- ...description ? { description } : {}
115
- }))
116
- }
117
- ] : []
109
+ sections: [
110
+ ...pages.length ? [
111
+ {
112
+ title: "Pages",
113
+ links: pages.map(({ title, url, description }) => ({
114
+ title,
115
+ url,
116
+ ...description ? { description } : {}
117
+ }))
118
+ }
119
+ ] : [],
120
+ ...mcp.length ? [{ title: "MCP", links: mcp }] : []
121
+ ]
118
122
  };
119
123
  }
120
124
  __name(createFarmDefaultLlmsTxt, "createFarmDefaultLlmsTxt");