@farm.js/core 0.1.69 → 0.1.71

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 (314) hide show
  1. package/dist/{agent-mcp-handler-FER4MQDF.cjs → agent-mcp-handler-KE4J3W7S.cjs} +8 -5
  2. package/dist/{agent-mcp-handler-AZ7QW4UP.mjs → agent-mcp-handler-VIT4GOSR.mjs} +7 -4
  3. package/dist/{agent-mcp.d-DOfBMEzP.d.mts → agent-mcp.d-BzNw6JI8.d.ts} +24 -5
  4. package/dist/{agent-mcp.d-DnIgriX1.d.ts → agent-mcp.d-CgFen3EH.d.mts} +24 -5
  5. package/dist/agent-runtime.cjs +3 -3
  6. package/dist/agent-runtime.d.mts +3 -2
  7. package/dist/agent-runtime.d.ts +3 -2
  8. package/dist/agent-runtime.mjs +2 -2
  9. package/dist/analyzer-LPIVRSTJ.cjs +16 -0
  10. package/dist/{analyzer-NAL5TJUP.mjs → analyzer-VK3BAOFI.mjs} +2 -2
  11. package/dist/api/node.d.mts +5 -4
  12. package/dist/api/node.d.ts +5 -4
  13. package/dist/api/route-manager.cjs +4 -4
  14. package/dist/api/route-manager.d.mts +16 -7
  15. package/dist/api/route-manager.d.ts +16 -7
  16. package/dist/api/route-manager.mjs +3 -3
  17. package/dist/api/runtime.d.mts +4 -3
  18. package/dist/api/runtime.d.ts +4 -3
  19. package/dist/api.cjs +6 -6
  20. package/dist/api.d.mts +8 -7
  21. package/dist/api.d.ts +8 -7
  22. package/dist/api.mjs +5 -5
  23. package/dist/{app-manifest.d-CaAcaukR.d.ts → app-manifest.d-DY4JfJxi.d.ts} +1 -1
  24. package/dist/{app-manifest.d-_BVbI0xp.d.mts → app-manifest.d-DpDK_B1k.d.mts} +1 -1
  25. package/dist/app-markdown.cjs +7 -4
  26. package/dist/app-markdown.d.mts +5 -4
  27. package/dist/app-markdown.d.ts +5 -4
  28. package/dist/app-markdown.mjs +6 -3
  29. package/dist/{app.d-BWeDqOaF.d.ts → app.d-BeK6bb1c.d.ts} +22 -10
  30. package/dist/{app.d-CaPwtytN.d.mts → app.d-D-5UNrFd.d.mts} +22 -10
  31. package/dist/{base-path.d-CTDVF0Fc.d.mts → base-path.d-BJ3SYpB8.d.mts} +6 -1
  32. package/dist/{base-path.d-CTDVF0Fc.d.ts → base-path.d-BJ3SYpB8.d.ts} +6 -1
  33. package/dist/{chunk-4ZXKYCYK.mjs → chunk-255J7K4X.mjs} +1 -1
  34. package/dist/{chunk-RVGLYMJM.cjs → chunk-2AM26UGI.cjs} +2 -2
  35. package/dist/{chunk-5TOWKGV3.mjs → chunk-2CQC5CMD.mjs} +1 -1
  36. package/dist/{chunk-VO65MYJD.cjs → chunk-2IFT2CSA.cjs} +4 -4
  37. package/dist/{chunk-UPOYKX4S.cjs → chunk-2MR4MABG.cjs} +4 -4
  38. package/dist/chunk-2RCCFB2Y.cjs +129 -0
  39. package/dist/{chunk-K6VFYFOY.cjs → chunk-2W4GNXGX.cjs} +2 -2
  40. package/dist/{chunk-CV6MFQ4Y.mjs → chunk-3AUINHFG.mjs} +1 -1
  41. package/dist/{chunk-TKYOJ5G2.cjs → chunk-3BQ7QHUH.cjs} +5 -5
  42. package/dist/{chunk-MMDKYJ5V.cjs → chunk-3GNVIYPO.cjs} +7 -7
  43. package/dist/{chunk-65Y5SIBH.cjs → chunk-3QM74STY.cjs} +1 -1
  44. package/dist/{chunk-FJMC24KG.cjs → chunk-42KMUIWZ.cjs} +0 -3
  45. package/dist/{chunk-YVPX5PI5.mjs → chunk-4O26BPUY.mjs} +8 -0
  46. package/dist/{chunk-PDQ6EGPK.mjs → chunk-4OD2LXF2.mjs} +2 -2
  47. package/dist/{chunk-LENKRGBV.mjs → chunk-5CFHQ7HM.mjs} +1 -1
  48. package/dist/{chunk-3Y52TWYU.mjs → chunk-62ZRA7XU.mjs} +0 -3
  49. package/dist/{chunk-K76CBYQM.mjs → chunk-7A3URI2F.mjs} +20 -0
  50. package/dist/{chunk-UHU4QALN.mjs → chunk-7BUE2GM6.mjs} +294 -164
  51. package/dist/{chunk-L6NWQ3DR.cjs → chunk-7OHJWFLB.cjs} +600 -469
  52. package/dist/{chunk-VX2HZGC7.cjs → chunk-ACGBXN3U.cjs} +2 -2
  53. package/dist/{chunk-MV7NWU23.mjs → chunk-AYVGD3PK.mjs} +1 -1
  54. package/dist/{chunk-FT6KJHS3.cjs → chunk-C2JOS77Z.cjs} +4 -1
  55. package/dist/{chunk-CRVSYDHV.mjs → chunk-CKQAQFF6.mjs} +2 -2
  56. package/dist/{chunk-QOGIZKSO.cjs → chunk-CSQPMV3Q.cjs} +21 -11
  57. package/dist/chunk-DC2AXGNZ.mjs +129 -0
  58. package/dist/{chunk-Q4HH5Q6A.cjs → chunk-DMXMIE2C.cjs} +2 -2
  59. package/dist/{chunk-MAGFDK4Q.mjs → chunk-DPIGYXSV.mjs} +1 -1
  60. package/dist/{chunk-GUMKIQJL.cjs → chunk-DPYBVVL3.cjs} +2 -2
  61. package/dist/{chunk-23VJEGKC.cjs → chunk-DVJM55D2.cjs} +9 -1
  62. package/dist/{chunk-QSUYB3RH.cjs → chunk-DZHTNSQ5.cjs} +14 -14
  63. package/dist/{chunk-OIOPQ25L.mjs → chunk-E77IA5IF.mjs} +46 -33
  64. package/dist/{chunk-EZTKXD6P.cjs → chunk-FDGYDQGL.cjs} +8 -1
  65. package/dist/{chunk-PLJKJJ2H.mjs → chunk-FETMUBIA.mjs} +27 -82
  66. package/dist/{chunk-HJZZSBVK.cjs → chunk-FILXOEWD.cjs} +2 -2
  67. package/dist/{chunk-PDFFYZAT.cjs → chunk-GF22VGMS.cjs} +2 -2
  68. package/dist/{chunk-IYLZZTP6.mjs → chunk-GUU3IZSM.mjs} +167 -77
  69. package/dist/{chunk-OOJBBHYW.cjs → chunk-GVYZCJZH.cjs} +30 -1
  70. package/dist/{chunk-YOHHL2UE.mjs → chunk-I4KPA2C6.mjs} +1 -1
  71. package/dist/{chunk-PEYDQMSA.mjs → chunk-IGXS54GC.mjs} +6 -6
  72. package/dist/{chunk-NVOMQLI2.mjs → chunk-IWJONXPF.mjs} +11 -0
  73. package/dist/{chunk-SZORL7EW.mjs → chunk-IYDJNCR7.mjs} +6 -6
  74. package/dist/{chunk-HEJM46HQ.mjs → chunk-J5ASGNKF.mjs} +28 -2
  75. package/dist/{chunk-RLH5AH2M.mjs → chunk-JDO346NV.mjs} +1 -1
  76. package/dist/{chunk-K6SXMVXO.mjs → chunk-JMFTKNBA.mjs} +22 -7
  77. package/dist/{chunk-YIHRZBD7.cjs → chunk-JRGR5Z4K.cjs} +1 -1
  78. package/dist/{chunk-4W4ZWSV2.cjs → chunk-JVA4PIYN.cjs} +604 -434
  79. package/dist/{chunk-UKZ6AWKZ.cjs → chunk-JWY66PID.cjs} +44 -1
  80. package/dist/{chunk-BDYM2TN3.cjs → chunk-JX5VOLAV.cjs} +8 -8
  81. package/dist/{chunk-WMLSZAKN.mjs → chunk-JZQS3ZOI.mjs} +1 -1
  82. package/dist/{chunk-OFBLGH6V.cjs → chunk-K66JILV3.cjs} +47 -34
  83. package/dist/{chunk-6GQJVY4E.cjs → chunk-KEB7AGS6.cjs} +17 -17
  84. package/dist/{chunk-IFR74W6S.mjs → chunk-KPJYBSHL.mjs} +4 -1
  85. package/dist/{chunk-TEJ67GD2.mjs → chunk-KQAB5LML.mjs} +28 -6
  86. package/dist/{chunk-DHR2WDSL.cjs → chunk-KWST2O22.cjs} +387 -297
  87. package/dist/{chunk-3EEINK7G.cjs → chunk-L6E4SHUB.cjs} +41 -15
  88. package/dist/{chunk-KI3MU7B5.mjs → chunk-LDVJIBGN.mjs} +1 -1
  89. package/dist/{chunk-5FBZJJGA.mjs → chunk-LXEJNWF5.mjs} +2 -2
  90. package/dist/{chunk-AKIQ54FK.cjs → chunk-MBCRWU3P.cjs} +26 -81
  91. package/dist/{chunk-22LGTSBA.cjs → chunk-MEJCP2LX.cjs} +1 -1
  92. package/dist/{chunk-ZR2QB45W.mjs → chunk-MITIAOUQ.mjs} +4 -4
  93. package/dist/{chunk-OCNV4CI2.cjs → chunk-MQ4DYVFS.cjs} +26 -0
  94. package/dist/{chunk-P2NBQ5JI.mjs → chunk-MWUDEYBI.mjs} +1 -1
  95. package/dist/{chunk-LR4KP3I7.cjs → chunk-N3XO5AL5.cjs} +2 -2
  96. package/dist/{chunk-ZPKJPM7K.mjs → chunk-NA77GEIU.mjs} +2 -2
  97. package/dist/{chunk-FVYBEMOD.cjs → chunk-NAXKOTPP.cjs} +6 -6
  98. package/dist/{chunk-I7J5RLGO.cjs → chunk-NLBHLPEO.cjs} +12 -1
  99. package/dist/{chunk-R2ZHU37O.mjs → chunk-NLRAQXAA.mjs} +26 -0
  100. package/dist/{chunk-QO43L7Z4.cjs → chunk-O32QPFVV.cjs} +25 -7
  101. package/dist/{chunk-CO6UYM2D.mjs → chunk-O5QUJEWT.mjs} +1 -1
  102. package/dist/{chunk-JL2YW5KX.mjs → chunk-OAEDVXVE.mjs} +44 -1
  103. package/dist/{chunk-F6YLXK5L.cjs → chunk-PLXD2MJV.cjs} +19 -19
  104. package/dist/{chunk-JFPKARWM.cjs → chunk-PMU4U2W2.cjs} +1 -0
  105. package/dist/{chunk-GTQOEEE7.cjs → chunk-Q5HMVGR5.cjs} +13 -13
  106. package/dist/{chunk-ZYCEEE3V.mjs → chunk-QUFENL7Q.mjs} +2 -2
  107. package/dist/{chunk-QOSDWGKT.mjs → chunk-QVBXTSIZ.mjs} +1 -1
  108. package/dist/{chunk-OGVTUGMU.mjs → chunk-REP6HWJN.mjs} +13 -3
  109. package/dist/{chunk-ANMIR6US.mjs → chunk-RJUCNO7R.mjs} +1 -1
  110. package/dist/{chunk-WYL4ODZ4.mjs → chunk-SE7HPBYK.mjs} +30 -1
  111. package/dist/{chunk-GQ6QOH7T.cjs → chunk-SXMWVP2L.cjs} +12 -12
  112. package/dist/{chunk-D5F7RPZP.mjs → chunk-THG2TVDH.mjs} +3 -3
  113. package/dist/{chunk-X3MHKLCO.cjs → chunk-TP4RAV7Y.cjs} +25 -10
  114. package/dist/{chunk-DWLNLU55.cjs → chunk-TPYAYFMF.cjs} +2 -2
  115. package/dist/{chunk-Y6KHPJDB.cjs → chunk-U7VH3Q5E.cjs} +2 -2
  116. package/dist/{chunk-4JRAMCUP.cjs → chunk-UISZLYKY.cjs} +22 -22
  117. package/dist/{chunk-CKCKCUYO.mjs → chunk-UQUOSNRN.mjs} +511 -341
  118. package/dist/{chunk-2P7UYHZP.mjs → chunk-V25GSH43.mjs} +1 -1
  119. package/dist/{chunk-437QZIC2.cjs → chunk-VNBDN5W2.cjs} +5 -5
  120. package/dist/{chunk-ABIBASLJ.cjs → chunk-VXB5CMNC.cjs} +2 -2
  121. package/dist/{chunk-G7NBPP7H.mjs → chunk-W2T6NDNP.mjs} +11 -1
  122. package/dist/{chunk-AJNBTOVQ.mjs → chunk-WW3LRNQV.mjs} +1 -1
  123. package/dist/{chunk-GFPS7MNE.mjs → chunk-WX63N6C5.mjs} +4 -4
  124. package/dist/{chunk-ULMXZYOA.mjs → chunk-X7LGLF33.mjs} +1 -1
  125. package/dist/{chunk-VOQ7XZZT.cjs → chunk-Y2SZVIVH.cjs} +20 -0
  126. package/dist/{chunk-XCAQTCGK.mjs → chunk-YBY34UHB.mjs} +1 -1
  127. package/dist/{chunk-5NFQ6AZI.cjs → chunk-YCNHUIPR.cjs} +33 -11
  128. package/dist/{chunk-YGJ5P3TJ.mjs → chunk-Z3GPAFIA.mjs} +21 -3
  129. package/dist/{chunk-PJQ5W356.mjs → chunk-Z5ZZAGIH.mjs} +1 -0
  130. package/dist/{chunk-L5OZN6YW.cjs → chunk-ZPUAOKHV.cjs} +3 -3
  131. package/dist/{chunk-4E57QHPW.cjs → chunk-ZUVAGMQ5.cjs} +17 -7
  132. package/dist/{chunk-23LVFSID.mjs → chunk-ZXDX7VYZ.mjs} +7 -0
  133. package/dist/{client-component.d-CnEeVvGG.d.mts → client-component.d-DwpH251K.d.mts} +2 -2
  134. package/dist/{client-component.d-CfJxuXZl.d.ts → client-component.d-fYupugbZ.d.ts} +2 -2
  135. package/dist/{client-plugins.d-D7dHV1Nf.d.ts → client-plugins.d-BxqFfHpM.d.ts} +39 -3
  136. package/dist/{client-plugins.d-Do5ULA0x.d.mts → client-plugins.d-k3bOT5gz.d.mts} +39 -3
  137. package/dist/client-plugins.d.mts +3 -2
  138. package/dist/client-plugins.d.ts +3 -2
  139. package/dist/client.cjs +6 -6
  140. package/dist/client.d.mts +8 -7
  141. package/dist/client.d.ts +8 -7
  142. package/dist/client.mjs +5 -5
  143. package/dist/config.d.mts +3 -2
  144. package/dist/config.d.ts +3 -2
  145. package/dist/deployment.cjs +4 -2
  146. package/dist/deployment.d.mts +7 -1
  147. package/dist/deployment.d.ts +7 -1
  148. package/dist/deployment.mjs +5 -3
  149. package/dist/desktop.d.mts +4 -3
  150. package/dist/desktop.d.ts +4 -3
  151. package/dist/{dev-guard-ONNMVQUN.mjs → dev-guard-ZDIELV6Q.mjs} +1 -1
  152. package/dist/{dev-guard-2UW2KERP.cjs → dev-guard-ZLLKVO5T.cjs} +2 -2
  153. package/dist/{devtools-BP4EBTKQ.mjs → devtools-6MXPFPNJ.mjs} +9 -8
  154. package/dist/{devtools-7HNDS4SY.cjs → devtools-O5625KCK.cjs} +10 -9
  155. package/dist/docs.cjs +13 -12
  156. package/dist/docs.d.mts +4 -3
  157. package/dist/docs.d.ts +4 -3
  158. package/dist/docs.mjs +12 -11
  159. package/dist/environment/vite.cjs +3 -3
  160. package/dist/environment/vite.mjs +2 -2
  161. package/dist/headers.d-DalIGbVO.d.ts +18 -0
  162. package/dist/headers.d-sNT7ZQiU.d.mts +18 -0
  163. package/dist/i18n/client.cjs +2 -2
  164. package/dist/i18n/client.d.mts +2 -2
  165. package/dist/i18n/client.d.ts +2 -2
  166. package/dist/i18n/client.mjs +1 -1
  167. package/dist/i18n/index.cjs +2 -2
  168. package/dist/i18n/index.d.mts +3 -3
  169. package/dist/i18n/index.d.ts +3 -3
  170. package/dist/i18n/index.mjs +1 -1
  171. package/dist/i18n/server.cjs +3 -3
  172. package/dist/i18n/server.d.mts +5 -5
  173. package/dist/i18n/server.d.ts +5 -5
  174. package/dist/i18n/server.mjs +2 -2
  175. package/dist/index.cjs +50 -45
  176. package/dist/{index.d-CVFk37uX.d.ts → index.d-BcA-secm.d.ts} +1 -1
  177. package/dist/{index.d-B1MpEJAo.d.mts → index.d-DDHHAv7j.d.mts} +1 -1
  178. package/dist/index.d.mts +26 -24
  179. package/dist/index.d.ts +26 -24
  180. package/dist/index.mjs +63 -58
  181. package/dist/integrations/orm.d.mts +3 -2
  182. package/dist/integrations/orm.d.ts +3 -2
  183. package/dist/integrations.cjs +3 -3
  184. package/dist/integrations.d.mts +3 -2
  185. package/dist/integrations.d.ts +3 -2
  186. package/dist/integrations.mjs +2 -2
  187. package/dist/internal/app-markdown-runtime.cjs +6 -3
  188. package/dist/internal/app-markdown-runtime.d.mts +13 -4
  189. package/dist/internal/app-markdown-runtime.d.ts +13 -4
  190. package/dist/internal/app-markdown-runtime.mjs +5 -2
  191. package/dist/internal/build-runtime.cjs +37 -37
  192. package/dist/internal/build-runtime.d.mts +5 -4
  193. package/dist/internal/build-runtime.d.ts +5 -4
  194. package/dist/internal/build-runtime.mjs +36 -36
  195. package/dist/internal/cli-runtime.cjs +18 -15
  196. package/dist/internal/cli-runtime.mjs +17 -14
  197. package/dist/internal/client-error-overlay.cjs +4 -4
  198. package/dist/internal/client-error-overlay.mjs +1 -1
  199. package/dist/internal/client-runtime.cjs +5 -3
  200. package/dist/internal/client-runtime.d.mts +17 -7
  201. package/dist/internal/client-runtime.d.ts +17 -7
  202. package/dist/internal/client-runtime.mjs +4 -2
  203. package/dist/internal/compression-runtime.d.mts +3 -2
  204. package/dist/internal/compression-runtime.d.ts +3 -2
  205. package/dist/internal/config-runtime.cjs +11 -10
  206. package/dist/internal/config-runtime.d.mts +6 -5
  207. package/dist/internal/config-runtime.d.ts +6 -5
  208. package/dist/internal/config-runtime.mjs +10 -9
  209. package/dist/internal/infra-analytics-runtime.cjs +12 -9
  210. package/dist/internal/infra-analytics-runtime.mjs +10 -7
  211. package/dist/internal/native-server-fns.cjs +4 -4
  212. package/dist/internal/native-server-fns.mjs +3 -3
  213. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  214. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  215. package/dist/internal/production-runtime.cjs +48 -17
  216. package/dist/internal/production-runtime.d.mts +53 -18
  217. package/dist/internal/production-runtime.d.ts +53 -18
  218. package/dist/internal/production-runtime.mjs +50 -19
  219. package/dist/internal/vercel-edge-middleware.cjs +3 -2
  220. package/dist/internal/vercel-edge-middleware.d.mts +2 -2
  221. package/dist/internal/vercel-edge-middleware.d.ts +2 -2
  222. package/dist/internal/vercel-edge-middleware.mjs +2 -1
  223. package/dist/markdown.cjs +3 -2
  224. package/dist/markdown.d.mts +3 -2
  225. package/dist/markdown.d.ts +3 -2
  226. package/dist/markdown.mjs +2 -1
  227. package/dist/middleware.cjs +6 -5
  228. package/dist/middleware.d.mts +4 -3
  229. package/dist/middleware.d.ts +4 -3
  230. package/dist/middleware.mjs +5 -4
  231. package/dist/mobile.d.mts +3 -3
  232. package/dist/mobile.d.ts +3 -3
  233. package/dist/{mount.d-CBqr-LfI.d.mts → mount.d-C1PONsEe.d.mts} +1 -1
  234. package/dist/{mount.d-CGzN61Kq.d.ts → mount.d-D3JOux2V.d.ts} +1 -1
  235. package/dist/{native-tree-W2SSJB3Y.cjs → native-tree-GF4BH33L.cjs} +4 -3
  236. package/dist/{native-tree-Y5YQANW7.mjs → native-tree-L2IIEBXH.mjs} +3 -2
  237. package/dist/{navigation-delegate.d-BwCOhpj7.d.mts → navigation-delegate.d-CJQQHboA.d.mts} +1 -1
  238. package/dist/{navigation-delegate.d-CLH2dXjy.d.ts → navigation-delegate.d-CQQPbdkE.d.ts} +1 -1
  239. package/dist/navigation.cjs +5 -5
  240. package/dist/navigation.d.mts +6 -5
  241. package/dist/navigation.d.ts +6 -5
  242. package/dist/navigation.mjs +4 -4
  243. package/dist/{nitro-Y3LGITW3.cjs → nitro-2LMOMIST.cjs} +2 -2
  244. package/dist/{nitro-NSTXT7LB.mjs → nitro-72TFIGGO.mjs} +1 -1
  245. package/dist/{plugin-F2O4BFTK.cjs → plugin-5PIQQVRP.cjs} +2 -2
  246. package/dist/{plugin-VEBRN7A3.mjs → plugin-QZT747YW.mjs} +1 -1
  247. package/dist/plugin.cjs +30 -29
  248. package/dist/plugin.d.mts +6 -4
  249. package/dist/plugin.d.ts +6 -4
  250. package/dist/plugin.mjs +29 -28
  251. package/dist/{production-runtime.d-DMZY3OgV.d.mts → production-runtime.d-B0IeWWyO.d.mts} +23 -2
  252. package/dist/{production-runtime.d-BMyyLGBB.d.ts → production-runtime.d-q3aHIv5Y.d.ts} +23 -2
  253. package/dist/query/client.cjs +6 -6
  254. package/dist/query/client.mjs +2 -2
  255. package/dist/{render-plan.d-CzGDjcT0.d.mts → render-plan.d-CiUj0rq5.d.mts} +1 -1
  256. package/dist/{render-plan.d-W6LmjD6y.d.ts → render-plan.d-DHuJMJRP.d.ts} +1 -1
  257. package/dist/renderer-client.cjs +7 -7
  258. package/dist/renderer-client.d.mts +6 -5
  259. package/dist/renderer-client.d.ts +6 -5
  260. package/dist/renderer-client.mjs +3 -3
  261. package/dist/{request.d-CgNVderU.d.mts → request.d-D-F7o7tb.d.mts} +1 -1
  262. package/dist/{request.d-CTVRZiQv.d.ts → request.d-DRUbOmYD.d.ts} +1 -1
  263. package/dist/request.d.mts +4 -3
  264. package/dist/request.d.ts +4 -3
  265. package/dist/{resolver.d-JnZKKsc5.d.mts → resolver.d-9iKC79CU.d.mts} +1 -1
  266. package/dist/{resolver.d-BHyZgpa7.d.ts → resolver.d-CY6mEa_F.d.ts} +1 -1
  267. package/dist/response.d-B_MtBCnF.d.mts +12 -0
  268. package/dist/response.d-B_MtBCnF.d.ts +12 -0
  269. package/dist/{route-rendering.d-D0bmZVJA.d.mts → route-rendering.d-6smgwT2t.d.mts} +9 -2
  270. package/dist/{route-rendering.d-FDSNtCMg.d.ts → route-rendering.d-KwqM_mlK.d.ts} +9 -2
  271. package/dist/{router.d-DZ3ldniI.d.ts → router.d-B6sesMRD.d.ts} +1 -1
  272. package/dist/{router.d-GRKm_uAV.d.mts → router.d-BYmDeDlp.d.mts} +1 -1
  273. package/dist/{routes.d-CrEy0lJS.d.mts → routes.d-D3aJw1H5.d.mts} +1 -1
  274. package/dist/{routes.d-9GFFNioh.d.ts → routes.d-K-Qg79AA.d.ts} +1 -1
  275. package/dist/routes.d.mts +3 -2
  276. package/dist/routes.d.ts +3 -2
  277. package/dist/{index.d-BNNDpql4.d.ts → routing.d-BxOZ2YWc.d.ts} +1 -2
  278. package/dist/{index.d-BqcfqJvt.d.mts → routing.d-DwSUVZbF.d.mts} +1 -2
  279. package/dist/{rsc-pipeline-J4KKBSCH.cjs → rsc-pipeline-P4PCWDO2.cjs} +14 -13
  280. package/dist/{rsc-pipeline-PJZOVYSY.mjs → rsc-pipeline-R2GOKIMU.mjs} +13 -12
  281. package/dist/{runtime-QDBSE4H6.mjs → runtime-DP5DYGW5.mjs} +12 -11
  282. package/dist/{runtime-OLEO5NXF.cjs → runtime-WA2Q4SLG.cjs} +20 -19
  283. package/dist/{runtime.d-DqXihlxm.d.mts → runtime.d-BFSJf-ww.d.mts} +1 -1
  284. package/dist/{runtime.d-BtL3PCL3.d.ts → runtime.d-B_uPfMjA.d.ts} +2 -2
  285. package/dist/{runtime.d-pqFQBU2N.d.ts → runtime.d-CbdMI0Oy.d.ts} +1 -1
  286. package/dist/{runtime.d-3iJAKptR.d.mts → runtime.d-nUz0HAL4.d.mts} +2 -2
  287. package/dist/server-plugins.cjs +3 -2
  288. package/dist/server-plugins.d.mts +6 -12
  289. package/dist/server-plugins.d.ts +6 -12
  290. package/dist/server-plugins.mjs +2 -1
  291. package/dist/server.cjs +64 -56
  292. package/dist/server.d.mts +23 -14
  293. package/dist/server.d.ts +23 -14
  294. package/dist/server.mjs +40 -32
  295. package/dist/{spa-router.d-Dhvy60p4.d.mts → spa-router.d-D4EDwR20.d.mts} +3 -3
  296. package/dist/{spa-router.d-DhOhaQ-7.d.ts → spa-router.d-mC1D5cTN.d.ts} +3 -3
  297. package/dist/testing.cjs +3 -3
  298. package/dist/testing.d.mts +3 -2
  299. package/dist/testing.d.ts +3 -2
  300. package/dist/testing.mjs +3 -3
  301. package/dist/{types.d-C41ePjvP.d.ts → types.d-wVRlLtBf.d.mts} +1 -1
  302. package/dist/{types.d-C41ePjvP.d.mts → types.d-wVRlLtBf.d.ts} +1 -1
  303. package/dist/{utils.d-BVCMRRau.d.ts → utils.d-A2X3a6z_.d.ts} +1 -1
  304. package/dist/{utils.d-Q8EHCpkF.d.mts → utils.d-DxMzteqE.d.mts} +1 -1
  305. package/dist/version.cjs +2 -2
  306. package/dist/version.mjs +1 -1
  307. package/dist/vite.cjs +37 -29
  308. package/dist/vite.d.mts +28 -6
  309. package/dist/vite.d.ts +28 -6
  310. package/dist/vite.mjs +36 -28
  311. package/package.json +3 -3
  312. package/dist/analyzer-SAJSV6SP.cjs +0 -16
  313. package/dist/response.d-BolW0Vx_.d.mts +0 -10
  314. package/dist/response.d-BolW0Vx_.d.ts +0 -10
