@farm.js/core 0.1.35 → 0.1.37

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 (285) hide show
  1. package/dist/{metadata-BnLDsUOS.d.ts → agent-mcp-BC0bAGVF.d.mts} +45 -2
  2. package/dist/agent-mcp-handler-LPJ2CADR.mjs +19 -0
  3. package/dist/agent-mcp-handler-SJAHFSPI.cjs +19 -0
  4. package/dist/{metadata-WGpBYcGn.d.mts → agent-mcp-jyDHbQKe.d.ts} +45 -2
  5. package/dist/agent-runtime.cjs +6 -4
  6. package/dist/agent-runtime.d.mts +1 -1
  7. package/dist/agent-runtime.d.ts +1 -1
  8. package/dist/agent-runtime.mjs +5 -3
  9. package/dist/api/client.cjs +3 -3
  10. package/dist/api/client.mjs +2 -2
  11. package/dist/api/route-manager.cjs +9 -9
  12. package/dist/api/route-manager.d.mts +10 -4
  13. package/dist/api/route-manager.d.ts +10 -4
  14. package/dist/api/route-manager.mjs +8 -8
  15. package/dist/api/runtime.cjs +6 -6
  16. package/dist/api/runtime.d.mts +4 -62
  17. package/dist/api/runtime.d.ts +4 -62
  18. package/dist/api/runtime.mjs +5 -5
  19. package/dist/api.cjs +13 -12
  20. package/dist/api.d.mts +3 -3
  21. package/dist/api.d.ts +3 -3
  22. package/dist/api.mjs +12 -11
  23. package/dist/{app-BXB3JZYc.d.ts → app-CKO3iN1c.d.ts} +17 -3
  24. package/dist/{app-D_j9AAVL.d.mts → app-Cbkj9ufe.d.mts} +17 -3
  25. package/dist/app-markdown.cjs +6 -4
  26. package/dist/app-markdown.d.mts +3 -3
  27. package/dist/app-markdown.d.ts +3 -3
  28. package/dist/app-markdown.mjs +5 -3
  29. package/dist/{chunk-F7JZENPF.cjs → chunk-3A4KGQYI.cjs} +38 -30
  30. package/dist/{chunk-4MMGO7YW.cjs → chunk-3IP27TCG.cjs} +43 -32
  31. package/dist/{chunk-FDR64H6B.mjs → chunk-3KGDJLJK.mjs} +41 -2
  32. package/dist/{chunk-UJD4PHYB.mjs → chunk-4E5WBPEG.mjs} +72 -354
  33. package/dist/{chunk-KXWRO25S.cjs → chunk-4GPOC4LN.cjs} +3 -3
  34. package/dist/{chunk-Z2HLU4IX.cjs → chunk-4GWRFP22.cjs} +23 -2
  35. package/dist/{chunk-4KU5Q7C2.mjs → chunk-4P6ULFMD.mjs} +253 -67
  36. package/dist/chunk-4WQ6PGSJ.cjs +367 -0
  37. package/dist/{chunk-SMHH4VDG.mjs → chunk-4WVJLURN.mjs} +1 -1
  38. package/dist/{chunk-2F2ER724.cjs → chunk-5BXGGEC7.cjs} +27 -22
  39. package/dist/{chunk-3BHT4WMP.cjs → chunk-5D2JIPLH.cjs} +8 -8
  40. package/dist/{chunk-AHGECQEW.mjs → chunk-666CKENS.mjs} +1 -1
  41. package/dist/{chunk-GFHLGIYC.cjs → chunk-6LGFV2CQ.cjs} +8 -8
  42. package/dist/chunk-6SJ2KJTA.mjs +314 -0
  43. package/dist/{chunk-PFQKNERH.cjs → chunk-6TJITR2B.cjs} +457 -218
  44. package/dist/{chunk-73MC7ZL6.cjs → chunk-75X755YZ.cjs} +2 -2
  45. package/dist/{chunk-3UH7MRCP.cjs → chunk-7DWNJI73.cjs} +13 -13
  46. package/dist/{chunk-7L5V3KQO.cjs → chunk-7O5M4UKW.cjs} +2 -2
  47. package/dist/{chunk-BJPBQNIE.cjs → chunk-7SQ5SGYZ.cjs} +2 -2
  48. package/dist/{chunk-27ZWSI3W.cjs → chunk-ADOAUDQ6.cjs} +2 -2
  49. package/dist/{chunk-CP6X4AEU.mjs → chunk-AJQTP4OO.mjs} +1 -1
  50. package/dist/{chunk-YKX5BK66.cjs → chunk-ATWHHSY2.cjs} +7 -7
  51. package/dist/{chunk-EFCQPQMG.cjs → chunk-B5PFZLKV.cjs} +89 -8
  52. package/dist/{chunk-FNO7A7CM.cjs → chunk-BHY547NB.cjs} +34 -16
  53. package/dist/{chunk-JHWOVJ3M.mjs → chunk-BUGNQIHC.mjs} +5 -0
  54. package/dist/{chunk-7GLPRTTF.cjs → chunk-CGBDNNSM.cjs} +2 -2
  55. package/dist/chunk-CI6E3UOH.cjs +314 -0
  56. package/dist/{chunk-2G2NNLE2.mjs → chunk-CQMVIOYP.mjs} +5 -5
  57. package/dist/{chunk-X6W5FFH6.cjs → chunk-CVH2BXPY.cjs} +8 -8
  58. package/dist/{chunk-TKSCR644.cjs → chunk-D3C5LBQY.cjs} +2 -2
  59. package/dist/{chunk-PZNL3WEG.mjs → chunk-DMEPTZTI.mjs} +22 -11
  60. package/dist/chunk-DTSROJ5J.mjs +367 -0
  61. package/dist/{chunk-DBNKI4NF.cjs → chunk-ECKF2BAM.cjs} +6 -2
  62. package/dist/{chunk-GQ3Z3IZI.cjs → chunk-EMMQ64QW.cjs} +18 -18
  63. package/dist/{chunk-6DU6UFUE.mjs → chunk-EXG5LD6B.mjs} +16 -8
  64. package/dist/{chunk-HUMR6LSU.mjs → chunk-F5QO4FNE.mjs} +1 -1
  65. package/dist/{chunk-YULD7ICZ.mjs → chunk-FBOJ55OM.mjs} +1 -1
  66. package/dist/{chunk-IHNMMXHV.mjs → chunk-FGRYBX5X.mjs} +15 -10
  67. package/dist/{chunk-D227TIEN.cjs → chunk-FWE7LEQC.cjs} +13 -13
  68. package/dist/{chunk-3BU22U3M.cjs → chunk-G2TEB74S.cjs} +5 -2
  69. package/dist/{chunk-G5RT7EXW.mjs → chunk-HEVMCTSR.mjs} +21 -6
  70. package/dist/{chunk-W7LF2J2S.mjs → chunk-HMRSWN47.mjs} +1 -1
  71. package/dist/{chunk-JG6DJF5A.mjs → chunk-HZFM2LWQ.mjs} +22 -1
  72. package/dist/{chunk-UAORZ7QA.mjs → chunk-IAIYV4RZ.mjs} +2 -2
  73. package/dist/{chunk-F2SE2VDO.mjs → chunk-IHQIOZLC.mjs} +1 -1
  74. package/dist/{chunk-2NNMOPDN.mjs → chunk-J3ANCZKA.mjs} +4 -1
  75. package/dist/{chunk-C4SPBWFM.cjs → chunk-JEZO6VUR.cjs} +10 -1
  76. package/dist/{chunk-SC2WYWPF.mjs → chunk-JPNFPAZ4.mjs} +3 -3
  77. package/dist/{chunk-F6Z3Y5KL.mjs → chunk-K3SAEIM3.mjs} +5 -2
  78. package/dist/{chunk-QAU5JD57.mjs → chunk-K4I4O5TS.mjs} +289 -50
  79. package/dist/{chunk-KN7K4VQN.mjs → chunk-KDTBF3UU.mjs} +1 -1
  80. package/dist/{chunk-OMVAU7NT.cjs → chunk-KIIMAWOJ.cjs} +11 -1
  81. package/dist/{chunk-43FMW62B.mjs → chunk-KMTGADN3.mjs} +28 -0
  82. package/dist/{chunk-QORUJDIV.mjs → chunk-KPFKMDM7.mjs} +2 -2
  83. package/dist/{chunk-YSCV4SJF.cjs → chunk-L5H2GSUC.cjs} +4 -4
  84. package/dist/{chunk-YDQZGSDS.mjs → chunk-LBDP3YT3.mjs} +1 -1
  85. package/dist/{chunk-6ETPZTJI.mjs → chunk-LBGILORX.mjs} +116 -55
  86. package/dist/{chunk-IPXLADVO.cjs → chunk-LOFKRKO7.cjs} +122 -61
  87. package/dist/{chunk-ULAWS2PA.cjs → chunk-LPFV45AY.cjs} +29 -26
  88. package/dist/{chunk-3KZS4SUS.mjs → chunk-MCIZVNOQ.mjs} +1 -1
  89. package/dist/{chunk-RU3M2FIK.cjs → chunk-MRMI32SN.cjs} +87 -369
  90. package/dist/{chunk-XCMCS4DA.mjs → chunk-ND2CWPOD.mjs} +2 -2
  91. package/dist/{chunk-XCACDAZZ.cjs → chunk-NDILNQ4L.cjs} +25 -10
  92. package/dist/{chunk-6TJOML4E.mjs → chunk-NFMDCAOS.mjs} +14 -11
  93. package/dist/{chunk-UXFQ3UDA.cjs → chunk-NICDYKBS.cjs} +42 -3
  94. package/dist/{chunk-EZDQRNQ7.mjs → chunk-NNSAQX3U.mjs} +23 -5
  95. package/dist/{chunk-YC6V7PWE.cjs → chunk-NQ6QFZWD.cjs} +1 -1
  96. package/dist/{chunk-PDOCJ6RY.mjs → chunk-O6WAEAX3.mjs} +1 -1
  97. package/dist/{chunk-U4KT7QP3.cjs → chunk-OW67PDDS.cjs} +14 -1
  98. package/dist/{chunk-77GNHH2Z.cjs → chunk-PMQHMWZU.cjs} +3 -3
  99. package/dist/chunk-PTZ2TVNE.cjs +178 -0
  100. package/dist/{chunk-6WCPV6G2.mjs → chunk-Q2KB32T4.mjs} +1 -1
  101. package/dist/{chunk-ICUQICNC.cjs → chunk-Q5FYSK45.cjs} +718 -532
  102. package/dist/{chunk-5SJWVY6R.mjs → chunk-QHSH7IH4.mjs} +9 -0
  103. package/dist/{chunk-Q3VLETLE.mjs → chunk-RRMVL6CJ.mjs} +4 -4
  104. package/dist/{chunk-IZY3V5XW.mjs → chunk-S3VWVTVA.mjs} +14 -1
  105. package/dist/{chunk-FFFW3OQ7.cjs → chunk-S6FJO323.cjs} +2 -2
  106. package/dist/{chunk-VFQT3LAO.cjs → chunk-SDOTRX3V.cjs} +5 -5
  107. package/dist/chunk-SGBZPZUW.mjs +75 -0
  108. package/dist/{chunk-BMWDEBXO.cjs → chunk-SHLXACIO.cjs} +31 -3
  109. package/dist/{chunk-ZXGAFZDO.cjs → chunk-T5OJPTVN.cjs} +2 -2
  110. package/dist/{chunk-2ELDTQRN.mjs → chunk-TDNWPAVR.mjs} +1 -1
  111. package/dist/{chunk-VZJR7UTG.cjs → chunk-TE2G5ION.cjs} +2 -2
  112. package/dist/{chunk-IHNIDL6H.cjs → chunk-TO4GJ56K.cjs} +22 -11
  113. package/dist/{chunk-4JHOT46A.mjs → chunk-TPLJVC7E.mjs} +86 -5
  114. package/dist/{chunk-NRSN7G7E.mjs → chunk-TW4GYDBJ.mjs} +1 -1
  115. package/dist/{chunk-XBML5KMG.cjs → chunk-U6MPZ35Q.cjs} +24 -14
  116. package/dist/chunk-UH6QN5NL.mjs +178 -0
  117. package/dist/{chunk-FTFYRMQQ.cjs → chunk-UJZLSXUB.cjs} +53 -28
  118. package/dist/chunk-UXHS27O6.cjs +75 -0
  119. package/dist/{chunk-DQQOKWYA.cjs → chunk-VR4GD5I3.cjs} +3 -3
  120. package/dist/{chunk-22LTEMGQ.mjs → chunk-VXAWRDK7.mjs} +14 -4
  121. package/dist/{chunk-62XKI4Z3.cjs → chunk-W2YDNK66.cjs} +6 -3
  122. package/dist/{chunk-VPTDD5XF.cjs → chunk-WBKEZXWE.cjs} +5 -0
  123. package/dist/{chunk-EJQT6KZN.cjs → chunk-WC5UV2HQ.cjs} +2 -2
  124. package/dist/{chunk-SAZVVAJH.mjs → chunk-WQ7T2263.mjs} +18 -7
  125. package/dist/chunk-WRPHYQVY.mjs +109 -0
  126. package/dist/chunk-WT4TGLXT.cjs +109 -0
  127. package/dist/{chunk-SOMHP6GF.mjs → chunk-XOPOIFTJ.mjs} +2 -2
  128. package/dist/{chunk-3PXS2MHU.mjs → chunk-YCKO6FRS.mjs} +1 -1
  129. package/dist/{chunk-C35ZBVRD.mjs → chunk-YWMZUGIS.mjs} +6 -2
  130. package/dist/{chunk-HMIJDL7S.mjs → chunk-Z5BEWYVO.mjs} +31 -6
  131. package/dist/{chunk-OKZUAXHF.mjs → chunk-Z7LA7MHQ.mjs} +1 -1
  132. package/dist/{chunk-Y7RKTKYI.mjs → chunk-ZMMBIVQM.mjs} +10 -0
  133. package/dist/{client-plugins-HIyulDym.d.ts → client-plugins-C8DjftDF.d.ts} +112 -5
  134. package/dist/{client-plugins-CvIslxWi.d.mts → client-plugins-CV4eJ9De.d.mts} +112 -5
  135. package/dist/client-plugins.d.mts +1 -1
  136. package/dist/client-plugins.d.ts +1 -1
  137. package/dist/client.cjs +8 -8
  138. package/dist/client.d.mts +5 -5
  139. package/dist/client.d.ts +5 -5
  140. package/dist/client.mjs +7 -7
  141. package/dist/config.d.mts +1 -1
  142. package/dist/config.d.ts +1 -1
  143. package/dist/{devtools-EAUY43BS.cjs → devtools-JXFQNWSH.cjs} +11 -10
  144. package/dist/{devtools-EE5RIBTH.mjs → devtools-KVOY2TCZ.mjs} +10 -9
  145. package/dist/docs.cjs +13 -12
  146. package/dist/docs.d.mts +2 -2
  147. package/dist/docs.d.ts +2 -2
  148. package/dist/docs.mjs +12 -11
  149. package/dist/headers.cjs +4 -4
  150. package/dist/headers.mjs +3 -3
  151. package/dist/i18n/client.cjs +11 -11
  152. package/dist/i18n/client.mjs +3 -3
  153. package/dist/image/server.cjs +3 -3
  154. package/dist/image/server.mjs +2 -2
  155. package/dist/image/sharp.cjs +10 -10
  156. package/dist/image/sharp.mjs +2 -2
  157. package/dist/index.cjs +61 -54
  158. package/dist/index.d.mts +14 -14
  159. package/dist/index.d.ts +14 -14
  160. package/dist/index.mjs +60 -53
  161. package/dist/integrations.cjs +8 -4
  162. package/dist/integrations.d.mts +1 -1
  163. package/dist/integrations.d.ts +1 -1
  164. package/dist/integrations.mjs +7 -3
  165. package/dist/internal/app-markdown-runtime.cjs +5 -3
  166. package/dist/internal/app-markdown-runtime.d.mts +19 -5
  167. package/dist/internal/app-markdown-runtime.d.ts +19 -5
  168. package/dist/internal/app-markdown-runtime.mjs +4 -2
  169. package/dist/internal/build-runtime.cjs +38 -34
  170. package/dist/internal/build-runtime.d.mts +3 -3
  171. package/dist/internal/build-runtime.d.ts +3 -3
  172. package/dist/internal/build-runtime.mjs +37 -33
  173. package/dist/internal/cli-runtime.cjs +17 -16
  174. package/dist/internal/cli-runtime.mjs +16 -15
  175. package/dist/internal/client-error-overlay.cjs +4 -4
  176. package/dist/internal/client-error-overlay.mjs +1 -1
  177. package/dist/internal/client-runtime.cjs +2 -2
  178. package/dist/internal/client-runtime.mjs +1 -1
  179. package/dist/internal/compression-runtime.d.mts +1 -1
  180. package/dist/internal/compression-runtime.d.ts +1 -1
  181. package/dist/internal/config-runtime.cjs +11 -10
  182. package/dist/internal/config-runtime.d.mts +2 -2
  183. package/dist/internal/config-runtime.d.ts +2 -2
  184. package/dist/internal/config-runtime.mjs +10 -9
  185. package/dist/internal/infra-analytics-runtime.cjs +5 -5
  186. package/dist/internal/infra-analytics-runtime.mjs +3 -3
  187. package/dist/internal/isolated-boundary.cjs +2 -2
  188. package/dist/internal/isolated-boundary.d.mts +0 -1
  189. package/dist/internal/isolated-boundary.d.ts +0 -1
  190. package/dist/internal/isolated-boundary.mjs +1 -1
  191. package/dist/internal/metadata-image-runtime.cjs +3 -3
  192. package/dist/internal/metadata-image-runtime.mjs +2 -2
  193. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  194. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  195. package/dist/internal/production-runtime.cjs +27 -48
  196. package/dist/internal/production-runtime.d.mts +67 -27
  197. package/dist/internal/production-runtime.d.ts +67 -27
  198. package/dist/internal/production-runtime.mjs +34 -55
  199. package/dist/{layers-BRQF5ETU.mjs → layers-UTB43B7A.mjs} +1 -1
  200. package/dist/layers-VUWIOFEO.cjs +18 -0
  201. package/dist/markdown.cjs +1 -1
  202. package/dist/markdown.d.mts +1 -1
  203. package/dist/markdown.d.ts +1 -1
  204. package/dist/markdown.mjs +1 -1
  205. package/dist/middleware.cjs +10 -10
  206. package/dist/middleware.d.mts +6 -4
  207. package/dist/middleware.d.ts +6 -4
  208. package/dist/middleware.mjs +9 -9
  209. package/dist/navigation.cjs +7 -7
  210. package/dist/navigation.d.mts +4 -4
  211. package/dist/navigation.d.ts +4 -4
  212. package/dist/navigation.mjs +6 -6
  213. package/dist/{nitro-OVPLKPE2.cjs → nitro-7F65EZZS.cjs} +3 -3
  214. package/dist/{nitro-MXRDCXWZ.mjs → nitro-MPZJGPXK.mjs} +2 -2
  215. package/dist/plugin.cjs +31 -28
  216. package/dist/plugin.d.mts +1 -1
  217. package/dist/plugin.d.ts +1 -1
  218. package/dist/plugin.mjs +30 -27
  219. package/dist/{production-runtime-Crq6CJ-2.d.ts → production-runtime-C2kkrPVZ.d.ts} +1 -1
  220. package/dist/{production-runtime-0sRnuYc-.d.mts → production-runtime-Du_FHb2-.d.mts} +1 -1
  221. package/dist/query/client.cjs +9 -9
  222. package/dist/query/client.mjs +4 -4
  223. package/dist/{render-plan-8ozZh2Qv.d.ts → render-plan-BnnPTpus.d.ts} +1 -1
  224. package/dist/{render-plan-gs9GGPzw.d.mts → render-plan-Cgx7v8tJ.d.mts} +1 -1
  225. package/dist/renderer/react/server.cjs +3 -3
  226. package/dist/renderer/react/server.mjs +1 -1
  227. package/dist/renderer-client.cjs +12 -12
  228. package/dist/renderer-client.d.mts +3 -3
  229. package/dist/renderer-client.d.ts +3 -3
  230. package/dist/renderer-client.mjs +4 -4
  231. package/dist/{request-B5G8rLBH.d.ts → request-BNWr7r5e.d.ts} +1 -1
  232. package/dist/{request-fkhiynXe.d.mts → request-sKayKcop.d.mts} +1 -1
  233. package/dist/request.cjs +3 -3
  234. package/dist/request.d.mts +2 -2
  235. package/dist/request.d.ts +2 -2
  236. package/dist/request.mjs +2 -2
  237. package/dist/{route-rendering-lS5nUMua.d.ts → route-rendering-Bx4Auw6Q.d.ts} +1 -1
  238. package/dist/{route-rendering-CLnS7AZj.d.mts → route-rendering-DWFp3Yq4.d.mts} +1 -1
  239. package/dist/{router-ifU8Dui1.d.mts → router-BK6K42Ij.d.mts} +1 -1
  240. package/dist/{router-4iuiYnOW.d.ts → router-DnW_2tQi.d.ts} +1 -1
  241. package/dist/routes.cjs +2 -2
  242. package/dist/routes.d.mts +1 -1
  243. package/dist/routes.d.ts +1 -1
  244. package/dist/routes.mjs +1 -1
  245. package/dist/runtime-CA3Ei5k_.d.ts +69 -0
  246. package/dist/runtime-DJDaCMd_.d.mts +69 -0
  247. package/dist/server-action-security.cjs +3 -3
  248. package/dist/server-action-security.mjs +2 -2
  249. package/dist/server-fn.cjs +5 -5
  250. package/dist/server-fn.mjs +4 -4
  251. package/dist/server-plugins.cjs +5 -5
  252. package/dist/server-plugins.d.mts +2 -2
  253. package/dist/server-plugins.d.ts +2 -2
  254. package/dist/server-plugins.mjs +4 -4
  255. package/dist/server-query.cjs +6 -6
  256. package/dist/server-query.mjs +5 -5
  257. package/dist/server.cjs +57 -54
  258. package/dist/server.d.mts +7 -7
  259. package/dist/server.d.ts +7 -7
  260. package/dist/server.mjs +35 -32
  261. package/dist/{spa-router-Bq7VCOwx.d.mts → spa-router-D6fUA4Rn.d.mts} +2 -2
  262. package/dist/{spa-router-DaJk5Re4.d.ts → spa-router-Mwbd7g2L.d.ts} +2 -2
  263. package/dist/testing.cjs +13 -13
  264. package/dist/testing.d.mts +1 -1
  265. package/dist/testing.d.ts +1 -1
  266. package/dist/testing.mjs +10 -10
  267. package/dist/theme/server.cjs +4 -4
  268. package/dist/theme/server.mjs +3 -3
  269. package/dist/{utils-BXLmFsVR.d.ts → utils-BwVcAfUR.d.ts} +1 -1
  270. package/dist/{utils-XJn0c9bj.d.mts → utils-p9Hs-jCc.d.mts} +1 -1
  271. package/dist/version.cjs +2 -2
  272. package/dist/version.mjs +1 -1
  273. package/dist/vite.cjs +31 -28
  274. package/dist/vite.d.mts +1 -1
  275. package/dist/vite.d.ts +1 -1
  276. package/dist/vite.mjs +30 -27
  277. package/dist/workflows.cjs +3 -3
  278. package/dist/workflows.mjs +2 -2
  279. package/package.json +1 -1
  280. package/types/middleware.d.ts +5 -1
  281. package/dist/chunk-FXEF4PPL.mjs +0 -47
  282. package/dist/chunk-XD32KALF.cjs +0 -47
  283. package/dist/layers-4PNE2HOY.cjs +0 -18
  284. /package/dist/{chunk-SJNMVDDF.cjs → chunk-FUCSUGDM.cjs} +0 -0
  285. /package/dist/{chunk-UDNPLXW7.mjs → chunk-MYIZXDZA.mjs} +0 -0
@@ -0,0 +1,367 @@
1
+ import {
2
+ getFarmMarkdownMirrorPath,
3
+ isFarmMarkdownMirrorExposed,
4
+ matchesFarmMarkdownRoutePattern
5
+ } from "./chunk-WWIKMBRN.mjs";
6
+ import {
7
+ FARM_INTERNAL_READ_HEADER
8
+ } from "./chunk-MVL2RAJW.mjs";
9
+ import {
10
+ applyFarmBasePath
11
+ } from "./chunk-4RB44K6Z.mjs";
12
+ import {
13
+ __name
14
+ } from "./chunk-LPEX4YW6.mjs";
15
+
16
+ // src/llms-txt.ts
17
+ function resolveFarmLlmsTxtConfig(input) {
18
+ if (!input) return { enabled: false, include: [], exclude: [], full: false };
19
+ if (input === true) return { enabled: true, include: [], exclude: [], full: true };
20
+ if (typeof input !== "object") {
21
+ throw new TypeError("agent.llmsTxt must be true, false, or an options object.");
22
+ }
23
+ if (input.enabled === false) return { enabled: false, include: [], exclude: [], full: false };
24
+ for (const key of ["title", "summary", "details"]) {
25
+ if (input[key] !== void 0 && typeof input[key] !== "string") {
26
+ throw new TypeError(`agent.llmsTxt.${key} must be a string.`);
27
+ }
28
+ }
29
+ if (input.full !== void 0 && typeof input.full !== "boolean") {
30
+ throw new TypeError("agent.llmsTxt.full must be a boolean.");
31
+ }
32
+ if (input.revalidate !== void 0 && (typeof input.revalidate !== "number" || !Number.isFinite(input.revalidate) || input.revalidate < 0)) {
33
+ throw new TypeError("agent.llmsTxt.revalidate must be a number of seconds.");
34
+ }
35
+ return {
36
+ enabled: true,
37
+ ...input.title ? { title: input.title } : {},
38
+ ...input.summary ? { summary: input.summary } : {},
39
+ ...input.details ? { details: input.details } : {},
40
+ include: resolveRoutePatterns(input.include, "include"),
41
+ exclude: resolveRoutePatterns(input.exclude, "exclude"),
42
+ full: input.full !== false,
43
+ ...input.revalidate !== void 0 ? { revalidate: input.revalidate } : {}
44
+ };
45
+ }
46
+ __name(resolveFarmLlmsTxtConfig, "resolveFarmLlmsTxtConfig");
47
+ function resolveRoutePatterns(value, key) {
48
+ if (value === void 0) return [];
49
+ if (!Array.isArray(value)) {
50
+ throw new TypeError(`agent.llmsTxt.${key} must be an array of route patterns.`);
51
+ }
52
+ return value.map((pattern, index) => {
53
+ if (typeof pattern !== "string" || !pattern.startsWith("/")) {
54
+ throw new TypeError(
55
+ `agent.llmsTxt.${key}[${index}] must be a route pattern starting with "/", such as "/docs/[...slug]".`
56
+ );
57
+ }
58
+ return pattern;
59
+ });
60
+ }
61
+ __name(resolveRoutePatterns, "resolveRoutePatterns");
62
+ function collectFarmLlmsTxtPages(sources, options) {
63
+ const include = options.include ?? [];
64
+ const exclude = options.exclude ?? [];
65
+ const pages = /* @__PURE__ */ new Map();
66
+ for (const source of sources) {
67
+ const path = source.pattern;
68
+ if (path.includes("[") || pages.has(path)) continue;
69
+ if (include.length && !include.some((pattern) => matchesFarmMarkdownRoutePattern(pattern, path))) {
70
+ continue;
71
+ }
72
+ if (exclude.some((pattern) => matchesFarmMarkdownRoutePattern(pattern, path))) continue;
73
+ if (isFarmMetadataNoIndex(source.metadata)) continue;
74
+ const target = isFarmMarkdownMirrorExposed(options.markdown, path) ? getFarmMarkdownMirrorPath(path) : path;
75
+ const description = readMetadataString(source.metadata, "description");
76
+ pages.set(path, {
77
+ path,
78
+ title: readMetadataTitle(source.metadata) ?? fallbackPageTitle(path),
79
+ url: `${options.origin}${applyFarmBasePath(target, options.basePath)}`,
80
+ ...description ? { description } : {}
81
+ });
82
+ }
83
+ return [...pages.values()].sort((left, right) => left.path.localeCompare(right.path));
84
+ }
85
+ __name(collectFarmLlmsTxtPages, "collectFarmLlmsTxtPages");
86
+ function isFarmMetadataNoIndex(metadata) {
87
+ if (!metadata || typeof metadata !== "object") return false;
88
+ const robots = metadata.robots;
89
+ if (typeof robots === "string") {
90
+ return robots.split(",").map((directive) => directive.trim().toLowerCase()).some((directive) => directive === "noindex" || directive === "none");
91
+ }
92
+ return Boolean(
93
+ robots && typeof robots === "object" && robots.index === false
94
+ );
95
+ }
96
+ __name(isFarmMetadataNoIndex, "isFarmMetadataNoIndex");
97
+ function createFarmDefaultLlmsTxt(options) {
98
+ const { config, pages } = options;
99
+ const mcp = options.mcp ?? [];
100
+ const summary = config.summary ?? readMetadataString(options.rootMetadata, "description");
101
+ return {
102
+ title: config.title ?? readMetadataTitle(options.rootMetadata) ?? pages.find((page) => page.path === "/")?.title ?? new URL(options.origin).host,
103
+ ...summary ? { summary } : {},
104
+ ...config.details ? { details: config.details } : {},
105
+ sections: [
106
+ ...pages.length ? [
107
+ {
108
+ title: "Pages",
109
+ links: pages.map(({ title, url, description }) => ({
110
+ title,
111
+ url,
112
+ ...description ? { description } : {}
113
+ }))
114
+ }
115
+ ] : [],
116
+ ...mcp.length ? [{ title: "MCP", links: mcp }] : []
117
+ ]
118
+ };
119
+ }
120
+ __name(createFarmDefaultLlmsTxt, "createFarmDefaultLlmsTxt");
121
+ function serializeFarmLlmsTxt(value) {
122
+ if (typeof value === "string") {
123
+ if (!value.trim()) throw new TypeError("llms.ts returned an empty llms.txt");
124
+ return value.endsWith("\n") ? value : `${value}
125
+ `;
126
+ }
127
+ if (!isRecord(value)) {
128
+ throw new TypeError("llms.ts must return llms.txt text, an llms.txt object, or a Response");
129
+ }
130
+ const title = requireText(value.title, "llms.ts must return a non-empty title");
131
+ const summary = optionalText(value.summary, "llms.ts summary must be a string");
132
+ const details = optionalText(value.details, "llms.ts details must be a string");
133
+ if (value.sections !== void 0 && !Array.isArray(value.sections)) {
134
+ throw new TypeError("llms.ts sections must be an array");
135
+ }
136
+ const blocks = [`# ${toSingleLine(title)}`];
137
+ if (summary?.trim()) blocks.push(`> ${toSingleLine(summary)}`);
138
+ if (details?.trim()) blocks.push(details.trim());
139
+ for (const [sectionIndex, section] of (value.sections ?? []).entries()) {
140
+ if (!isRecord(section)) {
141
+ throw new TypeError(`llms.ts section ${sectionIndex} must be an object`);
142
+ }
143
+ const sectionTitle = requireText(
144
+ section.title,
145
+ `llms.ts section ${sectionIndex} must include a non-empty title`
146
+ );
147
+ if (!Array.isArray(section.links)) {
148
+ throw new TypeError(`llms.ts section "${sectionTitle}" must include a links array`);
149
+ }
150
+ const links = section.links.map((link, linkIndex) => {
151
+ const where = `llms.ts section "${sectionTitle}" link ${linkIndex}`;
152
+ if (!isRecord(link)) throw new TypeError(`${where} must be an object`);
153
+ const linkTitle = requireText(link.title, `${where} must include a non-empty title`);
154
+ const url = requireText(link.url, `${where} must include a non-empty url`);
155
+ const description = optionalText(link.description, `${where} description must be a string`);
156
+ return `- [${escapeLinkText(linkTitle)}](${escapeLinkUrl(url)})${description?.trim() ? `: ${toSingleLine(description)}` : ""}`;
157
+ });
158
+ blocks.push(`## ${toSingleLine(sectionTitle)}`, links.join("\n"));
159
+ }
160
+ return `${blocks.filter(Boolean).join("\n\n")}
161
+ `;
162
+ }
163
+ __name(serializeFarmLlmsTxt, "serializeFarmLlmsTxt");
164
+ function createFarmLlmsMarkdownReader(fetchMarkdown) {
165
+ return async (url) => {
166
+ try {
167
+ const response = await fetchMarkdown(
168
+ new Request(url, {
169
+ headers: { accept: "text/markdown", [FARM_INTERNAL_READ_HEADER]: "llms-full" }
170
+ })
171
+ );
172
+ const type = response.headers.get("content-type") ?? "";
173
+ if (!response.ok || !type.toLowerCase().startsWith("text/markdown")) {
174
+ await response.body?.cancel();
175
+ return null;
176
+ }
177
+ return await response.text();
178
+ } catch {
179
+ return null;
180
+ }
181
+ };
182
+ }
183
+ __name(createFarmLlmsMarkdownReader, "createFarmLlmsMarkdownReader");
184
+ var FARM_LLMS_FULL_PAGE_TIMEOUT_MS = 3e4;
185
+ var LLMS_PAGE_TIMED_OUT = /* @__PURE__ */ Symbol("farm.llms.pageTimedOut");
186
+ async function renderFarmLlmsFullTxt(value, options) {
187
+ const index = serializeFarmLlmsTxt(value);
188
+ if (typeof value === "string") return index;
189
+ const llms = value;
190
+ const links = [];
191
+ const seen = /* @__PURE__ */ new Set();
192
+ for (const section of llms.sections ?? []) {
193
+ for (const link of section.links) {
194
+ if (seen.has(link.url)) continue;
195
+ seen.add(link.url);
196
+ links.push(link);
197
+ }
198
+ }
199
+ const pageTimeout = options.pageTimeout ?? FARM_LLMS_FULL_PAGE_TIMEOUT_MS;
200
+ const readWithinTimeout = /* @__PURE__ */ __name(async (url) => {
201
+ let timer;
202
+ const timedOut = new Promise((resolve) => {
203
+ timer = setTimeout(resolve, pageTimeout, LLMS_PAGE_TIMED_OUT);
204
+ });
205
+ try {
206
+ const content = await Promise.race([options.readMarkdown(url), timedOut]);
207
+ if (content !== LLMS_PAGE_TIMED_OUT) return content;
208
+ options.onIncomplete?.();
209
+ return null;
210
+ } finally {
211
+ clearTimeout(timer);
212
+ }
213
+ }, "readWithinTimeout");
214
+ const contents = await mapWithConcurrency(
215
+ links,
216
+ options.concurrency ?? 4,
217
+ (link) => shouldInlineLlmsLink(link.url, options.origin) ? readWithinTimeout(link.url) : null
218
+ );
219
+ const blocks = [`# ${toSingleLine(llms.title)}`];
220
+ if (llms.summary?.trim()) blocks.push(`> ${toSingleLine(llms.summary)}`);
221
+ if (llms.details?.trim()) blocks.push(llms.details.trim());
222
+ const pages = links.map((link, index2) => {
223
+ const parts = [`## ${toSingleLine(link.title)}`, `URL: ${escapeLinkUrl(link.url)}`];
224
+ if (link.description?.trim()) parts.push(toSingleLine(link.description));
225
+ const content = stripFrontmatter(contents[index2] ?? "").trim();
226
+ if (content) parts.push(content);
227
+ return parts.join("\n\n");
228
+ });
229
+ if (pages.length) blocks.push(pages.join("\n\n---\n\n"));
230
+ return `${blocks.join("\n\n")}
231
+ `;
232
+ }
233
+ __name(renderFarmLlmsFullTxt, "renderFarmLlmsFullTxt");
234
+ function createFarmLlmsFullRenderer(options = {}) {
235
+ const now = options.now ?? Date.now;
236
+ const ttl = (options.revalidate ?? 0) * 1e3;
237
+ const maxEntries = options.maxEntries ?? 16;
238
+ const entries = /* @__PURE__ */ new Map();
239
+ let queue = Promise.resolve();
240
+ const settle = /* @__PURE__ */ __name((body, complete, onSettled) => onSettled ? body.then((value) => (onSettled(complete()), value)) : body, "settle");
241
+ return (origin, render, onSettled) => {
242
+ const entry = entries.get(origin);
243
+ if (entry && entry.expires > now()) return settle(entry.body, entry.complete, onSettled);
244
+ entries.delete(origin);
245
+ let complete = true;
246
+ const body = queue.then(
247
+ () => render({
248
+ incomplete: /* @__PURE__ */ __name(() => {
249
+ complete = false;
250
+ }, "incomplete")
251
+ })
252
+ );
253
+ queue = body.catch(() => {
254
+ });
255
+ const pending = { body, expires: Number.POSITIVE_INFINITY, complete: /* @__PURE__ */ __name(() => complete, "complete") };
256
+ entries.set(origin, pending);
257
+ if (entries.size > maxEntries) entries.delete(entries.keys().next().value);
258
+ body.then(
259
+ () => {
260
+ if (entries.get(origin) !== pending) return;
261
+ if (ttl > 0 && complete) pending.expires = now() + ttl;
262
+ else entries.delete(origin);
263
+ },
264
+ () => {
265
+ if (entries.get(origin) === pending) entries.delete(origin);
266
+ }
267
+ );
268
+ return settle(body, pending.complete, onSettled);
269
+ };
270
+ }
271
+ __name(createFarmLlmsFullRenderer, "createFarmLlmsFullRenderer");
272
+ function stripFrontmatter(markdown) {
273
+ const match = /^\uFEFF?---\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/.exec(markdown);
274
+ return match ? markdown.slice(match[0].length) : markdown;
275
+ }
276
+ __name(stripFrontmatter, "stripFrontmatter");
277
+ function shouldInlineLlmsLink(url, origin) {
278
+ let target;
279
+ try {
280
+ target = new URL(url, origin);
281
+ } catch {
282
+ return false;
283
+ }
284
+ return target.origin === origin && !/\/llms(-full)?\.txt$/.test(target.pathname);
285
+ }
286
+ __name(shouldInlineLlmsLink, "shouldInlineLlmsLink");
287
+ async function mapWithConcurrency(items, limit, run) {
288
+ const results = [];
289
+ let next = 0;
290
+ const worker = /* @__PURE__ */ __name(async () => {
291
+ while (next < items.length) {
292
+ const index = next++;
293
+ results[index] = await run(items[index]);
294
+ }
295
+ }, "worker");
296
+ await Promise.all(Array.from({ length: Math.min(Math.max(limit, 1), items.length) }, worker));
297
+ return results;
298
+ }
299
+ __name(mapWithConcurrency, "mapWithConcurrency");
300
+ function readMetadataTitle(metadata) {
301
+ if (!isRecord(metadata)) return void 0;
302
+ const { title } = metadata;
303
+ if (typeof title === "string") return title.trim() || void 0;
304
+ if (isRecord(title)) {
305
+ for (const key of ["absolute", "default"]) {
306
+ const value = title[key];
307
+ if (typeof value === "string" && value.trim()) return value.trim();
308
+ }
309
+ }
310
+ return void 0;
311
+ }
312
+ __name(readMetadataTitle, "readMetadataTitle");
313
+ function readMetadataString(metadata, key) {
314
+ if (!isRecord(metadata)) return void 0;
315
+ const value = metadata[key];
316
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
317
+ }
318
+ __name(readMetadataString, "readMetadataString");
319
+ function fallbackPageTitle(path) {
320
+ if (path === "/") return "Home";
321
+ const segments = path.split("/").filter(Boolean);
322
+ const segment = segments[segments.length - 1] ?? path;
323
+ const words = segment.replace(/[-_]+/g, " ").trim();
324
+ return words ? words[0].toUpperCase() + words.slice(1) : path;
325
+ }
326
+ __name(fallbackPageTitle, "fallbackPageTitle");
327
+ function toSingleLine(value) {
328
+ return value.replace(/\s+/g, " ").trim();
329
+ }
330
+ __name(toSingleLine, "toSingleLine");
331
+ function escapeLinkText(value) {
332
+ return toSingleLine(value).replace(/[\\[\]]/g, "\\$&");
333
+ }
334
+ __name(escapeLinkText, "escapeLinkText");
335
+ function escapeLinkUrl(value) {
336
+ return value.trim().replace(
337
+ /[\s()<>]/g,
338
+ (character) => character === "(" ? "%28" : character === ")" ? "%29" : encodeURIComponent(character)
339
+ );
340
+ }
341
+ __name(escapeLinkUrl, "escapeLinkUrl");
342
+ function requireText(value, message) {
343
+ if (typeof value !== "string" || !value.trim()) throw new TypeError(message);
344
+ return value;
345
+ }
346
+ __name(requireText, "requireText");
347
+ function optionalText(value, message) {
348
+ if (value === void 0) return void 0;
349
+ if (typeof value !== "string") throw new TypeError(message);
350
+ return value;
351
+ }
352
+ __name(optionalText, "optionalText");
353
+ function isRecord(value) {
354
+ return Boolean(value && typeof value === "object" && !Array.isArray(value));
355
+ }
356
+ __name(isRecord, "isRecord");
357
+
358
+ export {
359
+ resolveFarmLlmsTxtConfig,
360
+ collectFarmLlmsTxtPages,
361
+ isFarmMetadataNoIndex,
362
+ createFarmDefaultLlmsTxt,
363
+ serializeFarmLlmsTxt,
364
+ createFarmLlmsMarkdownReader,
365
+ renderFarmLlmsFullTxt,
366
+ createFarmLlmsFullRenderer
367
+ };
@@ -67,6 +67,7 @@ function isolateFarmServerPageGraph(ReactRuntime, element) {
67
67
  return ReactRuntime.createElement(Context.Provider, { value: false }, element);
68
68
  }