@@ -3,7 +3,13 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
6
+ var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
7
+
8
+
9
+ var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
10
+
11
+
12
+ var _chunkOWQV6MLMcjs = require('./chunk-OWQV6MLM.cjs');
7
13
 
8
14
 
9
15
  var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
@@ -59,22 +65,33 @@ function collectFarmLlmsTxtPages(sources, options) {
59
65
  for (const source of sources) {
60
66
  const path = source.pattern;
61
67
  if (path.includes("[") || pages.has(path)) continue;
62
- if (include.length && !include.some((pattern) => _chunkFT6KJHS3cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
68
+ if (include.length && !include.some((pattern) => _chunkC2JOS77Zcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
63
69
  continue;
64
70
  }
65
- if (exclude.some((pattern) => _chunkFT6KJHS3cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
71
+ if (exclude.some((pattern) => _chunkC2JOS77Zcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
66
72
  if (isFarmMetadataNoIndex(source.metadata)) continue;
67
- const target = _chunkFT6KJHS3cjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? _chunkFT6KJHS3cjs.getFarmMarkdownMirrorPath.call(void 0, path) : path;
73
+ const target = _chunkC2JOS77Zcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? getFarmAgentPagePublicPath(_chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, path), options) : _chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
74
+ getFarmAgentPagePublicPath(path, options),
75
+ options.trailingSlash === true
76
+ );
68
77
  const description = readMetadataString(source.metadata, "description");
69
78
  pages.set(path, {
70
79
  path,
71
80
  title: _nullishCoalesce(readMetadataTitle(source.metadata), () => ( fallbackPageTitle(path))),
72
- url: `${options.origin}${_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, target, options.basePath)}`,
81
+ url: `${options.origin}${target}`,
73
82
  ...description ? { description } : {}
74
83
  });
75
84
  }
76
85
  return [...pages.values()].sort((left, right) => left.path.localeCompare(right.path));
77
86
  }
87
+ function getFarmAgentPagePublicPath(pathname, options) {
88
+ const { i18n } = options;
89
+ if (!i18n || i18n.enabled === false) return _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, pathname, options.basePath);
90
+ return _chunkOWQV6MLMcjs.localizeFarmPathname.call(void 0, pathname, i18n.defaultLocale, {
91
+ ...i18n,
92
+ basePath: _nullishCoalesce(options.basePath, () => ( i18n.basePath))
93
+ });
94
+ }
78
95
  function resolveFarmAgentOrigin(metadataBase, requestOrigin) {
79
96
  if (typeof metadataBase !== "string" && !(metadataBase instanceof URL)) return requestOrigin;
80
97
  try {
@@ -182,7 +199,7 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
182
199
  try {
183
200
  const response = await fetchMarkdown(
184
201
  new Request(url, {
185
- headers: { accept: "text/markdown", [_chunkFT6KJHS3cjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
202
+ headers: { accept: "text/markdown", [_chunkC2JOS77Zcjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
186
203
  })
187
204
  );
188
205
  const type = _nullishCoalesce(response.headers.get("content-type"), () => ( ""));
@@ -368,4 +385,5 @@ function isRecord(value) {
368
385
 
369
386
 
370
387
 
371
- exports.resolveFarmLlmsTxtConfig = resolveFarmLlmsTxtConfig; exports.collectFarmLlmsTxtPages = collectFarmLlmsTxtPages; exports.resolveFarmAgentOrigin = resolveFarmAgentOrigin; exports.readFarmLlmsMarkdownFrom = readFarmLlmsMarkdownFrom; exports.isFarmMetadataNoIndex = isFarmMetadataNoIndex; exports.isFarmPageNoIndex = isFarmPageNoIndex; exports.createFarmDefaultLlmsTxt = createFarmDefaultLlmsTxt; exports.serializeFarmLlmsTxt = serializeFarmLlmsTxt; exports.createFarmLlmsMarkdownReader = createFarmLlmsMarkdownReader; exports.renderFarmLlmsFullTxt = renderFarmLlmsFullTxt; exports.createFarmLlmsFullRenderer = createFarmLlmsFullRenderer;
388
+
389
+ exports.resolveFarmLlmsTxtConfig = resolveFarmLlmsTxtConfig; exports.collectFarmLlmsTxtPages = collectFarmLlmsTxtPages; exports.getFarmAgentPagePublicPath = getFarmAgentPagePublicPath; exports.resolveFarmAgentOrigin = resolveFarmAgentOrigin; exports.readFarmLlmsMarkdownFrom = readFarmLlmsMarkdownFrom; exports.isFarmMetadataNoIndex = isFarmMetadataNoIndex; exports.isFarmPageNoIndex = isFarmPageNoIndex; exports.createFarmDefaultLlmsTxt = createFarmDefaultLlmsTxt; exports.serializeFarmLlmsTxt = serializeFarmLlmsTxt; exports.createFarmLlmsMarkdownReader = createFarmLlmsMarkdownReader; exports.renderFarmLlmsFullTxt = renderFarmLlmsFullTxt; exports.createFarmLlmsFullRenderer = createFarmLlmsFullRenderer;
@@ -153,7 +153,7 @@ async function sendWebResponse(res, response) {
153
153
  }
154
154
  }
155
155
  async function fetchFarmExternalRewrite(request) {
156
- const response = await fetch(request);
156
+ const response = await fetch(request, { redirect: "manual" });
157
157
  if (!response.headers.has("content-encoding")) return response;
158
158
  const headers = new Headers(response.headers);
159
159
  headers.delete("content-encoding");
@@ -21,6 +21,12 @@ import {
21
21
  import {
22
22
  emitFarmEvent
23
23
  } from "./chunk-2DA7CLY7.mjs";
24
+ import {
25
+ FARM_DEPLOYMENT_ID_HEADER,
26
+ createFarmDeploymentCookie,
27
+ getFarmDeploymentMismatch,
28
+ withoutFarmDeploymentCookie
29
+ } from "./chunk-IWJONXPF.mjs";
24
30
  import {
25
31
  _withFarmResponseHeaders
26
32
  } from "./chunk-LM55GS4R.mjs";
@@ -678,6 +684,24 @@ var CDN_CACHE_CONTROL_HEADERS = [
678
684
  "netlify-cdn-cache-control",
679
685
  "cloudflare-cdn-cache-control"
680
686
  ];
687
+ function _hasPrivateFarmRequestHeaders(request, localeCookie) {
688
+ if (request.headers.get("authorization")) return true;
689
+ const cookieHeader = withoutFarmDeploymentCookie(request.headers.get("cookie"));
690
+ if (!cookieHeader) return false;
691
+ return !(localeCookie && isOnlyFarmLocaleCookie(cookieHeader, localeCookie));
692
+ }
693
+ function isOnlyFarmLocaleCookie(cookieHeader, localeCookie) {
694
+ const parts = cookieHeader.split(";");
695
+ if (parts.length !== 1) return false;
696
+ const cookie = parts[0].trim();
697
+ const separator = cookie.indexOf("=");
698
+ if (separator <= 0) return false;
699
+ try {
700
+ return decodeURIComponent(cookie.slice(0, separator).trim()) === localeCookie.name && localeCookie.locales.includes(decodeURIComponent(cookie.slice(separator + 1).trim()));
701
+ } catch {
702
+ return false;
703
+ }
704
+ }
681
705
  function _withFarmGuardedResponseCache(response) {
682
706
  const shareable = !PRIVATE_CACHE_DIRECTIVE.test(response.headers.get("cache-control") ?? "");
683
707
  if (!shareable && !CDN_CACHE_CONTROL_HEADERS.some((name) => response.headers.has(name))) {
@@ -688,11 +712,30 @@ function _withFarmGuardedResponseCache(response) {
688
712
  for (const name of CDN_CACHE_CONTROL_HEADERS) headers.delete(name);
689
713
  });
690
714
  }
715
+ function _withFarmDeploymentCookie(request, response, deploymentId, cookiePath) {
716
+ if (request.method.toUpperCase() !== "GET") return response;
717
+ if (response.headers.get(FARM_DEPLOYMENT_ID_HEADER) !== deploymentId) return response;
718
+ if (!PRIVATE_CACHE_DIRECTIVE.test(response.headers.get("cache-control") ?? "")) return response;
719
+ if (CDN_CACHE_CONTROL_HEADERS.some((name) => response.headers.has(name))) return response;
720
+ if (getFarmDeploymentMismatch(request, deploymentId)) return response;
721
+ return _withFarmResponseHeaders(response, (headers) => {
722
+ headers.append(
723
+ "Set-Cookie",
724
+ createFarmDeploymentCookie(
725
+ deploymentId,
726
+ cookiePath,
727
+ new URL(request.url).protocol === "https:"
728
+ )
729
+ );
730
+ });
731
+ }
691
732
 
692
733
  export {
693
734
  matchesMiddlewareConfig2 as matchesMiddlewareConfig,
694
735
  createProductionMiddlewareRunner,
695
736
  applyProductionMiddlewareHeaders,
696
737
  CDN_CACHE_CONTROL_HEADERS,
697
- _withFarmGuardedResponseCache
738
+ _hasPrivateFarmRequestHeaders,
739
+ _withFarmGuardedResponseCache,
740
+ _withFarmDeploymentCookie
698
741
  };
@@ -4,22 +4,22 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkFJMC24KGcjs = require('./chunk-FJMC24KG.cjs');
7
+ var _chunk42KMUIWZcjs = require('./chunk-42KMUIWZ.cjs');
8
8
 
9
9
 
10
10
  var _chunkXVSBALOYcjs = require('./chunk-XVSBALOY.cjs');
11
11
 
12
12
 
13
- var _chunk6GQJVY4Ecjs = require('./chunk-6GQJVY4E.cjs');
13
+ var _chunkKEB7AGS6cjs = require('./chunk-KEB7AGS6.cjs');
14
14
 
15
15
 
16
16
 
17
- var _chunk65Y5SIBHcjs = require('./chunk-65Y5SIBH.cjs');
17
+ var _chunk3QM74STYcjs = require('./chunk-3QM74STY.cjs');
18
18
 
19
19
 
20
20
 
21
21
 
22
- var _chunkQ4HH5Q6Acjs = require('./chunk-Q4HH5Q6A.cjs');
22
+ var _chunkDMXMIE2Ccjs = require('./chunk-DMXMIE2C.cjs');
23
23
 
24
24
 
25
25
  var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
@@ -49,7 +49,7 @@ var FARM_RSC_CONFIG_KEYS = [
49
49
  "agent",
50
50
  "mcp"
51
51
  ];
52
- var FARM_RSC_PASSTHROUGH_KEYS = ["i18n", "cache"];
52
+ var FARM_RSC_PASSTHROUGH_KEYS = ["i18n", "cache", "redirects", "rewrites", "headers"];
53
53
  function pickImportTarget(entry) {
54
54
  if (typeof entry === "string") return entry;
55
55
  if (!entry || typeof entry !== "object") return void 0;
@@ -60,7 +60,7 @@ function pickImportTarget(entry) {
60
60
  return void 0;
61
61
  }
62
62
  async function importFromApp(root, packageName, subpath = ".") {
63
- const packageDir = _chunkFJMC24KGcjs.findFarmAppPackageDir.call(void 0, root, packageName);
63
+ const packageDir = _chunk42KMUIWZcjs.findFarmAppPackageDir.call(void 0, root, packageName);
64
64
  if (!packageDir) return void 0;
65
65
  const manifest = JSON.parse(_fs.readFileSync.call(void 0, _path2.default.join(packageDir, "package.json"), "utf8"));
66
66
  const exportsMap = manifest.exports;
@@ -87,12 +87,12 @@ async function createFarmRscViteConfig(userConfig, options) {
87
87
  importFromApp(root, "@vitejs/plugin-rsc"),
88
88
  importFromApp(root, "@vitejs/plugin-react")
89
89
  ]);
90
- if (!pluginRsc || !viteRsc || !_chunkFJMC24KGcjs.findFarmAppPackageDir.call(void 0, root, "react-server-dom-webpack")) {
90
+ if (!pluginRsc || !viteRsc || !_chunk42KMUIWZcjs.findFarmAppPackageDir.call(void 0, root, "react-server-dom-webpack")) {
91
91
  throw new Error(
92
- `[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${_chunkFJMC24KGcjs.FARM_RSC_INSTALL_HINT}`
92
+ `[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${_chunk42KMUIWZcjs.FARM_RSC_INSTALL_HINT}`
93
93
  );
94
94
  }
95
- const layered = await _chunkFJMC24KGcjs.resolveFarmRscCheckConfig.call(void 0,
95
+ const layered = await _chunk42KMUIWZcjs.resolveFarmRscCheckConfig.call(void 0,
96
96
  userConfig,
97
97
  root,
98
98
  options.command === "build" ? "production" : "development"
@@ -106,20 +106,20 @@ async function createFarmRscViteConfig(userConfig, options) {
106
106
  },
107
107
  options.command
108
108
  );
109
- const blockingKeys = _chunkFJMC24KGcjs.inspectFarmServerComponents.call(void 0, config, root).blockingKeys;
109
+ const blockingKeys = _chunk42KMUIWZcjs.inspectFarmServerComponents.call(void 0, config, root).blockingKeys;
110
110
  if (blockingKeys.length > 0) {
111
- throw new Error(`[Farm.js] ${_chunkFJMC24KGcjs.formatFarmRscBlockingMessage.call(void 0, blockingKeys)}`);
111
+ throw new Error(`[Farm.js] ${_chunk42KMUIWZcjs.formatFarmRscBlockingMessage.call(void 0, blockingKeys)}`);
112
112
  }
113
113
  const { plugins: vitePlugins = [], ...viteOptions } = _nullishCoalesce(config.vite, () => ( {}));
114
114
  const rscConfig = {};
115
115
  for (const key of FARM_RSC_CONFIG_KEYS) {
116
116
  if (config[key] !== void 0) rscConfig[key] = config[key];
117
117
  }
118
- const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await _chunk65Y5SIBHcjs.loadFarmReactPlugin.call(void 0, )).default : void 0)));
119
- const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await _chunkQ4HH5Q6Acjs.loadTailwindVitePlugin.call(void 0, );
118
+ const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await _chunk3QM74STYcjs.loadFarmReactPlugin.call(void 0, )).default : void 0)));
119
+ const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await _chunkDMXMIE2Ccjs.loadTailwindVitePlugin.call(void 0, );
120
120
  const platform = _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, );
121
121
  const mobileClient = config.mobile === void 0 || platform === "desktop" ? void 0 : options.command === "build" ? "entry" : platform === "mobile" ? "inline" : void 0;
122
- const clientPluginEntry = _chunkQ4HH5Q6Acjs.generateFarmClientPluginEntryCode.call(void 0,
122
+ const clientPluginEntry = _chunkDMXMIE2Ccjs.generateFarmClientPluginEntryCode.call(void 0,
123
123
  config.plugins,
124
124
  root,
125
125
  typeof config.srcDir === "string" ? config.srcDir : "src",
@@ -144,7 +144,7 @@ async function createFarmRscViteConfig(userConfig, options) {
144
144
  port: _nullishCoalesce(options.port, () => ( _optionalChain([config, 'access', _5 => _5.server, 'optionalAccess', _6 => _6.port]))),
145
145
  plugins: [
146
146
  ...options.command === "serve" && platform === "desktop" ? [
147
- _chunk65Y5SIBHcjs.farmDesktopDevGuardPlugin.call(void 0,
147
+ _chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0,
148
148
  typeof config.basePath === "string" ? config.basePath : void 0
149
149
  )
150
150
  ] : [],
@@ -156,7 +156,7 @@ async function createFarmRscViteConfig(userConfig, options) {
156
156
  server: { environmentName: "rsc" },
157
157
  config: {
158
158
  preset: options.preset,
159
- outputDir: options.outputDir && _chunk6GQJVY4Ecjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
159
+ outputDir: options.outputDir && _chunkKEB7AGS6cjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
160
160
  }
161
161
  })
162
162
  ]
@@ -176,12 +176,12 @@ async function createFarmRscViteConfig(userConfig, options) {
176
176
  async function resolveFarmRscServerPlugins(userConfig, config, root) {
177
177
  const kept = _nullishCoalesce(config.plugins, () => ( []));
178
178
  const names = new Set(
179
- kept.filter((plugin) => _chunkQ4HH5Q6Acjs.hasFarmServerRuntimePlugins.call(void 0, [plugin])).map((plugin) => plugin.name)
179
+ kept.filter((plugin) => _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, [plugin])).map((plugin) => plugin.name)
180
180
  );
181
181
  if (names.size === 0) return void 0;
182
182
  const loads = (plugin) => {
183
183
  const candidate = plugin;
184
- return !!candidate && names.has(candidate.name) && _chunkQ4HH5Q6Acjs.hasFarmServerRuntimePlugins.call(void 0, [candidate]);
184
+ return !!candidate && names.has(candidate.name) && _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, [candidate]);
185
185
  };
186
186
  const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-7P4RLKVX.cjs");
187
187
  const files = [];
@@ -210,7 +210,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
210
210
  }
211
211
  async function configureFarmRscPlugins(config, command) {
212
212
  if (config.plugins.length === 0) return config;
213
- const { PluginManager } = await import("./plugin-F2O4BFTK.cjs");
213
+ const { PluginManager } = await import("./plugin-5PIQQVRP.cjs");
214
214
  const manager = new PluginManager({
215
215
  config,
216
216
  isDev: command === "serve",
@@ -688,6 +688,7 @@ var PluginManager = class {
688
688
  * Runs only `runtime.before` for a request Farm re-routed internally, such as
689
689
  * a configured rewrite, so guards also see the destination URL. The session
690
690
  * opened for `source` keeps its context; context and after hooks don't rerun.
691
+ * `options` describe the destination; the session keeps the source's route.
691
692
  */
692
693
  async runRuntimeBeforeForRewrite(source, request, options = {}) {
693
694
  if (!this.hasRuntimeHook("before")) return request;
@@ -9,7 +9,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
9
9
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
10
10
 
11
11
 
12
- var _chunkOFBLGH6Vcjs = require('./chunk-OFBLGH6V.cjs');
12
+ var _chunkK66JILV3cjs = require('./chunk-K66JILV3.cjs');
13
13
 
14
14
 
15
15
  var _chunkQEJWNXRIcjs = require('./chunk-QEJWNXRI.cjs');
@@ -35,7 +35,7 @@ var _chunkE7QOEV5Zcjs = require('./chunk-E7QOEV5Z.cjs');
35
35
  var _chunkY3WG64CPcjs = require('./chunk-Y3WG64CP.cjs');
36
36
 
37
37
 
38
- var _chunkYIHRZBD7cjs = require('./chunk-YIHRZBD7.cjs');
38
+ var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
39
39
 
40
40
 
41
41
  var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
@@ -55,7 +55,7 @@ var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
55
55
 
56
56
 
57
57
 
58
- var _chunkVOQ7XZZTcjs = require('./chunk-VOQ7XZZT.cjs');
58
+ var _chunkY2SZVIVHcjs = require('./chunk-Y2SZVIVH.cjs');
59
59
 
60
60
 
61
61
  var _chunkHDPT6OYEcjs = require('./chunk-HDPT6OYE.cjs');
@@ -148,7 +148,7 @@ function farmApiPlugin(options = {}) {
148
148
  const existing = apiRoutesCache.get(routePath);
149
149
  const existingFile = _optionalChain([endpointSources, 'access', _4 => _4.get, 'call', _5 => _5(routePath), 'optionalAccess', _6 => _6.get, 'call', _7 => _7(normalizedMethod)]);
150
150
  if (existingFile) {
151
- throw new (0, _chunkOFBLGH6Vcjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
151
+ throw new (0, _chunkK66JILV3cjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
152
152
  }
153
153
  if (existing) {
154
154
  if (!existing.methods.includes(normalizedMethod)) {
@@ -323,7 +323,7 @@ function farmApiPlugin(options = {}) {
323
323
  log(`API route discovered: ${availableMethods.join(", ")} ${routePath}`);
324
324
  }
325
325
  } catch (e) {
326
- if (e instanceof _chunkOFBLGH6Vcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
326
+ if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
327
327
  log(`API route load failed at ${filePath}: ${e.message}`);
328
328
  }
329
329
  }
@@ -350,7 +350,7 @@ function farmApiPlugin(options = {}) {
350
350
  }
351
351
  }
352
352
  } catch (e) {
353
- if (e instanceof _chunkOFBLGH6Vcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
353
+ if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
354
354
  log(`Root routes.ts load failed: ${e.message}`);
355
355
  }
356
356
  break;
@@ -381,7 +381,7 @@ function farmApiPlugin(options = {}) {
381
381
  }
382
382
  }
383
383
  } catch (e) {
384
- if (e instanceof _chunkOFBLGH6Vcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
384
+ if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
385
385
  log(`Programmatic routes file load failed at ${routeFile}: ${e.message}`);
386
386
  }
387
387
  }
@@ -446,14 +446,14 @@ function farmApiPlugin(options = {}) {
446
446
  request,
447
447
  (resolution) => {
448
448
  const config = i18n.runtime.config;
449
- const vary = _chunkVOQ7XZZTcjs.getFarmLocaleVaryHeaders.call(void 0, config, resolution);
449
+ const vary = _chunkY2SZVIVHcjs.getFarmLocaleVaryHeaders.call(void 0, config, resolution);
450
450
  if (vary.length > 0) {
451
451
  const current = String(_nullishCoalesce(res.getHeader("Vary"), () => ( "")));
452
452
  res.setHeader("Vary", [current, ...vary].filter(Boolean).join(", "));
453
453
  }
454
454
  if (resolution.persist) {
455
455
  const cookies = res.getHeader("Set-Cookie");
456
- const cookie = _chunkVOQ7XZZTcjs.createFarmLocaleCookie.call(void 0, resolution.locale, config);
456
+ const cookie = _chunkY2SZVIVHcjs.createFarmLocaleCookie.call(void 0, resolution.locale, config);
457
457
  res.setHeader(
458
458
  "Set-Cookie",
459
459
  cookies === void 0 ? cookie : [...[cookies].flat().map(String), cookie]
@@ -526,11 +526,11 @@ function farmApiPlugin(options = {}) {
526
526
  const response = await apiRouterHandler(request);
527
527
  const duration = Date.now() - startTime;
528
528
  logResponse(method, currentPathname, response.status, duration);
529
- await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
529
+ await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
530
530
  } catch (error) {
531
531
  const bodyErrorResponse = _chunkCFG4QERRcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
532
532
  if (bodyErrorResponse) {
533
- await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
533
+ await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
534
534
  return;
535
535
  }
536
536
  const duration = Date.now() - startTime;
@@ -606,7 +606,7 @@ function farmApiPlugin(options = {}) {
606
606
  log(`API router recreated`);
607
607
  } catch (e) {
608
608
  restoreRouteState(previousState);
609
- if (e instanceof _chunkOFBLGH6Vcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
609
+ if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
610
610
  log(`Root routes.ts HMR failed: ${e.message}`);
611
611
  }
612
612
  return [];
@@ -644,7 +644,7 @@ function farmApiPlugin(options = {}) {
644
644
  log(`API router recreated`);
645
645
  } catch (e) {
646
646
  restoreRouteState(previousState);
647
- if (e instanceof _chunkOFBLGH6Vcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
647
+ if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
648
648
  log(`API route HMR failed: ${e.message}`);
649
649
  }
650
650
  return [];
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getFarmRouteLabel
3
- } from "./chunk-ZR2QB45W.mjs";
3
+ } from "./chunk-MITIAOUQ.mjs";
4
4
  import {
5
5
  classifyFarmAgent
6
- } from "./chunk-IFR74W6S.mjs";
6
+ } from "./chunk-KPJYBSHL.mjs";
7
7
  import {
8
8
  onFarmEvent
9
9
  } from "./chunk-2DA7CLY7.mjs";
@@ -12,7 +12,7 @@ function farmDesktopDevGuardPlugin(basePath) {
12
12
  order: "pre",
13
13
  async handler(server) {
14
14
  if (resolveFarmPlatform() !== "desktop") return;
15
- const { createFarmDesktopDevGuard } = await import("./dev-guard-ONNMVQUN.mjs");
15
+ const { createFarmDesktopDevGuard } = await import("./dev-guard-ZDIELV6Q.mjs");
16
16
  server.middlewares.use(createFarmDesktopDevGuard(server, { basePath: basePath || "" }));
17
17
  }
18
18
  }
@@ -1,10 +1,14 @@
1
1
  import {
2
+ getFarmAgentPagePublicPath,
2
3
  isFarmMetadataNoIndex,
3
4
  resolveFarmAgentOrigin
4
- } from "./chunk-YGJ5P3TJ.mjs";
5
+ } from "./chunk-Z3GPAFIA.mjs";
5
6
  import {
6
7
  matchesFarmMarkdownRoutePattern
7
- } from "./chunk-IFR74W6S.mjs";
8
+ } from "./chunk-KPJYBSHL.mjs";
9
+ import {
10
+ normalizeFarmTrailingSlashPathname
11
+ } from "./chunk-4O26BPUY.mjs";
8
12
  import {
9
13
  applyFarmBasePath
10
14
  } from "./chunk-SF3JB56B.mjs";
@@ -175,7 +179,13 @@ function createFarmDefaultSitemap(sources, options) {
175
179
  if (isFarmMetadataNoIndex(module?.metadata)) continue;
176
180
  if (module?.__farmRouteGuard) continue;
177
181
  entries.set(path, {
178
- url: new URL(applyFarmBasePath(path, options.basePath), base).href,
182
+ url: new URL(
183
+ normalizeFarmTrailingSlashPathname(
184
+ getFarmAgentPagePublicPath(path, options),
185
+ options.trailingSlash === true
186
+ ),
187
+ base
188
+ ).href,
179
189
  ...source.lastModified ? { lastModified: source.lastModified } : {}
180
190
  });
181
191
  }
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.1.69";
2
+ var version = "0.1.71";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;
@@ -31,8 +31,37 @@ function reconcileFarmDocumentHead(nextDocument) {
31
31
  document.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR).forEach((node) => node.remove());
32
32
  nextDocument.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR).forEach((node) => document.head.appendChild(document.importNode(node, true)));
33
33
  }
34
+ function createFarmMetadataHeadReconciler(initialMarkup) {
35
+ const candidates = Array.from(
36
+ document.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR)
37
+ ).reverse();
38
+ const claimed = /* @__PURE__ */ new Set();
39
+ for (const node of parseFarmHeadMarkup(initialMarkup)) {
40
+ const match = candidates.find(
41
+ (candidate) => !claimed.has(candidate) && candidate.isEqualNode(node)
42
+ );
43
+ if (match) claimed.add(match);
44
+ }
45
+ let current = initialMarkup;
46
+ let owned = Array.from(claimed);
47
+ return (markup) => {
48
+ if (markup === current) return;
49
+ current = markup;
50
+ for (const node of owned) node.remove();
51
+ owned = parseFarmHeadMarkup(markup).map(
52
+ (node) => document.head.appendChild(document.importNode(node, true))
53
+ );
54
+ };
55
+ }
56
+ function parseFarmHeadMarkup(markup) {
57
+ if (!markup) return [];
58
+ const template = document.createElement("template");
59
+ template.innerHTML = markup;
60
+ return Array.from(template.content.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR));
61
+ }
34
62
 
35
63
  export {
36
64
  FARM_NAVIGATION_HEAD_SELECTOR,
37
- reconcileFarmDocumentHead
65
+ reconcileFarmDocumentHead,
66
+ createFarmMetadataHeadReconciler
38
67
  };
@@ -1,17 +1,17 @@
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
3
 
4
- var _chunkX3MHKLCOcjs = require('./chunk-X3MHKLCO.cjs');
4
+ var _chunkTP4RAV7Ycjs = require('./chunk-TP4RAV7Y.cjs');
5
5
 
6
6
 
7
- var _chunkGUMKIQJLcjs = require('./chunk-GUMKIQJL.cjs');
7
+ var _chunkDPYBVVL3cjs = require('./chunk-DPYBVVL3.cjs');
8
8
 
9
9
 
10
10
  var _chunkBTVDYS4Bcjs = require('./chunk-BTVDYS4B.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
14
+ var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
15
15
 
16
16
 
17
17
  var _chunk2KMIJDY6cjs = require('./chunk-2KMIJDY6.cjs');
@@ -29,7 +29,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
29
29
  var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
30
30
 
31
31
 
32
- var _chunk22LGTSBAcjs = require('./chunk-22LGTSBA.cjs');
32
+ var _chunkMEJCP2LXcjs = require('./chunk-MEJCP2LX.cjs');
33
33
 
34
34
 
35
35
  var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
@@ -165,7 +165,7 @@ function createFarmAiCatalogResponse(request, input = {}, requestUrl) {
165
165
  if (_chunkCFG4QERRcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
166
166
  return new Response(null, { status: 304, headers });
167
167
  }
168
- _chunkFT6KJHS3cjs.emitFarmAgentRead.call(void 0, request, card ? "mcp-server-card" : "ai-catalog", 200);
168
+ _chunkC2JOS77Zcjs.emitFarmAgentRead.call(void 0, request, card ? "mcp-server-card" : "ai-catalog", 200);
169
169
  return new Response(method === "HEAD" ? null : body, { status: 200, headers });
170
170
  }
171
171
  function corsHeaders() {
@@ -233,7 +233,7 @@ function createFarmApiCatalogResponse(method, input, request) {
233
233
  headers: { Allow: "GET, HEAD", "Content-Type": "text/plain; charset=utf-8" }
234
234
  });
235
235
  }
236
- if (request) _chunkFT6KJHS3cjs.emitFarmAgentRead.call(void 0, request, "api-catalog", 200);
236
+ if (request) _chunkC2JOS77Zcjs.emitFarmAgentRead.call(void 0, request, "api-catalog", 200);
237
237
  const catalog = createFarmApiCatalog(input);
238
238
  return new Response(upperMethod === "HEAD" ? null : JSON.stringify(catalog), {
239
239
  status: 200,
@@ -288,7 +288,7 @@ function createFarmAppManifest(input) {
288
288
  return {
289
289
  schemaVersion: 1,
290
290
  app: app ? {
291
- ...app.version ? { farm: _chunk22LGTSBAcjs.FARM_VERSION } : {},
291
+ ...app.version ? { farm: _chunkMEJCP2LXcjs.FARM_VERSION } : {},
292
292
  ...app.renderer ? { renderer: input.renderer } : {},
293
293
  basePath: input.basePath,
294
294
  ...app.build ? { build: input.build } : {}
@@ -319,7 +319,7 @@ function resolveFarmSiteUrl() {
319
319
  asUrl(read("RAILWAY_PUBLIC_DOMAIN"))
320
320
  ];
321
321
  for (const candidate of candidates) {
322
- const origin = candidate ? _chunkGUMKIQJLcjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
322
+ const origin = candidate ? _chunkDPYBVVL3cjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
323
323
  if (origin) return origin;
324
324
  }
325
325
  return null;
@@ -374,7 +374,7 @@ function listDefaultServer(input) {
374
374
  authorization: "none",
375
375
  resources: [],
376
376
  prompts: [],
377
- tools: _chunkX3MHKLCOcjs.FARM_DEFAULT_MCP_TOOLS.map((tool) => ({
377
+ tools: _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_TOOLS.map((tool) => ({
378
378
  name: tool.name,
379
379
  title: tool.title,
380
380
  description: tool.description,
@@ -434,7 +434,7 @@ function listFarmBuiltInRoutePaths(input) {
434
434
  ...agent.manifest !== false ? [FARM_APP_MANIFEST_PATH, FARM_APP_MANIFEST_LEGACY_PATH] : [],
435
435
  ...agent.apiCatalog ? [FARM_API_CATALOG_PATH] : [],
436
436
  ...agent.aiCatalog !== false ? [FARM_AI_CATALOG_PATH, FARM_ARD_PATH] : [],
437
- ...agent.mcp === true ? [_chunkX3MHKLCOcjs.FARM_DEFAULT_MCP_PATH, `${_chunkX3MHKLCOcjs.FARM_DEFAULT_MCP_PATH}${FARM_MCP_SERVER_CARD_SUFFIX}`] : [],
437
+ ...agent.mcp === true ? [_chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH, `${_chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH}${FARM_MCP_SERVER_CARD_SUFFIX}`] : [],
438
438
  ..._optionalChain([agent, 'access', _43 => _43.llmsTxt, 'optionalAccess', _44 => _44.enabled]) ? ["/llms.txt"] : [],
439
439
  ..._optionalChain([agent, 'access', _45 => _45.llmsTxt, 'optionalAccess', _46 => _46.enabled]) && agent.llmsTxt.full ? ["/llms-full.txt"] : [],
440
440
  ..._optionalChain([agent, 'access', _47 => _47.sitemap, 'optionalAccess', _48 => _48.enabled]) ? ["/sitemap.xml"] : [],
@@ -474,7 +474,7 @@ function resolveFarmDocsRouteLabel(routePathname, docs) {
474
474
  for (const entry of entries) {
475
475
  const base = entry === "/" ? "" : entry;
476
476
  if (page === entry || entry === "/" && page === "/index") {
477
- return markdown ? _chunkFT6KJHS3cjs.getFarmMarkdownMirrorPath.call(void 0, entry) : entry;
477
+ return markdown ? _chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, entry) : entry;
478
478
  }
479
479
  if (page.startsWith(`${base}/`)) {
480
480
  const label = _optionalChain([docs, 'access', _55 => _55.pages, 'optionalAccess', _56 => _56.has, 'call', _57 => _57(page)]) && PUBLISHED_PAGE_PATH.test(page) ? page : `${base}/[...slug]`;
@@ -497,7 +497,7 @@ function resolveFarmMarkdownRouteLabel(routePathname, matchPagePattern) {
497
497
  if (!routePathname.toLowerCase().endsWith(".md")) return null;
498
498
  const page = routePathname === "/index.md" ? "/" : routePathname.slice(0, -".md".length) || "/";
499
499
  const pattern = matchPagePattern(page);
500
- return pattern ? _chunkFT6KJHS3cjs.getFarmMarkdownMirrorPath.call(void 0, pattern) : null;
500
+ return pattern ? _chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, pattern) : null;
501
501
  }
502
502
 
503
503
 
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-IYEY3JWJ.mjs";
10
10
  import {
11
11
  APIRouteConflictError
12
- } from "./chunk-OIOPQ25L.mjs";
12
+ } from "./chunk-E77IA5IF.mjs";
13
13
  import {
14
14
  findProgrammaticRouteFilesInDir
15
15
  } from "./chunk-TXE4SAMV.mjs";
@@ -35,7 +35,7 @@ import {
35
35
  } from "./chunk-IGL6CO6M.mjs";
36
36
  import {
37
37
  sendWebResponse
38
- } from "./chunk-CO6UYM2D.mjs";
38
+ } from "./chunk-O5QUJEWT.mjs";
39
39
  import {
40
40
  loadFarmDevModule
41
41
  } from "./chunk-TUOO6IK3.mjs";
@@ -55,7 +55,7 @@ import {
55
55
  import {
56
56
  createFarmLocaleCookie,
57
57
  getFarmLocaleVaryHeaders
58
- } from "./chunk-K76CBYQM.mjs";
58
+ } from "./chunk-7A3URI2F.mjs";
59
59
  import {
60
60
  resolveFarmRequestURL
61
61
  } from "./chunk-5OFNUETM.mjs";