69
69
  _chunkS3JO3N4Hcjs.__name.call(void 0, isolateFarmServerPageGraph, "isolateFarmServerPageGraph");
70
+ var warnedUnserializableBoundaries = /* @__PURE__ */ new Set();
70
71
  function createFarmIsolatedClientBoundary(ReactRuntime, Component, moduleReference, exportName, islandStrategy) {
71
72
  function FarmIsolatedClientBoundary(props) {
72
73
  const Context = getBoundaryGraphContext(ReactRuntime);
@@ -79,9 +80,12 @@ function createFarmIsolatedClientBoundary(ReactRuntime, Component, moduleReferen
79
80
  try {
80
81
  serializedProps = serializeBoundaryPayload(props);
81
82
  } catch (error) {
82
- if (typeof window === "undefined") {
83
+ const message = error instanceof Error ? error.message : String(error);
84
+ const warningKey = `${moduleReference}#${exportName}:${message}`;
85
+ if (typeof window === "undefined" && !warnedUnserializableBoundaries.has(warningKey)) {
86
+ warnedUnserializableBoundaries.add(warningKey);
83
87
  console.warn(
84
- `[Farm.js] Could not isolate ${moduleReference}#${exportName}: ${error instanceof Error ? error.message : String(error)}. The server-rendered component was preserved without client hydration.`
88
+ `[Farm.js] Could not isolate ${moduleReference}#${exportName}: ${message}. The server-rendered component was preserved without client hydration.`
85
89
  );
86
90
  }
87
91
  return ReactRuntime.createElement(Component, props);
@@ -7,13 +7,13 @@ var _chunkSU7MH53Pcjs = require('./chunk-SU7MH53P.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkD227TIENcjs = require('./chunk-D227TIEN.cjs');
10
+ var _chunkFWE7LEQCcjs = require('./chunk-FWE7LEQC.cjs');
11
11
 
12
12
 
13
- var _chunkFFFW3OQ7cjs = require('./chunk-FFFW3OQ7.cjs');
13
+ var _chunkS6FJO323cjs = require('./chunk-S6FJO323.cjs');
14
14
 
15
15
 
16
- var _chunkU4KT7QP3cjs = require('./chunk-U4KT7QP3.cjs');
16
+ var _chunkOW67PDDScjs = require('./chunk-OW67PDDS.cjs');
17
17
 
18
18
 
19
19
  var _chunkBIDYX3SLcjs = require('./chunk-BIDYX3SL.cjs');
@@ -52,7 +52,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, shouldBlockUnload, "shouldBlockUnload");
52
52
  function navigateViaRouter(href, basePath, replace, options = {}) {
53
53
  if (typeof window === "undefined") return;
54
54
  const url = _chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, href, basePath);
55
- const spaRouter = _chunkD227TIENcjs.getInstalledFarmSPARouter.call(void 0, );
55
+ const spaRouter = _chunkFWE7LEQCcjs.getInstalledFarmSPARouter.call(void 0, );
56
56
  if (spaRouter) {
57
57
  void spaRouter.navigate(url, {
58
58
  replace,
@@ -65,7 +65,7 @@ function navigateViaRouter(href, basePath, replace, options = {}) {
65
65
  } else {
66
66
  window.history.pushState(null, "", url);
67
67
  }
68
- _chunkD227TIENcjs.notifyHistoryChange.call(void 0, "url-search");
68
+ _chunkFWE7LEQCcjs.notifyHistoryChange.call(void 0, "url-search");
69
69
  }
70
70
  _chunkS3JO3N4Hcjs.__name.call(void 0, navigateViaRouter, "navigateViaRouter");
71
71
  function useRouter(options = {}) {
@@ -85,7 +85,7 @@ function useRouter(options = {}) {
85
85
  setState(readRouterState(basePath, routeMatcher));
86
86
  }, "handlePopState");
87
87
  handlePopState();
88
- const unsubscribe = _chunkD227TIENcjs.subscribeHistoryChange.call(void 0, handlePopState);
88
+ const unsubscribe = _chunkFWE7LEQCcjs.subscribeHistoryChange.call(void 0, handlePopState);
89
89
  return unsubscribe;
90
90
  }, [basePath, routeMatcher]);
91
91
  const push = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (href, navigateOptions) => {
@@ -96,11 +96,11 @@ function useRouter(options = {}) {
96
96
  }, "replace");
97
97
  const pushState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (pageState, href) => {
98
98
  if (typeof window === "undefined") return;
99
- _chunkD227TIENcjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
99
+ _chunkFWE7LEQCcjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
100
100
  }, "pushState");
101
101
  const replaceState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (pageState, href) => {
102
102
  if (typeof window === "undefined") return;
103
- _chunkD227TIENcjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
103
+ _chunkFWE7LEQCcjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
104
104
  }, "replaceState");
105
105
  const back = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
106
106
  if (typeof window !== "undefined") {
@@ -124,25 +124,25 @@ function useRouter(options = {}) {
124
124
  }
125
125
  _chunkS3JO3N4Hcjs.__name.call(void 0, useRouter, "useRouter");
126
126
  function usePageState() {
127
- const [state, setState] = _react.useState.call(void 0, () => _chunkD227TIENcjs.readPageState.call(void 0, ));
127
+ const [state, setState] = _react.useState.call(void 0, () => _chunkFWE7LEQCcjs.readPageState.call(void 0, ));
128
128
  _react.useEffect.call(void 0, () => {
129
129
  if (typeof window === "undefined") return;
130
130
  const handlePopState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
131
- setState(_chunkD227TIENcjs.readPageState.call(void 0, ));
131
+ setState(_chunkFWE7LEQCcjs.readPageState.call(void 0, ));
132
132
  }, "handlePopState");
133
133
  handlePopState();
134
- return _chunkD227TIENcjs.subscribeHistoryChange.call(void 0, handlePopState);
134
+ return _chunkFWE7LEQCcjs.subscribeHistoryChange.call(void 0, handlePopState);
135
135
  }, []);
136
136
  return state;
137
137
  }
138
138
  _chunkS3JO3N4Hcjs.__name.call(void 0, usePageState, "usePageState");
139
139
  function useNavigation() {
140
140
  const [state, setState] = _react.useState.call(void 0,
141
- () => _chunkD227TIENcjs.getRouter.call(void 0, ).getNavigationState()
141
+ () => _chunkFWE7LEQCcjs.getRouter.call(void 0, ).getNavigationState()
142
142
  );
143
143
  _react.useEffect.call(void 0, () => {
144
144
  if (typeof window === "undefined") return;
145
- return _chunkD227TIENcjs.getRouter.call(void 0, ).subscribeNavigation(setState);
145
+ return _chunkFWE7LEQCcjs.getRouter.call(void 0, ).subscribeNavigation(setState);
146
146
  }, []);
147
147
  return state;
148
148
  }
@@ -155,7 +155,7 @@ function useBlocker(options) {
155
155
  if (typeof window === "undefined" || !active) {
156
156
  return;
157
157
  }
158
- return _chunkD227TIENcjs.getRouter.call(void 0, ).addBlocker(
158
+ return _chunkFWE7LEQCcjs.getRouter.call(void 0, ).addBlocker(
159
159
  async (context) => {
160
160
  const current = optionsRef.current;
161
161
  const when = typeof current.when === "function" ? current.when(context) : current.when;
@@ -179,7 +179,7 @@ function useScrollRestoration(key) {
179
179
  _react.useEffect.call(void 0, () => {
180
180
  const element = ref.current;
181
181
  if (!element) return;
182
- return _chunkD227TIENcjs.getRouter.call(void 0, ).registerScrollElement(key, element);
182
+ return _chunkFWE7LEQCcjs.getRouter.call(void 0, ).registerScrollElement(key, element);
183
183
  }, [key]);
184
184
  return ref;
185
185
  }
@@ -195,13 +195,13 @@ function readRouterState(basePath, routeMatcher) {
195
195
  };
196
196
  }
197
197
  const pathname = normalizeClientPathname(url.pathname, basePath);
198
- const i18n = _chunkFFFW3OQ7cjs.getFarmI18nClientState.call(void 0, );
198
+ const i18n = _chunkS6FJO323cjs.getFarmI18nClientState.call(void 0, );
199
199
  const routePathname = i18n ? _chunkBIDYX3SLcjs.stripFarmLocaleFromPathname.call(void 0, pathname, { ...i18n, basePath: "/" }) : pathname;
200
200
  return {
201
201
  pathname,
202
202
  searchParams: url.searchParams,
203
203
  params: _optionalChain([routeMatcher, 'optionalAccess', _5 => _5.match, 'call', _6 => _6(routePathname), 'optionalAccess', _7 => _7.params]) || {},
204
- pageState: typeof window === "undefined" ? null : _chunkD227TIENcjs.readPageState.call(void 0, )
204
+ pageState: typeof window === "undefined" ? null : _chunkFWE7LEQCcjs.readPageState.call(void 0, )
205
205
  };
206
206
  }
207
207
  _chunkS3JO3N4Hcjs.__name.call(void 0, readRouterState, "readRouterState");
@@ -213,7 +213,7 @@ function readCurrentUrl() {
213
213
  return void 0;
214
214
  }
215
215
  }
216
- const request = _chunkU4KT7QP3cjs._resolveCurrentRequest.call(void 0, );
216
+ const request = _chunkOW67PDDScjs._resolveCurrentRequest.call(void 0, );
217
217
  if (!request) return void 0;
218
218
  try {
219
219
  return new URL(request.url);
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  loadFarmConfigFile,
18
18
  resolveFarmLayers
19
- } from "./chunk-JHWOVJ3M.mjs";
19
+ } from "./chunk-BUGNQIHC.mjs";
20
20
  import {
21
21
  isReactRenderer,
22
22
  resolveFarmRenderer
@@ -25,11 +25,14 @@ import {
25
25
  farmCspBlocksFrameworkInlineScripts,
26
26
  getFarmSecurityHeader,
27
27
  resolveFarmAgentCrawlers,
28
- resolveFarmLlmsTxtConfig,
28
+ resolveFarmAgentSitemap,
29
29
  resolveFarmNoindexPreviews,
30
30
  resolveFarmPerformanceConfig,
31
31
  resolveFarmSecurityConfig
32
- } from "./chunk-UJD4PHYB.mjs";
32
+ } from "./chunk-4E5WBPEG.mjs";
33
+ import {
34
+ resolveFarmLlmsTxtConfig
35
+ } from "./chunk-DTSROJ5J.mjs";
33
36
  import {
34
37
  resolveFarmImageConfig
35
38
  } from "./chunk-G2KY33I6.mjs";
@@ -38,7 +41,7 @@ import {
38
41
  } from "./chunk-YHOCRI4H.mjs";
39
42
  import {
40
43
  resolveServerActionsConfig
41
- } from "./chunk-SMHH4VDG.mjs";
44
+ } from "./chunk-4WVJLURN.mjs";
42
45
  import {
43
46
  resolveEnv,
44
47
  setEnv
@@ -54,16 +57,16 @@ import {
54
57
  } from "./chunk-SFGWNC43.mjs";
55
58
  import {
56
59
  resolveWorkflowsConfig
57
- } from "./chunk-6WCPV6G2.mjs";
60
+ } from "./chunk-Q2KB32T4.mjs";
58
61
  import {
59
62
  resolveFarmThemeConfig
60
63
  } from "./chunk-AELACLOB.mjs";
61
64
  import {
62
65
  resolveIntegrationPlugins
63
- } from "./chunk-HMIJDL7S.mjs";
66
+ } from "./chunk-Z5BEWYVO.mjs";
64
67
  import {
65
68
  resolveFarmServerConfig
66
- } from "./chunk-Y7RKTKYI.mjs";
69
+ } from "./chunk-ZMMBIVQM.mjs";
67
70
  import {
68
71
  resolveFarmI18nConfig
69
72
  } from "./chunk-BCMSYSN2.mjs";
@@ -139,9 +142,14 @@ function resolveFarmAgentConfig(input, context = {}) {
139
142
  // The docs engine answers /llms.txt with its own pages; a default here would replace it.
140
143
  // llms-full.txt renders every listed page, so it stays opt-in.
141
144
  llmsTxt: resolveFarmLlmsTxtConfig(input?.llmsTxt ?? (context.docs ? false : { full: false })),
145
+ // Same rule as llms.txt: the docs engine answers /sitemap.xml with its own pages.
146
+ sitemap: resolveFarmAgentSitemap(input?.sitemap ?? !context.docs),
142
147
  crawlers: resolveFarmAgentCrawlers(input?.crawlers),
143
148
  apiCatalog: resolveFarmAgentBoolean(input?.apiCatalog, "apiCatalog", false),
144
- aiCatalog: resolveFarmAgentBoolean(input?.aiCatalog, "aiCatalog", true)
149
+ aiCatalog: resolveFarmAgentBoolean(input?.aiCatalog, "aiCatalog", true),
150
+ manifest: resolveFarmAgentBoolean(input?.manifest, "manifest", true),
151
+ // Same rule as llms.txt: the docs engine serves its own MCP server at /mcp.
152
+ mcp: resolveFarmAgentBoolean(input?.mcp, "mcp", !context.docs)
145
153
  };
146
154
  }
147
155
  __name(resolveFarmAgentConfig, "resolveFarmAgentConfig");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  matchesFarmIfNoneMatch
3
- } from "./chunk-Y7RKTKYI.mjs";
3
+ } from "./chunk-ZMMBIVQM.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-LPEX4YW6.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createFarmMarkdownRouteModule
3
- } from "./chunk-4JHOT46A.mjs";
3
+ } from "./chunk-TPLJVC7E.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-LPEX4YW6.mjs";