@farm.js/core 0.1.51-beta.3 → 0.1.60

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 (320) hide show
  1. package/dist/{agent-mcp-handler-7JSKGSOW.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
  2. package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
  3. package/dist/{agent-mcp.d-BJKChOrO.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
  4. package/dist/{agent-mcp.d-BAR9njbJ.d.ts → agent-mcp.d-SIoCUP1I.d.ts} +1 -1
  5. package/dist/agent-runtime.cjs +5 -5
  6. package/dist/agent-runtime.d.mts +2 -2
  7. package/dist/agent-runtime.d.ts +2 -2
  8. package/dist/agent-runtime.mjs +4 -4
  9. package/dist/{analyzer-OTPEWH5W.mjs → analyzer-22BEYV7S.mjs} +116 -13
  10. package/dist/{analyzer-TSQXZCZN.cjs → analyzer-LCSI3NSH.cjs} +123 -20
  11. package/dist/api/client.cjs +5 -4
  12. package/dist/api/client.d.mts +1 -1
  13. package/dist/api/client.d.ts +1 -1
  14. package/dist/api/client.mjs +3 -2
  15. package/dist/api/client.native.cjs +45 -0
  16. package/dist/api/client.native.d.mts +23 -0
  17. package/dist/api/client.native.d.ts +23 -0
  18. package/dist/api/client.native.mjs +45 -0
  19. package/dist/api/route-manager.cjs +7 -7
  20. package/dist/api/route-manager.d.mts +4 -4
  21. package/dist/api/route-manager.d.ts +4 -4
  22. package/dist/api/route-manager.mjs +6 -6
  23. package/dist/api/runtime.cjs +5 -5
  24. package/dist/api/runtime.d.mts +3 -3
  25. package/dist/api/runtime.d.ts +3 -3
  26. package/dist/api/runtime.mjs +4 -4
  27. package/dist/{api-client.d-CeA6tNA6.d.mts → api-client.d-BNLXNCXJ.d.mts} +1 -1
  28. package/dist/{api-client.d-BWcqZciH.d.ts → api-client.d-ddQBNGtu.d.ts} +1 -1
  29. package/dist/api.cjs +11 -11
  30. package/dist/api.d.mts +5 -5
  31. package/dist/api.d.ts +5 -5
  32. package/dist/api.mjs +10 -10
  33. package/dist/{app-manifest.d-DEQNnNhV.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
  34. package/dist/{app-manifest.d-BLFbaqx8.d.ts → app-manifest.d-Tb3CJpL4.d.ts} +1 -1
  35. package/dist/app-markdown.cjs +7 -7
  36. package/dist/app-markdown.d.mts +3 -3
  37. package/dist/app-markdown.d.ts +3 -3
  38. package/dist/app-markdown.mjs +6 -6
  39. package/dist/{app.d-CNPaUYaa.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
  40. package/dist/{app.d-CT7xDkj2.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
  41. package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
  42. package/dist/{chunk-OAMUSC7H.cjs → chunk-2FRLSDBT.cjs} +1 -1
  43. package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
  44. package/dist/{chunk-ZD2VKAUI.mjs → chunk-2KTYMMWT.mjs} +1 -1
  45. package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
  46. package/dist/{chunk-UQF3OJVE.mjs → chunk-37PYUEK5.mjs} +173 -29
  47. package/dist/{chunk-VSLM6BHX.cjs → chunk-3OJNNCDL.cjs} +9 -9
  48. package/dist/{chunk-X3JNB2TB.mjs → chunk-3PX4AIXO.mjs} +36 -5
  49. package/dist/{chunk-UQHIWZZ6.cjs → chunk-3TL3AH25.cjs} +12 -6
  50. package/dist/chunk-3YMLUNL2.cjs +251 -0
  51. package/dist/chunk-4JTQPOKO.cjs +137 -0
  52. package/dist/{chunk-7MD37P5V.cjs → chunk-4P23B7DU.cjs} +5 -5
  53. package/dist/{chunk-3BLEXUGE.mjs → chunk-55U5QIXQ.mjs} +1 -1
  54. package/dist/{chunk-TWHXBMLJ.cjs → chunk-5JNUYGNF.cjs} +4 -4
  55. package/dist/{chunk-53SACYBY.cjs → chunk-6BJJYOFL.cjs} +7 -7
  56. package/dist/chunk-6UUH4N4J.mjs +251 -0
  57. package/dist/{chunk-2NHOYYUT.mjs → chunk-7H45IJWO.mjs} +2 -2
  58. package/dist/{chunk-NN3MOPSI.mjs → chunk-A2MN5PQJ.mjs} +7 -7
  59. package/dist/{chunk-KY32FWK7.mjs → chunk-BHJAYPYU.mjs} +2 -2
  60. package/dist/{chunk-VAHBCI6X.mjs → chunk-BQWBHWEW.mjs} +26 -1
  61. package/dist/{chunk-KJMWAUKE.mjs → chunk-C7GJDVN4.mjs} +1 -1
  62. package/dist/{chunk-OYNNA4DD.cjs → chunk-CBKRS3M4.cjs} +9 -9
  63. package/dist/{chunk-I2DQGS56.cjs → chunk-CBOEJ5Z4.cjs} +39 -41
  64. package/dist/{chunk-UJL4JOXV.cjs → chunk-CI4UNQHO.cjs} +2 -2
  65. package/dist/{chunk-S5AQ7CAC.cjs → chunk-CNNBFGL5.cjs} +39 -14
  66. package/dist/chunk-D2X5MUF5.cjs +1457 -0
  67. package/dist/{chunk-LEIXUFJN.cjs → chunk-D4MRNBVF.cjs} +10 -9
  68. package/dist/{chunk-2KVDHNQS.mjs → chunk-D7LTCK3U.mjs} +2 -2
  69. package/dist/{chunk-4SEHMBL4.cjs → chunk-DPJ66FSI.cjs} +22 -22
  70. package/dist/{chunk-FFE2EMF7.cjs → chunk-DZPR2W6U.cjs} +5 -5
  71. package/dist/{chunk-3Z63X45F.mjs → chunk-E72UD6ME.mjs} +1 -1
  72. package/dist/{chunk-XXXRRVY6.mjs → chunk-EGVC4LIG.mjs} +5 -5
  73. package/dist/{chunk-72NBDVWQ.mjs → chunk-EXUONJYV.mjs} +3 -3
  74. package/dist/{chunk-VS7EHLLW.mjs → chunk-EZ34EHQP.mjs} +1 -1
  75. package/dist/{chunk-5FXPJIOT.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
  76. package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
  77. package/dist/{chunk-3SMXQNFD.mjs → chunk-FORSVMEJ.mjs} +2 -2
  78. package/dist/{chunk-R4PHCZ3G.mjs → chunk-HPWB57PZ.mjs} +1 -1
  79. package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
  80. package/dist/{chunk-3XQ57EFI.cjs → chunk-IFXSBJPN.cjs} +16 -16
  81. package/dist/{chunk-3WSIYBMG.mjs → chunk-ILMTRGBG.mjs} +279 -48
  82. package/dist/{chunk-HLWOWZFX.cjs → chunk-JBK7UJOI.cjs} +14 -11
  83. package/dist/chunk-JI5D7MXY.mjs +137 -0
  84. package/dist/{chunk-QXJADAQB.cjs → chunk-JIBEFLQ7.cjs} +6 -2
  85. package/dist/{chunk-LZ4SB57H.mjs → chunk-JPIUGDK4.mjs} +1 -1
  86. package/dist/{chunk-Y3N5BFRJ.mjs → chunk-JSDV2NUN.mjs} +1 -1
  87. package/dist/{chunk-IRSS4HS4.mjs → chunk-K3RU5MOR.mjs} +1 -1
  88. package/dist/chunk-KPOMS5RO.cjs +237 -0
  89. package/dist/{chunk-YAJTD3ZG.mjs → chunk-KVW2M6PI.mjs} +1 -1
  90. package/dist/{chunk-5IONBVJY.cjs → chunk-LB3DPQP6.cjs} +22 -22
  91. package/dist/{chunk-CZ35L6PL.mjs → chunk-LJVNMGE3.mjs} +10 -4
  92. package/dist/{chunk-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
  93. package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
  94. package/dist/{chunk-D7UQC4O6.cjs → chunk-LT4VAF5Z.cjs} +2 -2
  95. package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
  96. package/dist/{chunk-H33PJEXN.cjs → chunk-MEQN6DDA.cjs} +5 -5
  97. package/dist/{chunk-XLRLSTJ6.cjs → chunk-MGKW5XZE.cjs} +7 -7
  98. package/dist/{chunk-B3GZAQSC.cjs → chunk-MHLNWRCJ.cjs} +3 -3
  99. package/dist/{chunk-5ENW27SL.mjs → chunk-MMK4MZUN.mjs} +1 -1
  100. package/dist/{chunk-WGUHDWT5.cjs → chunk-MTWXOEI4.cjs} +527 -366
  101. package/dist/chunk-NHD7BAKD.mjs +1457 -0
  102. package/dist/{chunk-KLNFJDFM.cjs → chunk-NQJDO7K7.cjs} +31 -31
  103. package/dist/{chunk-TSFMFPRU.cjs → chunk-O27PLNQZ.cjs} +10 -10
  104. package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
  105. package/dist/{chunk-YUEYBL35.mjs → chunk-PCXIJKPM.mjs} +8 -8
  106. package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
  107. package/dist/{chunk-B3GM5I6N.cjs → chunk-PRFNLQSP.cjs} +4 -4
  108. package/dist/{chunk-46KXZBOG.cjs → chunk-QAS7KE7J.cjs} +7 -7
  109. package/dist/chunk-QGOZLGVP.mjs +0 -0
  110. package/dist/{chunk-VQJYGZNX.cjs → chunk-QMNWKQL4.cjs} +1 -1
  111. package/dist/{chunk-XB24LZWI.cjs → chunk-QRX4JRBO.cjs} +3 -3
  112. package/dist/{chunk-LNM57D3H.cjs → chunk-R53QDV6T.cjs} +4 -4
  113. package/dist/{chunk-SUV6YO4Q.cjs → chunk-RAWWCDCT.cjs} +5 -5
  114. package/dist/{chunk-LJDIFIJ2.mjs → chunk-RPUJHJHE.mjs} +4 -4
  115. package/dist/{chunk-G2KTRMWA.mjs → chunk-RSEAX5MW.mjs} +4 -0
  116. package/dist/chunk-SJRCWF4Z.mjs +237 -0
  117. package/dist/{chunk-4353ZRE5.mjs → chunk-SX7EECTS.mjs} +8 -5
  118. package/dist/{chunk-LDNSSHEG.mjs → chunk-T4TBK5NY.mjs} +2 -2
  119. package/dist/{chunk-NOTSHVRN.mjs → chunk-T7I62A4C.mjs} +293 -132
  120. package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
  121. package/dist/{chunk-4CGOMZP3.cjs → chunk-UDJY2ZGY.cjs} +487 -256
  122. package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
  123. package/dist/{chunk-TQMI6BYO.cjs → chunk-UYSTTPYJ.cjs} +1262 -936
  124. package/dist/{chunk-E5DXF5GE.mjs → chunk-UZZ6IEQP.mjs} +3 -3
  125. package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
  126. package/dist/{chunk-GAO7MS5O.mjs → chunk-VPTWKOCY.mjs} +19 -19
  127. package/dist/{chunk-UN6N623E.mjs → chunk-VQJHT2ND.mjs} +2 -2
  128. package/dist/{chunk-SJ23LJ3N.cjs → chunk-VVTJTMGQ.cjs} +3 -3
  129. package/dist/{chunk-KHXAJ2KA.cjs → chunk-W2RZ73IU.cjs} +12 -12
  130. package/dist/{chunk-JWI5PUO2.mjs → chunk-W2ZXMMHA.mjs} +2 -1
  131. package/dist/{chunk-BLD5GVCG.mjs → chunk-W6QLRQ3V.mjs} +1 -1
  132. package/dist/{chunk-AV26KHTG.mjs → chunk-X2CZTWQA.mjs} +2 -2
  133. package/dist/chunk-XPIPMWY3.cjs +1 -0
  134. package/dist/{chunk-JXEPLIXD.cjs → chunk-XTG73QZA.cjs} +183 -39
  135. package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
  136. package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
  137. package/dist/{chunk-LPDKG6RA.mjs → chunk-YSXTNSXS.mjs} +1 -1
  138. package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
  139. package/dist/{chunk-3TLKUBXG.mjs → chunk-ZFUKPWFC.mjs} +912 -586
  140. package/dist/{chunk-4TKAIO2F.mjs → chunk-ZMHAFH4R.mjs} +8 -8
  141. package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
  142. package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
  143. package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
  144. package/dist/{chunk-MRNDAJEV.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
  145. package/dist/{client-plugins.d-DllmH8eM.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +10 -2
  146. package/dist/{client-plugins.d-n3iWY1EJ.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +10 -2
  147. package/dist/client-plugins.d.mts +2 -2
  148. package/dist/client-plugins.d.ts +2 -2
  149. package/dist/client.cjs +9 -9
  150. package/dist/client.d.mts +9 -9
  151. package/dist/client.d.ts +9 -9
  152. package/dist/client.mjs +9 -9
  153. package/dist/{config.d-DqKaCr1r.d.ts → config.d-DqZkLwef.d.mts} +139 -1
  154. package/dist/{config.d-DqKaCr1r.d.mts → config.d-DqZkLwef.d.ts} +139 -1
  155. package/dist/config.d.mts +2 -2
  156. package/dist/config.d.ts +2 -2
  157. package/dist/cron.cjs +3 -3
  158. package/dist/cron.d.mts +10 -0
  159. package/dist/cron.d.ts +10 -0
  160. package/dist/cron.mjs +2 -2
  161. package/dist/desktop.d.mts +3 -3
  162. package/dist/desktop.d.ts +3 -3
  163. package/dist/{devtools-UESYARTF.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
  164. package/dist/{devtools-TO6TAO32.cjs → devtools-UF6JYHUN.cjs} +18 -18
  165. package/dist/docs.cjs +19 -19
  166. package/dist/docs.d.mts +3 -3
  167. package/dist/docs.d.ts +3 -3
  168. package/dist/docs.mjs +18 -18
  169. package/dist/index.cjs +96 -96
  170. package/dist/{index.d-BXsAXm1U.d.ts → index.d-DlCELfhf.d.ts} +1 -1
  171. package/dist/{index.d-BL7KKiwa.d.mts → index.d-Dmfb7Kb_.d.mts} +1 -1
  172. package/dist/index.d.mts +18 -18
  173. package/dist/index.d.ts +18 -18
  174. package/dist/index.mjs +139 -139
  175. package/dist/integrations.cjs +5 -5
  176. package/dist/integrations.d.mts +2 -2
  177. package/dist/integrations.d.ts +2 -2
  178. package/dist/integrations.mjs +4 -4
  179. package/dist/internal/app-markdown-runtime.cjs +6 -6
  180. package/dist/internal/app-markdown-runtime.d.mts +3 -3
  181. package/dist/internal/app-markdown-runtime.d.ts +3 -3
  182. package/dist/internal/app-markdown-runtime.mjs +5 -5
  183. package/dist/internal/build-runtime.cjs +50 -50
  184. package/dist/internal/build-runtime.d.mts +4 -4
  185. package/dist/internal/build-runtime.d.ts +4 -4
  186. package/dist/internal/build-runtime.mjs +49 -49
  187. package/dist/internal/cli-runtime.cjs +28 -28
  188. package/dist/internal/cli-runtime.mjs +28 -28
  189. package/dist/internal/client-error-overlay.cjs +4 -4
  190. package/dist/internal/client-error-overlay.mjs +1 -1
  191. package/dist/internal/client-runtime.cjs +20 -15
  192. package/dist/internal/client-runtime.d.mts +5 -5
  193. package/dist/internal/client-runtime.d.ts +5 -5
  194. package/dist/internal/client-runtime.mjs +8 -3
  195. package/dist/internal/compression-runtime.d.mts +2 -2
  196. package/dist/internal/compression-runtime.d.ts +2 -2
  197. package/dist/internal/config-runtime.cjs +18 -18
  198. package/dist/internal/config-runtime.d.mts +94 -6
  199. package/dist/internal/config-runtime.d.ts +94 -6
  200. package/dist/internal/config-runtime.mjs +17 -17
  201. package/dist/internal/infra-analytics-runtime.cjs +11 -11
  202. package/dist/internal/infra-analytics-runtime.mjs +9 -9
  203. package/dist/internal/islands-boot.cjs +211 -0
  204. package/dist/internal/islands-boot.d.mts +8 -0
  205. package/dist/internal/islands-boot.d.ts +8 -0
  206. package/dist/internal/islands-boot.mjs +211 -0
  207. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  208. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  209. package/dist/internal/production-runtime.cjs +37 -101
  210. package/dist/internal/production-runtime.d.mts +17 -11
  211. package/dist/internal/production-runtime.d.ts +17 -11
  212. package/dist/internal/production-runtime.mjs +47 -111
  213. package/dist/markdown.cjs +5 -5
  214. package/dist/markdown.d.mts +2 -2
  215. package/dist/markdown.d.ts +2 -2
  216. package/dist/markdown.mjs +4 -4
  217. package/dist/middleware.cjs +10 -10
  218. package/dist/middleware.d.mts +4 -4
  219. package/dist/middleware.d.ts +4 -4
  220. package/dist/middleware.mjs +9 -9
  221. package/dist/mobile.d.mts +27 -5
  222. package/dist/mobile.d.ts +27 -5
  223. package/dist/modules-VHD7BELU.mjs +13 -0
  224. package/dist/modules-WT5D3AWY.cjs +13 -0
  225. package/dist/native-specs-BD7HOTMJ.mjs +15 -0
  226. package/dist/native-specs-IQQRJOOW.cjs +15 -0
  227. package/dist/native-tree-6G5O53O3.cjs +27 -0
  228. package/dist/{native-tree-EBPDFTRW.mjs → native-tree-VWNW2MQ2.mjs} +10 -8
  229. package/dist/native.cjs +87 -0
  230. package/dist/native.d.mts +72 -0
  231. package/dist/native.d.ts +72 -0
  232. package/dist/native.mjs +87 -0
  233. package/dist/{navigation-delegate.d-C76gXTmO.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
  234. package/dist/{navigation-delegate.d-DIyDslxt.d.ts → navigation-delegate.d-JXx40JzR.d.ts} +1 -1
  235. package/dist/navigation.cjs +5 -5
  236. package/dist/navigation.d.mts +5 -5
  237. package/dist/navigation.d.ts +5 -5
  238. package/dist/navigation.mjs +4 -4
  239. package/dist/{nitro-R444AF3O.mjs → nitro-FLN6DRGJ.mjs} +7 -7
  240. package/dist/{nitro-CK7M4RMY.cjs → nitro-HXAZZQKY.cjs} +12 -12
  241. package/dist/plugin.cjs +42 -42
  242. package/dist/plugin.d.mts +4 -4
  243. package/dist/plugin.d.ts +4 -4
  244. package/dist/plugin.mjs +41 -41
  245. package/dist/port-C6GBH4C6.cjs +419 -0
  246. package/dist/port-WOOQ3V56.mjs +419 -0
  247. package/dist/{production-runtime.d-CDHztggO.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
  248. package/dist/{production-runtime.d-tyaGdbk6.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
  249. package/dist/{programmatic-routes-client.d-XfmIrCK1.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
  250. package/dist/{programmatic-routes-client.d-aAWiDd64.d.mts → programmatic-routes-client.d-CPbNqtIi.d.mts} +2 -2
  251. package/dist/query/client.cjs +6 -6
  252. package/dist/query/client.mjs +2 -2
  253. package/dist/{render-plan.d-Dr5WRjoV.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
  254. package/dist/{render-plan.d-Diwybxo8.d.mts → render-plan.d-DZ-qjjdG.d.mts} +1 -1
  255. package/dist/renderer/react/server.cjs +2 -2
  256. package/dist/renderer/react/server.mjs +3 -3
  257. package/dist/renderer-client.cjs +6 -6
  258. package/dist/renderer-client.d.mts +5 -5
  259. package/dist/renderer-client.d.ts +5 -5
  260. package/dist/renderer-client.mjs +2 -2
  261. package/dist/{request.d-D01fRn--.d.ts → request.d-BiicaNxb.d.ts} +1 -1
  262. package/dist/{request.d-Dd3AFR79.d.mts → request.d-DV0oeUit.d.mts} +1 -1
  263. package/dist/request.d.mts +3 -3
  264. package/dist/request.d.ts +3 -3
  265. package/dist/{route-rendering.d-BQ53lJ_D.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
  266. package/dist/{route-rendering.d-Bhx4QoJt.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
  267. package/dist/{router.d-DQ3k7EYn.d.ts → router.d-DjGn_al7.d.ts} +1 -1
  268. package/dist/{router.d-Bi23a6Xc.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
  269. package/dist/{routes.d-C7jMJFvP.d.ts → routes.d-BKSjHuH9.d.ts} +25 -2
  270. package/dist/{routes.d-BgTd7vI4.d.mts → routes.d-qd8Qf4LG.d.mts} +25 -2
  271. package/dist/routes.d.mts +2 -2
  272. package/dist/routes.d.ts +2 -2
  273. package/dist/{rsc-pipeline-OCZIT5OF.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
  274. package/dist/{rsc-pipeline-K3ER3Q4N.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
  275. package/dist/{runtime-DKNSIH7V.cjs → runtime-DGUOWSMF.cjs} +293 -41
  276. package/dist/{runtime-MKYDEUZT.mjs → runtime-HFZTVNFF.mjs} +283 -31
  277. package/dist/{runtime.d-B2Js6qZ2.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
  278. package/dist/{runtime.d-BL-CGwoi.d.ts → runtime.d-Bm_4hP5T.d.ts} +1 -1
  279. package/dist/{schema-dev-notice-F6QYSOAI.mjs → schema-dev-notice-JMXEQWIQ.mjs} +3 -3
  280. package/dist/{schema-dev-notice-UU7DMZEU.cjs → schema-dev-notice-PLBFDTOF.cjs} +6 -6
  281. package/dist/server-fn-client.d.mts +1 -1
  282. package/dist/server-fn-client.d.ts +1 -1
  283. package/dist/server-plugins.cjs +1 -1
  284. package/dist/server-plugins.d.mts +3 -3
  285. package/dist/server-plugins.d.ts +3 -3
  286. package/dist/server-plugins.mjs +1 -1
  287. package/dist/server.cjs +81 -81
  288. package/dist/server.d.mts +11 -11
  289. package/dist/server.d.ts +11 -11
  290. package/dist/server.mjs +64 -64
  291. package/dist/session-2Q72D4QV.cjs +23 -0
  292. package/dist/{session-IGEDQ5PY.mjs → session-QZXZOPR2.mjs} +2 -2
  293. package/dist/shell-render.d-CG6bPiiA.d.mts +41 -0
  294. package/dist/shell-render.d-CG6bPiiA.d.ts +41 -0
  295. package/dist/{spa-router.d-DqZ6Lfs0.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
  296. package/dist/{spa-router.d-B2rIFGs0.d.mts → spa-router.d-DHDoXxDE.d.mts} +11 -2
  297. package/dist/testing.cjs +7 -7
  298. package/dist/testing.d.mts +2 -2
  299. package/dist/testing.d.ts +2 -2
  300. package/dist/testing.mjs +6 -6
  301. package/dist/{utils.d-Bv2MPeLR.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
  302. package/dist/{utils.d-fqXe8lNc.d.mts → utils.d-uKZcKJk4.d.mts} +7 -1
  303. package/dist/version.cjs +2 -2
  304. package/dist/version.mjs +1 -1
  305. package/dist/vite.cjs +42 -42
  306. package/dist/vite.d.mts +10 -5
  307. package/dist/vite.d.ts +10 -5
  308. package/dist/vite.mjs +41 -41
  309. package/dist/workflows.cjs +3 -3
  310. package/dist/workflows.mjs +2 -2
  311. package/package.json +17 -3
  312. package/dist/agent-mcp-handler-YE4AGWHN.cjs +0 -18
  313. package/dist/chunk-MIGFX2FN.mjs +0 -758
  314. package/dist/chunk-P6MHI5O2.cjs +0 -758
  315. package/dist/native-tree-MMZS7S6W.cjs +0 -25
  316. package/dist/session-AAU7RNRO.cjs +0 -23
  317. package/dist/{chunk-7FVVQEVL.cjs → chunk-4BS3HSY7.cjs} +2 -2
  318. package/dist/{chunk-N7JQXQAV.cjs → chunk-5OJVKXFV.cjs} +2 -2
  319. package/dist/{chunk-WSDKXV4E.mjs → chunk-72KABRWN.mjs} +4 -4
  320. package/dist/{chunk-C3BOESDW.mjs → chunk-B4CWYGCG.mjs} +3 -3
@@ -37,10 +37,13 @@ var _chunkA5BJKSZEcjs = require('./chunk-A5BJKSZE.cjs');
37
37
 
38
38
 
39
39
 
40
- var _chunkTQMI6BYOcjs = require('./chunk-TQMI6BYO.cjs');
41
40
 
42
41
 
43
- var _chunkLNM57D3Hcjs = require('./chunk-LNM57D3H.cjs');
42
+
43
+ var _chunkUYSTTPYJcjs = require('./chunk-UYSTTPYJ.cjs');
44
+
45
+
46
+ var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
44
47
 
45
48
 
46
49
  var _chunk3EEET2Q5cjs = require('./chunk-3EEET2Q5.cjs');
@@ -50,7 +53,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
50
53
 
51
54
 
52
55
 
53
- var _chunkUQHIWZZ6cjs = require('./chunk-UQHIWZZ6.cjs');
56
+ var _chunk3TL3AH25cjs = require('./chunk-3TL3AH25.cjs');
54
57
 
55
58
 
56
59
 
@@ -61,7 +64,7 @@ var _chunkUQHIWZZ6cjs = require('./chunk-UQHIWZZ6.cjs');
61
64
 
62
65
 
63
66
 
64
- var _chunkTSFMFPRUcjs = require('./chunk-TSFMFPRU.cjs');
67
+ var _chunkO27PLNQZcjs = require('./chunk-O27PLNQZ.cjs');
65
68
 
66
69
 
67
70
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -82,10 +85,10 @@ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
82
85
 
83
86
 
84
87
 
85
- var _chunk4SEHMBL4cjs = require('./chunk-4SEHMBL4.cjs');
88
+ var _chunkDPJ66FSIcjs = require('./chunk-DPJ66FSI.cjs');
86
89
 
87
90
 
88
- var _chunk46KXZBOGcjs = require('./chunk-46KXZBOG.cjs');
91
+ var _chunkQAS7KE7Jcjs = require('./chunk-QAS7KE7J.cjs');
89
92
 
90
93
 
91
94
  var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
@@ -100,11 +103,6 @@ var _chunkNK2VWS7Pcjs = require('./chunk-NK2VWS7P.cjs');
100
103
 
101
104
 
102
105
 
103
-
104
- var _chunkB3GM5I6Ncjs = require('./chunk-B3GM5I6N.cjs');
105
-
106
-
107
-
108
106
  var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
109
107
 
110
108
 
@@ -132,10 +130,15 @@ var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
132
130
 
133
131
 
134
132
 
135
- var _chunkFFE2EMF7cjs = require('./chunk-FFE2EMF7.cjs');
133
+ var _chunkDZPR2W6Ucjs = require('./chunk-DZPR2W6U.cjs');
134
+
136
135
 
136
+ var _chunkMEQN6DDAcjs = require('./chunk-MEQN6DDA.cjs');
137
137
 
138
- var _chunkH33PJEXNcjs = require('./chunk-H33PJEXN.cjs');
138
+
139
+
140
+
141
+ var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
139
142
 
140
143
 
141
144
 
@@ -147,7 +150,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
147
150
 
148
151
 
149
152
 
150
- var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
153
+ var _chunkPRFNLQSPcjs = require('./chunk-PRFNLQSP.cjs');
151
154
 
152
155
 
153
156
 
@@ -156,7 +159,7 @@ var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
156
159
 
157
160
 
158
161
 
159
- var _chunkD7UQC4O6cjs = require('./chunk-D7UQC4O6.cjs');
162
+ var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
160
163
 
161
164
 
162
165
 
@@ -167,10 +170,10 @@ var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
167
170
 
168
171
 
169
172
 
170
- var _chunkCECUDGXQcjs = require('./chunk-CECUDGXQ.cjs');
173
+ var _chunkZP32GNJQcjs = require('./chunk-ZP32GNJQ.cjs');
171
174
 
172
175
 
173
- var _chunkX2AMN2WVcjs = require('./chunk-X2AMN2WV.cjs');
176
+ var _chunkLQNW3ABPcjs = require('./chunk-LQNW3ABP.cjs');
174
177
 
175
178
 
176
179
 
@@ -186,7 +189,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
186
189
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
187
190
 
188
191
 
189
- var _chunkKHXAJ2KAcjs = require('./chunk-KHXAJ2KA.cjs');
192
+ var _chunkW2RZ73IUcjs = require('./chunk-W2RZ73IU.cjs');
190
193
 
191
194
 
192
195
  var _chunkRVGLYMJMcjs = require('./chunk-RVGLYMJM.cjs');
@@ -196,10 +199,10 @@ var _chunkRVGLYMJMcjs = require('./chunk-RVGLYMJM.cjs');
196
199
  var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
197
200
 
198
201
 
199
- var _chunkOYNNA4DDcjs = require('./chunk-OYNNA4DD.cjs');
202
+ var _chunkCBKRS3M4cjs = require('./chunk-CBKRS3M4.cjs');
200
203
 
201
204
 
202
- var _chunk6ONBZGVHcjs = require('./chunk-6ONBZGVH.cjs');
205
+ var _chunkLRB5OVRTcjs = require('./chunk-LRB5OVRT.cjs');
203
206
 
204
207
 
205
208
 
@@ -221,7 +224,7 @@ var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
221
224
 
222
225
 
223
226
 
224
- var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
227
+ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
225
228
 
226
229
 
227
230
 
@@ -237,20 +240,20 @@ var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
237
240
  var _chunkYIHRZBD7cjs = require('./chunk-YIHRZBD7.cjs');
238
241
 
239
242
 
243
+ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
240
244
 
241
245
 
242
246
 
243
247
 
244
- var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
245
248
 
246
249
 
247
- var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
250
+ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
248
251
 
249
252
 
250
- var _chunkOAMUSC7Hcjs = require('./chunk-OAMUSC7H.cjs');
253
+ var _chunk2FRLSDBTcjs = require('./chunk-2FRLSDBT.cjs');
251
254
 
252
255
 
253
- var _chunkIWFV5ZEDcjs = require('./chunk-IWFV5ZED.cjs');
256
+ var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
254
257
 
255
258
 
256
259
 
@@ -706,7 +709,7 @@ function resolveFarmPageDataFailure(error) {
706
709
  }
707
710
 
708
711
  // src/openapi/dev-status.ts
709
- function reportOpenAPIDevGenerationResult(spec, output = _chunkVQJYGZNXcjs.logger) {
712
+ function reportOpenAPIDevGenerationResult(spec, output = _chunkQMNWKQL4cjs.logger) {
710
713
  if (spec) {
711
714
  output.success("\u2705 OpenAPI documentation enabled");
712
715
  return;
@@ -717,13 +720,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkVQJYGZNXcjs.logge
717
720
  // src/vite.ts
718
721
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
719
722
  function farmLlmsTxtGeneratedPaths(config) {
720
- const llms = _chunkH33PJEXNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _39 => _39.agent, 'optionalAccess', _40 => _40.llmsTxt]));
723
+ const llms = _chunkMEQN6DDAcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _39 => _39.agent, 'optionalAccess', _40 => _40.llmsTxt]));
721
724
  if (!llms.enabled) return [];
722
725
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
723
726
  }
724
727
  function farmAgentGeneratedPaths(config) {
725
- const crawlers = _chunkFFE2EMF7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _41 => _41.agent, 'optionalAccess', _42 => _42.crawlers]));
726
- const sitemap = _chunkFFE2EMF7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _43 => _43.agent, 'optionalAccess', _44 => _44.sitemap]));
728
+ const crawlers = _chunkDZPR2W6Ucjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _41 => _41.agent, 'optionalAccess', _42 => _42.crawlers]));
729
+ const sitemap = _chunkDZPR2W6Ucjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _43 => _43.agent, 'optionalAccess', _44 => _44.sitemap]));
727
730
  return [
728
731
  ...farmLlmsTxtGeneratedPaths(config),
729
732
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -768,7 +771,7 @@ function loadFarmWorkflowsDevRuntime() {
768
771
  return import("./workflows.cjs");
769
772
  }
770
773
  function loadFarmDevtoolsSnapshotRuntime() {
771
- return import("./devtools-TO6TAO32.cjs");
774
+ return import("./devtools-UF6JYHUN.cjs");
772
775
  }
773
776
  function loadFarmDevtoolsUIRuntime() {
774
777
  return import("./devtools-ui-SYRUXUA7.cjs");
@@ -872,7 +875,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
872
875
  if (!snapshot) return "";
873
876
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
874
877
  if (snapshot.routing === "none") return runtime;
875
- return `${_chunkTSFMFPRUcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
878
+ return `${_chunkO27PLNQZcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
876
879
  }
877
880
  function getPublicEnvDefine(config) {
878
881
  const publicEnv = _optionalChain([config, 'access', _49 => _49.env, 'optionalAccess', _50 => _50.public]);
@@ -1177,7 +1180,7 @@ function getEnvDefines(config, configEnv) {
1177
1180
  }
1178
1181
  function getFarmAPIBaseURLDefine(config) {
1179
1182
  const baseURL = _optionalChain([config, 'access', _58 => _58.api, 'optionalAccess', _59 => _59.baseURL]);
1180
- return typeof baseURL === "string" && baseURL ? baseURL : _chunkIWFV5ZEDcjs.DEFAULT_FARM_API_BASE_PATH;
1183
+ return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
1181
1184
  }
1182
1185
  function isResolvedEnvScope(value) {
1183
1186
  if (!value || typeof value !== "object" || Array.isArray(value)) {
@@ -1223,8 +1226,8 @@ function rewriteEarlySsrRelativeImports(options) {
1223
1226
  const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
1224
1227
  const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
1225
1228
  const resolvedPath = path5.resolve(path5.dirname(cleanId), sourcePath);
1226
- const moduleId = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, resolvedPath, options.root);
1227
- const specifier = moduleId.startsWith("/@fs/") ? _chunkVQJYGZNXcjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
1229
+ const moduleId = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, resolvedPath, options.root);
1230
+ const specifier = moduleId.startsWith("/@fs/") ? _chunkQMNWKQL4cjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
1228
1231
  replacements.push({
1229
1232
  start: source.start,
1230
1233
  end: source.end,
@@ -1255,7 +1258,7 @@ function transformIsolatedClientBoundaryModule(options) {
1255
1258
  const wrapperName = `__farm_isolated_boundary_${safeName || "default"}__`;
1256
1259
  wrapperStatements.push(
1257
1260
  // Islands mode renders through islx; the older isolated hydration keeps Farm's boundary.
1258
- options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
1261
+ options.slots && options.inferredInteraction ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, "interaction", { inferred: true });` : options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
1259
1262
  );
1260
1263
  wrapperStatements.push(
1261
1264
  isDefault ? `export default ${wrapperName};` : `export { ${wrapperName} as ${exportName} };`
@@ -1392,7 +1395,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
1392
1395
  return;
1393
1396
  }
1394
1397
  warnedClientBoundaryIds.add(id);
1395
- _chunkVQJYGZNXcjs.logger.warn(formatClientBoundaryWarning(id, findings));
1398
+ _chunkQMNWKQL4cjs.logger.warn(formatClientBoundaryWarning(id, findings));
1396
1399
  }
1397
1400
  function shouldEmitFarmClientRootHmr(renderer) {
1398
1401
  return _chunkRD623KW4cjs.getFarmRendererCapabilities.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
@@ -1406,7 +1409,7 @@ function hasViteAlias(alias, find) {
1406
1409
  }
1407
1410
  function farmPlugin(options = {}, initialPluginManager) {
1408
1411
  const imageImports = farmImageImportsPlugin();
1409
- const fontImports = _chunkTQMI6BYOcjs.farmFontImportsPlugin.call(void 0, {
1412
+ const fontImports = _chunkUYSTTPYJcjs.farmFontImportsPlugin.call(void 0, {
1410
1413
  root: options.root,
1411
1414
  basePath: options.basePath,
1412
1415
  publicDir: options.publicDir
@@ -1447,7 +1450,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1447
1450
  config(userConfig, configEnv) {
1448
1451
  isBuild = configEnv.command === "build";
1449
1452
  const layerAliases = _chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, options.layers);
1450
- const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _83 => _83.resolve, 'optionalAccess', _84 => _84.alias]), "@") ? {} : _chunkTQMI6BYOcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
1453
+ const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _83 => _83.resolve, 'optionalAccess', _84 => _84.alias]), "@") ? {} : _chunkUYSTTPYJcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
1451
1454
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
1452
1455
  return {
1453
1456
  // Honor Farm's publicDir so the dev server serves the same static
@@ -1477,7 +1480,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1477
1480
  );
1478
1481
  reactRefreshActive = _chunk65Y5SIBHcjs.isFarmReactRefreshActive.call(void 0, config);
1479
1482
  if (_optionalChain([options, 'access', _88 => _88.experimental, 'optionalAccess', _89 => _89.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
1480
- _chunkVQJYGZNXcjs.logger.warn(
1483
+ _chunkQMNWKQL4cjs.logger.warn(
1481
1484
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
1482
1485
  );
1483
1486
  }
@@ -1500,7 +1503,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1500
1503
  } catch (e12) {
1501
1504
  }
1502
1505
  };
1503
- farmApp = new (0, _chunkTQMI6BYOcjs.FarmApp)(
1506
+ farmApp = new (0, _chunkUYSTTPYJcjs.FarmApp)(
1504
1507
  {
1505
1508
  ...options,
1506
1509
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -1513,14 +1516,14 @@ function farmPlugin(options = {}, initialPluginManager) {
1513
1516
  if (_optionalChain([farmConfig, 'access', _92 => _92.agent, 'optionalAccess', _93 => _93.noindexPreviews])) {
1514
1517
  server.middlewares.use((_req, res, next) => {
1515
1518
  if (_chunkSGBNF56Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
1516
- res.setHeader("X-Robots-Tag", _chunkFFE2EMF7cjs.FARM_PREVIEW_ROBOTS_TAG);
1519
+ res.setHeader("X-Robots-Tag", _chunkDZPR2W6Ucjs.FARM_PREVIEW_ROBOTS_TAG);
1517
1520
  }
1518
1521
  next();
1519
1522
  });
1520
1523
  }
1521
- const apiServerBasePath = _chunkB5BBTPJQcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
1524
+ const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
1522
1525
  const devBuiltInRoutePaths = new Set(
1523
- _chunk4SEHMBL4cjs.listFarmBuiltInRoutePaths.call(void 0, {
1526
+ _chunkDPJ66FSIcjs.listFarmBuiltInRoutePaths.call(void 0, {
1524
1527
  agent: {
1525
1528
  apiCatalog: true,
1526
1529
  mcp: true,
@@ -1544,7 +1547,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1544
1547
  // a caller-controlled Host header.
1545
1548
  trustedLocalOrigin: () => _optionalChain([server, 'access', _94 => _94.resolvedUrls, 'optionalAccess', _95 => _95.local, 'access', _96 => _96[0]]),
1546
1549
  onError(error) {
1547
- _chunkVQJYGZNXcjs.logger.error(
1550
+ _chunkQMNWKQL4cjs.logger.error(
1548
1551
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
1549
1552
  );
1550
1553
  }
@@ -1570,7 +1573,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1570
1573
  );
1571
1574
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
1572
1575
  try {
1573
- const result = await _chunkUQHIWZZ6cjs.generateFarmTypeArtifacts.call(void 0, {
1576
+ const result = await _chunk3TL3AH25cjs.generateFarmTypeArtifacts.call(void 0, {
1574
1577
  root: farmConfig.root,
1575
1578
  srcDir: farmConfig.srcDir,
1576
1579
  layers: farmConfig.layers,
@@ -1599,7 +1602,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1599
1602
  }
1600
1603
  } catch (e) {
1601
1604
  const message = e instanceof Error ? e.message : String(e);
1602
- _chunkVQJYGZNXcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
1605
+ _chunkQMNWKQL4cjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
1603
1606
  if (pm) {
1604
1607
  await emitPluginError("type-artifact-generation", e, { reason });
1605
1608
  }
@@ -1652,7 +1655,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1652
1655
  let routeRefreshScheduled = null;
1653
1656
  let pendingRouteRefreshIncludesMiddleware = false;
1654
1657
  const scheduleTypeArtifactGen = (file, event, selection) => {
1655
- const normalizedFile = _chunkVQJYGZNXcjs.toPosixPath.call(void 0, file);
1658
+ const normalizedFile = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, file);
1656
1659
  for (const [artifact, enabled] of Object.entries(selection)) {
1657
1660
  if (enabled) {
1658
1661
  pendingTypeArtifacts[artifact] = true;
@@ -1689,7 +1692,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1689
1692
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
1690
1693
  }
1691
1694
  if (isI18nCatalogFile(file)) {
1692
- _optionalChain([farmApp, 'optionalAccess', _104 => _104.getI18nRuntime, 'call', _105 => _105(), 'access', _106 => _106.reload, 'call', _107 => _107(), 'access', _108 => _108.then, 'call', _109 => _109(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _110 => _110.catch, 'call', _111 => _111((error) => _chunkVQJYGZNXcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
1695
+ _optionalChain([farmApp, 'optionalAccess', _104 => _104.getI18nRuntime, 'call', _105 => _105(), 'access', _106 => _106.reload, 'call', _107 => _107(), 'access', _108 => _108.then, 'call', _109 => _109(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _110 => _110.catch, 'call', _111 => _111((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
1693
1696
  }
1694
1697
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
1695
1698
  if (isRouteRefreshEvent) {
@@ -1704,7 +1707,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1704
1707
  Promise.all([
1705
1708
  _optionalChain([refreshRouteDiscovery, 'optionalCall', _112 => _112(`${ev} ${file}`)]),
1706
1709
  reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _113 => _113.reload, 'call', _114 => _114()]) : void 0
1707
- ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkVQJYGZNXcjs.logger.warn(`Route refresh failed: ${error.message}`));
1710
+ ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkQMNWKQL4cjs.logger.warn(`Route refresh failed: ${error.message}`));
1708
1711
  }, 50);
1709
1712
  }
1710
1713
  }
@@ -1738,7 +1741,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1738
1741
  });
1739
1742
  }
1740
1743
  const dispatchToDevServer = _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server);
1741
- apiRouteManager = new (0, _chunkKHXAJ2KAcjs.APIRouteManager)(appDirs, server, {
1744
+ apiRouteManager = new (0, _chunkW2RZ73IUcjs.APIRouteManager)(appDirs, server, {
1742
1745
  plugins: farmConfig.plugins,
1743
1746
  i18n: farmApp.getI18nRuntime(),
1744
1747
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -1772,7 +1775,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1772
1775
  loadModule: async (workflow) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
1773
1776
  server: farmConfig.server
1774
1777
  });
1775
- _chunkVQJYGZNXcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
1778
+ _chunkQMNWKQL4cjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
1776
1779
  }
1777
1780
  }
1778
1781
  if (pm) {
@@ -1784,7 +1787,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1784
1787
  });
1785
1788
  }
1786
1789
  }
1787
- middlewareManager = new (0, _chunkX2AMN2WVcjs.MiddlewareManager)(
1790
+ middlewareManager = new (0, _chunkLQNW3ABPcjs.MiddlewareManager)(
1788
1791
  appDirs,
1789
1792
  server,
1790
1793
  farmConfig.middleware,
@@ -1826,7 +1829,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1826
1829
  await openAPIManager.invalidateCache();
1827
1830
  }
1828
1831
  if (process.env.FARM_VERBOSE) {
1829
- _chunkVQJYGZNXcjs.logger.info(`Refreshed routes: ${reason}`);
1832
+ _chunkQMNWKQL4cjs.logger.info(`Refreshed routes: ${reason}`);
1830
1833
  }
1831
1834
  };
1832
1835
  const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
@@ -1838,7 +1841,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1838
1841
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
1839
1842
  };
1840
1843
  releaseDocsMCPServers();
1841
- const isFarmDocsPathGuarded = (href) => _chunkTSFMFPRUcjs.farmPathGuardCoversPage.call(void 0,
1844
+ const isFarmDocsPathGuarded = (href) => _chunkO27PLNQZcjs.farmPathGuardCoversPage.call(void 0,
1842
1845
  {
1843
1846
  config: farmConfig,
1844
1847
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -1851,7 +1854,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1851
1854
  clientEntry: "/@farm/client.js",
1852
1855
  resolveLayoutFonts: resolveDocsLayoutFonts,
1853
1856
  fontStylesheetHref: "/@farm/fonts.css",
1854
- globalStylesheetHref: _chunkTQMI6BYOcjs.resolveDevGlobalStylesheetHref.call(void 0,
1857
+ globalStylesheetHref: _chunkUYSTTPYJcjs.resolveDevGlobalStylesheetHref.call(void 0,
1855
1858
  farmConfig.root,
1856
1859
  farmConfig.srcDir
1857
1860
  ),
@@ -1866,7 +1869,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1866
1869
  return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _123 => _123.id]), () => ( specifier)));
1867
1870
  },
1868
1871
  registerMCPServer: (mcpServer) => {
1869
- const dispose = _chunk6ONBZGVHcjs.registerFarmMCPServer.call(void 0, mcpServer);
1872
+ const dispose = _chunkLRB5OVRTcjs.registerFarmMCPServer.call(void 0, mcpServer);
1870
1873
  docsMCPServerDisposers.add(dispose);
1871
1874
  return () => {
1872
1875
  docsMCPServerDisposers.delete(dispose);
@@ -1881,7 +1884,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1881
1884
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
1882
1885
  resolveLayoutFonts: resolveDocsLayoutFonts,
1883
1886
  fontStylesheetHref: "/@farm/fonts.css",
1884
- globalStylesheetHref: _chunkTQMI6BYOcjs.resolveDevGlobalStylesheetHref.call(void 0,
1887
+ globalStylesheetHref: _chunkUYSTTPYJcjs.resolveDevGlobalStylesheetHref.call(void 0,
1885
1888
  farmConfig.root,
1886
1889
  farmConfig.srcDir
1887
1890
  ),
@@ -1895,7 +1898,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1895
1898
  const matchedRoute = routeManager.matchRoute(pathname);
1896
1899
  const layoutEntries = matchedRoute.layouts.map((layout) => ({
1897
1900
  ...layout,
1898
- metadata: _chunkTQMI6BYOcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
1901
+ metadata: _chunkUYSTTPYJcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
1899
1902
  }));
1900
1903
  if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
1901
1904
  return response;
@@ -1923,7 +1926,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1923
1926
  (strategy) => strategy === hydrationStrategies[0]
1924
1927
  ) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
1925
1928
  const params = matchedRoute.params || {};
1926
- const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, farmConfig.root);
1929
+ const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, farmConfig.root);
1927
1930
  const clientLayouts = Object.fromEntries(
1928
1931
  layoutEntries.map((layout) => [
1929
1932
  layout.pattern,
@@ -2126,7 +2129,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2126
2129
  } else {
2127
2130
  if (!warnedDeprecatedDevtoolsDashboard) {
2128
2131
  warnedDeprecatedDevtoolsDashboard = true;
2129
- _chunkVQJYGZNXcjs.logger.warn(
2132
+ _chunkQMNWKQL4cjs.logger.warn(
2130
2133
  "The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
2131
2134
  );
2132
2135
  }
@@ -2159,9 +2162,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2159
2162
  if (_optionalChain([pm, 'optionalAccess', _148 => _148.hasRuntimeRequestHooks, 'call', _149 => _149()])) {
2160
2163
  try {
2161
2164
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
2162
- const route = _chunk4SEHMBL4cjs.setFarmRouteLabel.call(void 0,
2165
+ const route = _chunkDPJ66FSIcjs.setFarmRouteLabel.call(void 0,
2163
2166
  { pathname: requestPathname },
2164
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk4SEHMBL4cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
2167
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkDPJ66FSIcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
2165
2168
  );
2166
2169
  runtimeSession2 = await pm.beginRuntimeRequest(
2167
2170
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -2237,24 +2240,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2237
2240
  );
2238
2241
  return;
2239
2242
  }
2240
- if (_optionalChain([options, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.manifest]) !== false && _chunk4SEHMBL4cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
2243
+ if (_optionalChain([options, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.manifest]) !== false && _chunkDPJ66FSIcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
2241
2244
  await serveBuiltInRoute(async () => {
2242
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkTQMI6BYOcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
2243
- const manifest = await _chunk4SEHMBL4cjs.createFarmAppManifestResponse.call(void 0,
2245
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkUYSTTPYJcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
2246
+ const manifest = await _chunkDPJ66FSIcjs.createFarmAppManifestResponse.call(void 0,
2244
2247
  new Request(parsedRequestUrl, {
2245
2248
  method: requestMethod,
2246
2249
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
2247
2250
  }),
2248
2251
  {
2249
- ..._chunk4SEHMBL4cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
2252
+ ..._chunkDPJ66FSIcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
2250
2253
  build: "development",
2251
2254
  packages: farmAppPackages,
2252
2255
  // Read again on each request; unchanged files come from a cache.
2253
- webmcpTools: _optionalChain([farmConfig, 'access', _157 => _157.plugins, 'optionalAccess', _158 => _158.some, 'call', _159 => _159(({ name }) => name === "farm:webmcp")]) ? _chunkTQMI6BYOcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
2256
+ webmcpTools: _optionalChain([farmConfig, 'access', _157 => _157.plugins, 'optionalAccess', _158 => _158.some, 'call', _159 => _159(({ name }) => name === "farm:webmcp")]) ? _chunkUYSTTPYJcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
2254
2257
  }),
2255
2258
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
2256
2259
  // A guard written for an MCP server's path keeps its tools out of the public view.
2257
- guardCoversPath: (path6) => _chunkTSFMFPRUcjs.farmPathGuardCoversEndpoint.call(void 0,
2260
+ guardCoversPath: (path6) => _chunkO27PLNQZcjs.farmPathGuardCoversEndpoint.call(void 0,
2258
2261
  {
2259
2262
  config: farmConfig,
2260
2263
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2268,11 +2271,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2268
2271
  });
2269
2272
  return;
2270
2273
  }
2271
- if (_optionalChain([options, 'access', _160 => _160.agent, 'optionalAccess', _161 => _161.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk4SEHMBL4cjs.FARM_API_CATALOG_PATH) {
2274
+ if (_optionalChain([options, 'access', _160 => _160.agent, 'optionalAccess', _161 => _161.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkDPJ66FSIcjs.FARM_API_CATALOG_PATH) {
2272
2275
  await serveBuiltInRoute(
2273
- () => _chunk4SEHMBL4cjs.createFarmApiCatalogResponse.call(void 0,
2276
+ () => _chunkDPJ66FSIcjs.createFarmApiCatalogResponse.call(void 0,
2274
2277
  requestMethod,
2275
- _chunk4SEHMBL4cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
2278
+ _chunkDPJ66FSIcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
2276
2279
  new Request(parsedRequestUrl, {
2277
2280
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
2278
2281
  })
@@ -2281,7 +2284,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2281
2284
  return;
2282
2285
  }
2283
2286
  if (_optionalChain([options, 'access', _162 => _162.agent, 'optionalAccess', _163 => _163.aiCatalog]) !== false) {
2284
- const aiCatalog = _chunk4SEHMBL4cjs.createFarmAiCatalogResponse.call(void 0,
2287
+ const aiCatalog = _chunkDPJ66FSIcjs.createFarmAiCatalogResponse.call(void 0,
2285
2288
  new Request(parsedRequestUrl, {
2286
2289
  method: requestMethod,
2287
2290
  headers: {
@@ -2325,7 +2328,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2325
2328
  {
2326
2329
  kind: "docs",
2327
2330
  computed: docsResponse,
2328
- label: _chunk4SEHMBL4cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
2331
+ label: _chunkDPJ66FSIcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
2329
2332
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
2330
2333
  {
2331
2334
  path: _optionalChain([farmConfig, 'access', _164 => _164.docs, 'optionalAccess', _165 => _165.entry]) || "/docs",
@@ -2338,7 +2341,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2338
2341
  }
2339
2342
  }
2340
2343
  if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD") && _optionalChain([req, 'access', _170 => _170.headers, 'access', _171 => _171.accept, 'optionalAccess', _172 => _172.includes, 'call', _173 => _173(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
2341
- const { createFarmNativeTreeResponse } = await import("./native-tree-MMZS7S6W.cjs");
2344
+ const { createFarmNativeTreeResponse } = await import("./native-tree-6G5O53O3.cjs");
2342
2345
  const treeResponse = await createFarmNativeTreeResponse({
2343
2346
  request: new Request(fullUrl, { method: requestMethod, headers: docsHeaders }),
2344
2347
  // As for the Markdown mirror: this server's own listener, redirects not followed.
@@ -2354,11 +2357,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2354
2357
  });
2355
2358
  return;
2356
2359
  }
2357
- const markdownRouteLabel = () => _chunk4SEHMBL4cjs.resolveFarmMarkdownRouteLabel.call(void 0,
2360
+ const markdownRouteLabel = () => _chunkDPJ66FSIcjs.resolveFarmMarkdownRouteLabel.call(void 0,
2358
2361
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
2359
2362
  (page) => _optionalChain([farmApp, 'access', _180 => _180.getRouteManager, 'call', _181 => _181(), 'access', _182 => _182.matchRoute, 'call', _183 => _183(page), 'access', _184 => _184.route, 'optionalAccess', _185 => _185.pattern])
2360
2363
  );
2361
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkB3GM5I6Ncjs.createFarmMarkdownSourceResponse.call(void 0, {
2364
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunkPRFNLQSPcjs.createFarmMarkdownSourceResponse.call(void 0, {
2362
2365
  request: new Request(fullUrl, {
2363
2366
  method: requestMethod,
2364
2367
  headers: docsHeaders
@@ -2366,7 +2369,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2366
2369
  config: farmApp.getConfig().mdx,
2367
2370
  resolveSource: async (pathname2) => {
2368
2371
  const match = farmApp.getRouteManager().matchRoute(pathname2);
2369
- const sourcePath = _optionalChain([match, 'access', _186 => _186.route, 'optionalAccess', _187 => _187.markdownSourcePath]) || (match.route && _chunkB3GM5I6Ncjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
2372
+ const sourcePath = _optionalChain([match, 'access', _186 => _186.route, 'optionalAccess', _187 => _187.markdownSourcePath]) || (match.route && _chunkPRFNLQSPcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
2370
2373
  if (!sourcePath) {
2371
2374
  return null;
2372
2375
  }
@@ -2391,7 +2394,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2391
2394
  });
2392
2395
  return;
2393
2396
  }
2394
- const markdownResponse = viteModuleRequest ? null : await _chunkD7UQC4O6cjs.createMarkdownMirrorResponse.call(void 0, {
2397
+ const markdownResponse = viteModuleRequest ? null : await _chunkLT4VAF5Zcjs.createMarkdownMirrorResponse.call(void 0, {
2395
2398
  request: new Request(fullUrl, {
2396
2399
  method: requestMethod,
2397
2400
  headers: docsHeaders
@@ -2422,16 +2425,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2422
2425
  });
2423
2426
  return;
2424
2427
  }
2425
- if (!viteModuleRequest && _chunkD7UQC4O6cjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
2426
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkB3GM5I6Ncjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
2428
+ if (!viteModuleRequest && _chunkLT4VAF5Zcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
2429
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkPRFNLQSPcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
2427
2430
  if (!markdownRoute.route) {
2428
2431
  await serveBuiltInRoute(
2429
2432
  () => new Response(
2430
- _chunkD7UQC4O6cjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
2433
+ _chunkLT4VAF5Zcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
2431
2434
  {
2432
2435
  status: 404,
2433
2436
  headers: {
2434
- "Content-Type": _chunkD7UQC4O6cjs.FARM_MARKDOWN_CONTENT_TYPE,
2437
+ "Content-Type": _chunkLT4VAF5Zcjs.FARM_MARKDOWN_CONTENT_TYPE,
2435
2438
  "X-Farm-Markdown-Error": "404",
2436
2439
  "Cache-Control": "no-store"
2437
2440
  }
@@ -2441,7 +2444,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2441
2444
  return;
2442
2445
  }
2443
2446
  }
2444
- const markdownPageTarget = _chunkD7UQC4O6cjs.resolveMarkdownMirrorTarget.call(void 0,
2447
+ const markdownPageTarget = _chunkLT4VAF5Zcjs.resolveMarkdownMirrorTarget.call(void 0,
2445
2448
  farmApp.getConfig().md,
2446
2449
  requestPathname,
2447
2450
  {
@@ -2454,7 +2457,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2454
2457
  if (!varyValues.some((value) => value.toLowerCase() === "accept")) {
2455
2458
  res.setHeader("Vary", [...varyValues, "Accept"].join(", "));
2456
2459
  }
2457
- const alternatePath = _chunkD7UQC4O6cjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
2460
+ const alternatePath = _chunkLT4VAF5Zcjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
2458
2461
  const alternateLink = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
2459
2462
  const currentLink = res.getHeader("Link");
2460
2463
  res.setHeader(
@@ -2492,7 +2495,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2492
2495
  }
2493
2496
  const configuredIntegrations = currentConfig.integrations;
2494
2497
  const tryConfiguredIntegrationRoute = async () => {
2495
- const matchedRoute = _chunkCECUDGXQcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
2498
+ const matchedRoute = _chunkZP32GNJQcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
2496
2499
  pathname: requestPathname,
2497
2500
  method: requestMethod
2498
2501
  });
@@ -2505,7 +2508,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2505
2508
  await pm.runHookParallelFiltered(
2506
2509
  "beforeRequest",
2507
2510
  (plugin) => {
2508
- const owner = _chunkCECUDGXQcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
2511
+ const owner = _chunkZP32GNJQcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
2509
2512
  return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _188 => _188.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
2510
2513
  },
2511
2514
  req,
@@ -2534,7 +2537,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2534
2537
  signal: _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2535
2538
  });
2536
2539
  const dispatchIntegration = async (request) => {
2537
- const result = await _chunkCECUDGXQcjs.dispatchIntegrationRequest.call(void 0,
2540
+ const result = await _chunkZP32GNJQcjs.dispatchIntegrationRequest.call(void 0,
2538
2541
  {
2539
2542
  integration: matchedRoute.integration,
2540
2543
  config: currentConfig,
@@ -2577,7 +2580,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2577
2580
  method: requestMethod,
2578
2581
  integration: matchedRoute.key
2579
2582
  });
2580
- _chunkVQJYGZNXcjs.logger.error(`Integration route error: ${error}`);
2583
+ _chunkQMNWKQL4cjs.logger.error(`Integration route error: ${error}`);
2581
2584
  if (!res.writableEnded) {
2582
2585
  res.statusCode = 500;
2583
2586
  res.setHeader("Content-Type", "application/json");
@@ -2598,7 +2601,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2598
2601
  }
2599
2602
  const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
2600
2603
  const hasMatchedApiRoute = Boolean(matchedApiRoute);
2601
- if (hasMatchedApiRoute || _chunkOYNNA4DDcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
2604
+ if (hasMatchedApiRoute || _chunkCBKRS3M4cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
2602
2605
  const startTime2 = Date.now();
2603
2606
  const method2 = req.method || "GET";
2604
2607
  const urlPath2 = req.url || "/";
@@ -2631,7 +2634,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2631
2634
  urlPath: urlPath2,
2632
2635
  method: method2
2633
2636
  });
2634
- _chunkVQJYGZNXcjs.logger.error(`Request hook error: ${error}`);
2637
+ _chunkQMNWKQL4cjs.logger.error(`Request hook error: ${error}`);
2635
2638
  res.statusCode = 500;
2636
2639
  res.setHeader("Content-Type", "application/json");
2637
2640
  res.end(JSON.stringify({ error: "Internal server error" }));
@@ -2733,7 +2736,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2733
2736
  urlPath: urlPath2,
2734
2737
  method: method2
2735
2738
  });
2736
- _chunkVQJYGZNXcjs.logger.error(`API route error: ${error}`);
2739
+ _chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
2737
2740
  res.statusCode = 500;
2738
2741
  res.setHeader("Content-Type", "application/json");
2739
2742
  res.end(JSON.stringify({ error: "Internal server error" }));
@@ -2778,9 +2781,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2778
2781
  };
2779
2782
  const docsResponse = pm ? await pm.runRuntimeRequest(request, invokeDocsAPIHandler, {
2780
2783
  kind: "docs",
2781
- route: _chunk4SEHMBL4cjs.setFarmRouteLabel.call(void 0,
2784
+ route: _chunkDPJ66FSIcjs.setFarmRouteLabel.call(void 0,
2782
2785
  { pathname: pathname2, pattern: apiLifecyclePayload.routePath },
2783
- _chunk4SEHMBL4cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
2786
+ _chunkDPJ66FSIcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
2784
2787
  path: _optionalChain([farmConfig, 'access', _197 => _197.docs, 'optionalAccess', _198 => _198.entry]) || "/docs",
2785
2788
  roots: _optionalChain([farmConfig, 'access', _199 => _199.docs, 'optionalAccess', _200 => _200.roots, 'optionalAccess', _201 => _201.map, 'call', _202 => _202((root) => root.entry)])
2786
2789
  })
@@ -2802,7 +2805,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2802
2805
  urlPath: urlPath2,
2803
2806
  method: method2
2804
2807
  });
2805
- _chunkVQJYGZNXcjs.logger.error(`Docs API route error: ${error}`);
2808
+ _chunkQMNWKQL4cjs.logger.error(`Docs API route error: ${error}`);
2806
2809
  res.statusCode = 500;
2807
2810
  res.setHeader("Content-Type", "application/json");
2808
2811
  res.end(JSON.stringify({ error: "Internal server error" }));
@@ -2909,7 +2912,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2909
2912
  );
2910
2913
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
2911
2914
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
2912
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkTQMI6BYOcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
2915
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkUYSTTPYJcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
2913
2916
  const isClientComponent = moduleMetadata.isClientComponent;
2914
2917
  const shouldHydrate = moduleMetadata.shouldHydrate;
2915
2918
  let mergedMetadata = {};
@@ -2917,7 +2920,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2917
2920
  layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
2918
2921
  );
2919
2922
  const layoutHydrationMetadata = layouts.map(
2920
- (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkTQMI6BYOcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
2923
+ (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkUYSTTPYJcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
2921
2924
  );
2922
2925
  const shouldHydrateLayout = layoutHydrationMetadata.some(
2923
2926
  (metadata) => metadata.shouldHydrate
@@ -2928,9 +2931,22 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2928
2931
  (metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
2929
2932
  )
2930
2933
  ];
2931
- const hydrationIslandStrategy = hydrationStrategies.every(
2932
- (strategy) => strategy === hydrationStrategies[0]
2933
- ) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
2934
+ const hydrationIslandStrategy = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0,
2935
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _221 => _221.getConfig, 'call', _222 => _222()]), () => ( options))), 'access', _223 => _223.experimental, 'optionalAccess', _224 => _224.serverComponents])
2936
+ ) === "islands" ? _chunkUYSTTPYJcjs.resolveFarmRouteRootStrategy.call(void 0,
2937
+ route,
2938
+ { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
2939
+ layouts.map((layout, index) => ({
2940
+ pattern: layout.pattern,
2941
+ modulePath: layout.modulePath,
2942
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _225 => _225[index], 'optionalAccess', _226 => _226.shouldHydrate]) === true,
2943
+ // Manifest entries carry it; metadata read from source does not.
2944
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _227 => _227[index], 'optionalAccess', _228 => _228.hasIsolatedClientBoundaries]) === true,
2945
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _229 => _229[index], 'optionalAccess', _230 => _230.islandStrategy]), () => ( null))
2946
+ })),
2947
+ server.config.root,
2948
+ true
2949
+ ) : hydrationStrategies.every((strategy) => strategy === hydrationStrategies[0]) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
2934
2950
  const targetUrl = new URL(targetPath, "http://localhost");
2935
2951
  const searchParams = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, targetUrl.searchParams);
2936
2952
  const routeContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
@@ -2974,14 +2990,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2974
2990
  mergedMetadata = await _chunk6IOZPJ3Icjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
2975
2991
  mergedMetadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
2976
2992
  mergedMetadata,
2977
- _chunkD7UQC4O6cjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
2993
+ _chunkLT4VAF5Zcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
2978
2994
  );
2979
2995
  const routeSlots = await Promise.all(
2980
2996
  slots.map(async (slot) => {
2981
2997
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
2982
2998
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
2983
2999
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
2984
- ), () => ( _chunkTQMI6BYOcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
3000
+ ), () => ( _chunkUYSTTPYJcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
2985
3001
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
2986
3002
  request: targetRequest,
2987
3003
  params: slot.params,
@@ -3026,16 +3042,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3026
3042
  })
3027
3043
  );
3028
3044
  const projectRoot = server.config.root;
3029
- const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
3030
- const renderPlan = _chunkTSFMFPRUcjs.createFarmRouteRenderPlan.call(void 0, {
3045
+ const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
3046
+ const renderPlan = _chunkO27PLNQZcjs.createFarmRouteRenderPlan.call(void 0, {
3031
3047
  pageShouldHydrate: shouldHydrate,
3032
3048
  layoutShouldHydrate: shouldHydrateLayout,
3033
3049
  islandStrategy: hydrationIslandStrategy,
3034
- rendering: _chunkUQHIWZZ6cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
3050
+ rendering: _chunk3TL3AH25cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
3035
3051
  });
3036
3052
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
3037
- const layoutStartIndex = _chunkTSFMFPRUcjs.getSharedLayoutPrefixLength.call(void 0,
3038
- _chunkTSFMFPRUcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
3053
+ const layoutStartIndex = _chunkO27PLNQZcjs.getSharedLayoutPrefixLength.call(void 0,
3054
+ _chunkO27PLNQZcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
3039
3055
  destinationLayoutPatterns
3040
3056
  );
3041
3057
  const renderer = farmApp.getServerRenderer();
@@ -3045,7 +3061,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3045
3061
  middlewareContext,
3046
3062
  () => renderer.renderNavigationFragment({
3047
3063
  PageComponent: routeModule.default,
3048
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _221 => _221.default]),
3064
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _231 => _231.default]),
3049
3065
  pageProps: routeProps,
3050
3066
  params,
3051
3067
  layouts: layouts.map((layout, index) => ({
@@ -3116,7 +3132,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3116
3132
  {
3117
3133
  status: 200,
3118
3134
  headers: {
3119
- "Cache-Control": _chunkTSFMFPRUcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
3135
+ "Cache-Control": _chunkO27PLNQZcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
3120
3136
  "X-Farm-Navigation": "html-fragment",
3121
3137
  Vary: "X-Farm-Layout-Chain",
3122
3138
  [_chunkE552H232cjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -3124,7 +3140,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3124
3140
  },
3125
3141
  {
3126
3142
  onError(error, id) {
3127
- _chunkVQJYGZNXcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
3143
+ _chunkQMNWKQL4cjs.logger.error(`Deferred route data ${id} failed: ${error}`);
3128
3144
  }
3129
3145
  }
3130
3146
  )
@@ -3153,21 +3169,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3153
3169
  trustProxy: currentServerConfig.trustProxy
3154
3170
  }).pathname;
3155
3171
  const routeManager2 = farmApp.getRouteManager();
3156
- const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _222 => _222.hasHook, 'call', _223 => _223("beforeRouteMatch")]), () => ( false));
3157
- const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _224 => _224.hasHook, 'call', _225 => _225("afterRouteMatch")]), () => ( false));
3158
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _226 => _226.hasHook, 'call', _227 => _227("beforeRequest")]), () => ( false));
3159
- const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _228 => _228.hasHook, 'call', _229 => _229("beforeRender")]), () => ( false));
3160
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _230 => _230.hasHook, 'call', _231 => _231("afterResponse")]), () => ( false));
3161
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _232 => _232.hasHook, 'call', _233 => _233("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _234 => _234.hasHook, 'call', _235 => _235("afterRender")]), () => ( false)));
3162
- const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _236 => _236.hasRuntimeRequestHooks, 'call', _237 => _237()]), () => ( false));
3163
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _238 => _238.hasRuntimeHook, 'call', _239 => _239("after")]), () => ( false));
3172
+ const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _232 => _232.hasHook, 'call', _233 => _233("beforeRouteMatch")]), () => ( false));
3173
+ const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _234 => _234.hasHook, 'call', _235 => _235("afterRouteMatch")]), () => ( false));
3174
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _236 => _236.hasHook, 'call', _237 => _237("beforeRequest")]), () => ( false));
3175
+ const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _238 => _238.hasHook, 'call', _239 => _239("beforeRender")]), () => ( false));
3176
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _240 => _240.hasHook, 'call', _241 => _241("afterResponse")]), () => ( false));
3177
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _242 => _242.hasHook, 'call', _243 => _243("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _244 => _244.hasHook, 'call', _245 => _245("afterRender")]), () => ( false)));
3178
+ const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _246 => _246.hasRuntimeRequestHooks, 'call', _247 => _247()]), () => ( false));
3179
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _248 => _248.hasRuntimeHook, 'call', _249 => _249("after")]), () => ( false));
3164
3180
  const requestedMatch = routeManager2.matchRoute(requestedPathname);
3165
3181
  const pageBuiltInRouteLabel = (pathname2) => {
3166
3182
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
3167
- const mcpLabel = _chunk4SEHMBL4cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
3183
+ const mcpLabel = _chunkDPJ66FSIcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
3168
3184
  if (mcpLabel) return mcpLabel;
3169
3185
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
3170
- return routePathname === _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PATH : null;
3186
+ return routePathname === _chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_PATH : null;
3171
3187
  };
3172
3188
  let runtimeSession;
3173
3189
  if (pm && hasRuntimeRequestHooks) {
@@ -3176,13 +3192,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3176
3192
  createRequestFromNodeRequest(req, new URL(fullUrl)),
3177
3193
  {
3178
3194
  kind: "page",
3179
- route: _chunk4SEHMBL4cjs.setFarmRouteLabel.call(void 0,
3195
+ route: _chunkDPJ66FSIcjs.setFarmRouteLabel.call(void 0,
3180
3196
  {
3181
3197
  pathname: requestedPathname,
3182
- pattern: _optionalChain([requestedMatch, 'optionalAccess', _240 => _240.route, 'optionalAccess', _241 => _241.pattern]) || null,
3183
- params: _optionalChain([requestedMatch, 'optionalAccess', _242 => _242.params]) || {}
3198
+ pattern: _optionalChain([requestedMatch, 'optionalAccess', _250 => _250.route, 'optionalAccess', _251 => _251.pattern]) || null,
3199
+ params: _optionalChain([requestedMatch, 'optionalAccess', _252 => _252.params]) || {}
3184
3200
  },
3185
- _optionalChain([requestedMatch, 'optionalAccess', _243 => _243.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
3201
+ _optionalChain([requestedMatch, 'optionalAccess', _253 => _253.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
3186
3202
  )
3187
3203
  }
3188
3204
  );
@@ -3215,17 +3231,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3215
3231
  if (pm && hasAfterRouteMatchHook) {
3216
3232
  await pm.runHookParallel("afterRouteMatch", {
3217
3233
  pathname,
3218
- matched: !!_optionalChain([routeMatch, 'optionalAccess', _244 => _244.route]),
3219
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _245 => _245.route, 'optionalAccess', _246 => _246.pattern]) || null,
3220
- params: _optionalChain([routeMatch, 'optionalAccess', _247 => _247.params]) || {},
3221
- layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _248 => _248.layouts]) || []).map((l) => l.pattern)
3234
+ matched: !!_optionalChain([routeMatch, 'optionalAccess', _254 => _254.route]),
3235
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _255 => _255.route, 'optionalAccess', _256 => _256.pattern]) || null,
3236
+ params: _optionalChain([routeMatch, 'optionalAccess', _257 => _257.params]) || {},
3237
+ layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _258 => _258.layouts]) || []).map((l) => l.pattern)
3222
3238
  });
3223
3239
  }
3224
3240
  const renderPayload = {
3225
3241
  pathname,
3226
3242
  method,
3227
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _249 => _249.route, 'optionalAccess', _250 => _250.pattern]) || null,
3228
- params: _optionalChain([routeMatch, 'optionalAccess', _251 => _251.params]) || {}
3243
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _259 => _259.route, 'optionalAccess', _260 => _260.pattern]) || null,
3244
+ params: _optionalChain([routeMatch, 'optionalAccess', _261 => _261.params]) || {}
3229
3245
  };
3230
3246
  const shouldInterceptResponse = Boolean(
3231
3247
  pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
@@ -3247,7 +3263,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3247
3263
  emitError: (error) => emitPluginError("response-end", error, { pathname })
3248
3264
  }) : void 0;
3249
3265
  try {
3250
- if (_optionalChain([middlewareManager, 'optionalAccess', _252 => _252.hasMiddleware, 'call', _253 => _253()])) {
3266
+ if (_optionalChain([middlewareManager, 'optionalAccess', _262 => _262.hasMiddleware, 'call', _263 => _263()])) {
3251
3267
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3252
3268
  const handled = await runFarmMiddlewareWithNavigation(
3253
3269
  farmApp.getServerRenderer(),
@@ -3257,7 +3273,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3257
3273
  () => middlewareManager.execute(req, res)
3258
3274
  );
3259
3275
  if (handled) {
3260
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _254 => _254.isEnded, 'call', _255 => _255()])) {
3276
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _264 => _264.isEnded, 'call', _265 => _265()])) {
3261
3277
  const duration = Date.now() - startTime;
3262
3278
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
3263
3279
  }
@@ -3270,14 +3286,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3270
3286
  req.url || "/",
3271
3287
  `http://${req.headers.host || "localhost:3000"}`
3272
3288
  ).pathname;
3273
- const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _256 => _256.matchRoute, 'call', _257 => _257(currentPathname), 'optionalAccess', _258 => _258.route]));
3289
+ const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _266 => _266.matchRoute, 'call', _267 => _267(currentPathname), 'optionalAccess', _268 => _268.route]));
3274
3290
  await pm.runHookParallelFiltered(
3275
3291
  "beforeRequest",
3276
3292
  (plugin) => !hasLocalPageRoute || plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
3277
3293
  req,
3278
3294
  res
3279
3295
  );
3280
- if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _259 => _259.url, 'optionalAccess', _260 => _260.startsWith, 'call', _261 => _261("/")]) && !res.writableEnded) {
3296
+ if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _269 => _269.url, 'optionalAccess', _270 => _270.startsWith, 'call', _271 => _271("/")]) && !res.writableEnded) {
3281
3297
  const destinationUrl = new URL(req.url, fullUrl);
3282
3298
  const destinationMatch = routeManager2.matchRoute(destinationUrl.pathname);
3283
3299
  const guarded = await pm.runRuntimeBeforeForRewrite(
@@ -3287,8 +3303,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3287
3303
  kind: "page",
3288
3304
  route: {
3289
3305
  pathname: destinationUrl.pathname,
3290
- pattern: _optionalChain([destinationMatch, 'optionalAccess', _262 => _262.route, 'optionalAccess', _263 => _263.pattern]) || null,
3291
- params: _optionalChain([destinationMatch, 'optionalAccess', _264 => _264.params]) || {}
3306
+ pattern: _optionalChain([destinationMatch, 'optionalAccess', _272 => _272.route, 'optionalAccess', _273 => _273.pattern]) || null,
3307
+ params: _optionalChain([destinationMatch, 'optionalAccess', _274 => _274.params]) || {}
3292
3308
  }
3293
3309
  }
3294
3310
  );
@@ -3300,8 +3316,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3300
3316
  }
3301
3317
  }
3302
3318
  }
3303
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _265 => _265.isEnded, 'call', _266 => _266()]) || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
3304
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _267 => _267.isEnded, 'call', _268 => _268()])) {
3319
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _275 => _275.isEnded, 'call', _276 => _276()]) || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
3320
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _277 => _277.isEnded, 'call', _278 => _278()])) {
3305
3321
  const duration = Date.now() - startTime;
3306
3322
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
3307
3323
  }
@@ -3339,7 +3355,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3339
3355
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
3340
3356
  return id;
3341
3357
  }
3342
- if (isFarmClientVirtualId(id)) {
3358
+ if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
3343
3359
  return id;
3344
3360
  }
3345
3361
  if (id === "/@farm/server") {
@@ -3365,8 +3381,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3365
3381
  if (imageModule) return imageModule;
3366
3382
  }
3367
3383
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
3368
- const renderer = _optionalChain([farmApp, 'optionalAccess', _269 => _269.getConfig, 'call', _270 => _270(), 'access', _271 => _271.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3369
- const root = _optionalChain([server, 'optionalAccess', _272 => _272.config, 'access', _273 => _273.root]) || options.root;
3384
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _279 => _279.getConfig, 'call', _280 => _280(), 'access', _281 => _281.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3385
+ const root = _optionalChain([server, 'optionalAccess', _282 => _282.config, 'access', _283 => _283.root]) || options.root;
3370
3386
  if (isClientEnvironment(this, loadOptions)) {
3371
3387
  return generateProgrammaticClientRouteModuleForId(
3372
3388
  id,
@@ -3378,66 +3394,69 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3378
3394
  }
3379
3395
  return generateProgrammaticRouteModule(id, root, renderer);
3380
3396
  }
3397
+ if (id === FARM_DEV_CLIENT_BOOT_ID) {
3398
+ return FARM_DEV_CLIENT_BOOT_MODULE;
3399
+ }
3381
3400
  if (isFarmClientVirtualId(id)) {
3382
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _274 => _274.getConfig, 'call', _275 => _275()]);
3383
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _276 => _276.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3384
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _277 => _277.integrations]) || options.integrations;
3385
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _278 => _278.root]) || _optionalChain([server, 'optionalAccess', _279 => _279.config, 'access', _280 => _280.root]) || process.cwd();
3386
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _281 => _281.docs]);
3401
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _284 => _284.getConfig, 'call', _285 => _285()]);
3402
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _286 => _286.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3403
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _287 => _287.integrations]) || options.integrations;
3404
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _288 => _288.root]) || _optionalChain([server, 'optionalAccess', _289 => _289.config, 'access', _290 => _290.root]) || process.cwd();
3405
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _291 => _291.docs]);
3387
3406
  const adapterOwnsDocsRuntime = Boolean(
3388
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _282 => _282.adapter, 'optionalAccess', _283 => _283.server]) && docs.adapter.react
3407
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _292 => _292.adapter, 'optionalAccess', _293 => _293.server]) && docs.adapter.react
3389
3408
  );
3390
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _284 => _284.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
3409
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _294 => _294.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
3391
3410
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
3392
- _optionalChain([docs, 'optionalAccess', _285 => _285.enabled]) ? loadFarmDocsDevRuntime() : null,
3393
- _optionalChain([docs, 'optionalAccess', _286 => _286.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
3411
+ _optionalChain([docs, 'optionalAccess', _295 => _295.enabled]) ? loadFarmDocsDevRuntime() : null,
3412
+ _optionalChain([docs, 'optionalAccess', _296 => _296.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
3394
3413
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
3395
3414
  ]);
3396
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _287 => _287.isFarmDocsSearchEnabled, 'call', _288 => _288(docs)]), () => ( false));
3415
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _297 => _297.isFarmDocsSearchEnabled, 'call', _298 => _298(docs)]), () => ( false));
3397
3416
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
3398
3417
  docsSearchEnabled,
3399
3418
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
3400
3419
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
3401
3420
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
3402
3421
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkBPNOYILCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
3403
- const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkCECUDGXQcjs.getIntegrationProviders.call(void 0, integrations) : [];
3404
- const isolatedHydrationMode = _chunkTQMI6BYOcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3405
- _optionalChain([resolvedConfig, 'optionalAccess', _289 => _289.experimental, 'optionalAccess', _290 => _290.isolatedClientHydration]),
3422
+ const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkZP32GNJQcjs.getIntegrationProviders.call(void 0, integrations) : [];
3423
+ const isolatedHydrationMode = _chunkUYSTTPYJcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3424
+ _optionalChain([resolvedConfig, 'optionalAccess', _299 => _299.experimental, 'optionalAccess', _300 => _300.isolatedClientHydration]),
3406
3425
  {
3407
- serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _291 => _291.experimental, 'optionalAccess', _292 => _292.serverComponents])) === "rsc",
3426
+ serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _301 => _301.experimental, 'optionalAccess', _302 => _302.serverComponents])) === "rsc",
3408
3427
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
3409
3428
  }
3410
3429
  );
3411
3430
  return generateClientCode(
3412
3431
  integrationProviders,
3413
3432
  [
3414
- ..._chunkCECUDGXQcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
3415
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _293 => _293.getFarmDocsDocumentNavigationMatchers, 'call', _294 => _294(docs)]), () => ( []))
3433
+ ..._chunkZP32GNJQcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
3434
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _303 => _303.getFarmDocsDocumentNavigationMatchers, 'call', _304 => _304(docs)]), () => ( []))
3416
3435
  ],
3417
3436
  generatedDocsSearchRuntime,
3418
3437
  `${generatedDevtoolsClientRuntime}
3419
3438
  ${generatedDevIndicatorsClientRuntime}`,
3420
- _optionalChain([resolvedConfig, 'optionalAccess', _295 => _295.plugins]) || [],
3439
+ _optionalChain([resolvedConfig, 'optionalAccess', _305 => _305.plugins]) || [],
3421
3440
  root,
3422
- _optionalChain([resolvedConfig, 'optionalAccess', _296 => _296.srcDir]) || options.srcDir || "src",
3423
- _optionalChain([resolvedConfig, 'optionalAccess', _297 => _297.publicRuntimeConfig]) || options.publicRuntimeConfig,
3424
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _298 => _298.adapter, 'optionalAccess', _299 => _299.react]) : void 0,
3441
+ _optionalChain([resolvedConfig, 'optionalAccess', _306 => _306.srcDir]) || options.srcDir || "src",
3442
+ _optionalChain([resolvedConfig, 'optionalAccess', _307 => _307.publicRuntimeConfig]) || options.publicRuntimeConfig,
3443
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _308 => _308.adapter, 'optionalAccess', _309 => _309.react]) : void 0,
3425
3444
  renderer,
3426
- isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _300 => _300.getRouteManager, 'call', _301 => _301(), 'access', _302 => _302.getIsolatedClientBoundaryModules, 'call', _303 => _303(root)])))), 'optionalAccess', _304 => _304.size]) > 0,
3427
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _305 => _305.trailingSlash]), () => ( false)),
3428
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _306 => _306.basePath]), () => ( "/")),
3429
- _chunkTQMI6BYOcjs.generateClientCachePersistenceCode.call(void 0,
3430
- _chunkTQMI6BYOcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _307 => _307.cache]))
3445
+ isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _310 => _310.getRouteManager, 'call', _311 => _311(), 'access', _312 => _312.getIsolatedClientBoundaryModules, 'call', _313 => _313(root)])))), 'optionalAccess', _314 => _314.size]) > 0,
3446
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _315 => _315.trailingSlash]), () => ( false)),
3447
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _316 => _316.basePath]), () => ( "/")),
3448
+ _chunkUYSTTPYJcjs.generateClientCachePersistenceCode.call(void 0,
3449
+ _chunkUYSTTPYJcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _317 => _317.cache]))
3431
3450
  ),
3432
3451
  _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
3433
- _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _308 => _308.experimental, 'optionalAccess', _309 => _309.serverComponents])) === "islands"
3452
+ _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _318 => _318.experimental, 'optionalAccess', _319 => _319.serverComponents])) === "islands"
3434
3453
  );
3435
3454
  }
3436
3455
  if (id === "/@farm/server") {
3437
3456
  return generateServerCode();
3438
3457
  }
3439
3458
  if (id === "/@farm/manifest") {
3440
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _310 => _310.getRouteManager, 'call', _311 => _311()]);
3459
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _320 => _320.getRouteManager, 'call', _321 => _321()]);
3441
3460
  if (!routeManager) {
3442
3461
  return `
3443
3462
  export const getManifest = () => ({
@@ -3450,9 +3469,9 @@ export const getManifest = () => ({
3450
3469
  `;
3451
3470
  }
3452
3471
  const manifest = routeManager.generateClientManifest(server.config.root);
3453
- const globalStylesheetHref = _chunkTQMI6BYOcjs.resolveDevGlobalStylesheetHref.call(void 0,
3472
+ const globalStylesheetHref = _chunkUYSTTPYJcjs.resolveDevGlobalStylesheetHref.call(void 0,
3454
3473
  server.config.root,
3455
- _optionalChain([farmApp, 'optionalAccess', _312 => _312.getConfig, 'call', _313 => _313(), 'access', _314 => _314.srcDir])
3474
+ _optionalChain([farmApp, 'optionalAccess', _322 => _322.getConfig, 'call', _323 => _323(), 'access', _324 => _324.srcDir])
3456
3475
  );
3457
3476
  const fullManifest = {
3458
3477
  clientEntry: "/@farm/client.js",
@@ -3478,11 +3497,11 @@ export const getManifest = () => ({
3478
3497
  };
3479
3498
  }
3480
3499
  for (const layout of manifest.layouts) {
3481
- const groupScope = _chunkTSFMFPRUcjs.getRouteGroupScope.call(void 0, layout.pattern);
3500
+ const groupScope = _chunkO27PLNQZcjs.getRouteGroupScope.call(void 0, layout.pattern);
3482
3501
  fullManifest.layouts[layout.pattern] = {
3483
3502
  modulePath: layout.modulePath,
3484
3503
  pattern: layout.pattern,
3485
- ...groupScope ? { urlPattern: _chunkTSFMFPRUcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
3504
+ ...groupScope ? { urlPattern: _chunkO27PLNQZcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
3486
3505
  shouldHydrate: layout.shouldHydrate,
3487
3506
  islandStrategy: layout.islandStrategy,
3488
3507
  // Islands mode: rebuilt from its server tree, so its module is never preloaded.
@@ -3508,46 +3527,46 @@ export const manifest = getManifest();
3508
3527
  }
3509
3528
  },
3510
3529
  async transform(code, id, transformOptions) {
3511
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _315 => _315.getConfig, 'call', _316 => _316()]), () => ( options));
3530
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _325 => _325.getConfig, 'call', _326 => _326()]), () => ( options));
3512
3531
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3513
3532
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
3514
- environment: _optionalChain([transformOptions, 'optionalAccess', _317 => _317.ssr]) === true ? "rsc" : "client"
3533
+ environment: _optionalChain([transformOptions, 'optionalAccess', _327 => _327.ssr]) === true ? "rsc" : "client"
3515
3534
  });
3516
3535
  if (serverFns) {
3517
3536
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
3518
3537
  code = serverFns.code;
3519
3538
  }
3520
3539
  }
3521
- if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _318 => _318.experimental, 'optionalAccess', _319 => _319.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3540
+ if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _328 => _328.experimental, 'optionalAccess', _329 => _329.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3522
3541
  const file = id.split("?", 1)[0];
3523
3542
  const actionModule = transformFarmFormActionModule({
3524
3543
  code,
3525
3544
  id,
3526
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _320 => _320.config, 'access', _321 => _321.root]) || process.cwd(),
3527
- ssr: _optionalChain([transformOptions, 'optionalAccess', _322 => _322.ssr]) === true,
3545
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _330 => _330.config, 'access', _331 => _331.root]) || process.cwd(),
3546
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _332 => _332.ssr]) === true,
3528
3547
  // Parsed by file type: page components are TSX.
3529
3548
  parse: (source) => _vite.parseSync.call(void 0, file, source).program
3530
3549
  });
3531
3550
  if (actionModule) return { code: actionModule, map: null };
3532
3551
  }
3533
- if (!_optionalChain([transformOptions, 'optionalAccess', _323 => _323.ssr])) {
3534
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _324 => _324.getConfig, 'call', _325 => _325(), 'optionalAccess', _326 => _326.docs]));
3535
- if (_chunkTQMI6BYOcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
3536
- const redacted = _chunkTQMI6BYOcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
3552
+ if (!_optionalChain([transformOptions, 'optionalAccess', _333 => _333.ssr])) {
3553
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _334 => _334.getConfig, 'call', _335 => _335(), 'optionalAccess', _336 => _336.docs]));
3554
+ if (_chunkUYSTTPYJcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
3555
+ const redacted = _chunkUYSTTPYJcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
3537
3556
  if (redacted !== null) return { code: redacted, map: null };
3538
3557
  }
3539
3558
  }
3540
- if (!_optionalChain([transformOptions, 'optionalAccess', _327 => _327.ssr])) {
3541
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options));
3542
- if ((_optionalChain([currentConfig, 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
3559
+ if (!_optionalChain([transformOptions, 'optionalAccess', _337 => _337.ssr])) {
3560
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _338 => _338.getConfig, 'call', _339 => _339()]), () => ( options));
3561
+ if ((_optionalChain([currentConfig, 'access', _340 => _340.experimental, 'optionalAccess', _341 => _341.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
3543
3562
  const violation = findClientServerFnViolation(code, id);
3544
3563
  if (violation) {
3545
3564
  this.error(formatServerFnBoundaryError(violation, id));
3546
3565
  }
3547
3566
  }
3548
3567
  }
3549
- if (!_optionalChain([transformOptions, 'optionalAccess', _332 => _332.ssr]) && shouldInspectClientBoundary(id, code)) {
3550
- warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _333 => _333.getConfig, 'call', _334 => _334()]), () => ( options)));
3568
+ if (!_optionalChain([transformOptions, 'optionalAccess', _342 => _342.ssr]) && shouldInspectClientBoundary(id, code)) {
3569
+ warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _343 => _343.getConfig, 'call', _344 => _344()]), () => ( options)));
3551
3570
  }
3552
3571
  if (typeof imageImports.transform === "function") {
3553
3572
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -3562,13 +3581,13 @@ export const manifest = getManifest();
3562
3581
  id,
3563
3582
  transformOptions
3564
3583
  );
3565
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _335 => _335.code, 'optionalAccess', _336 => _336.toString, 'call', _337 => _337()]);
3584
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _345 => _345.code, 'optionalAccess', _346 => _346.toString, 'call', _347 => _347()]);
3566
3585
  if (fontCode) {
3567
3586
  transformedCode = fontCode;
3568
3587
  transformed = true;
3569
3588
  }
3570
3589
  }
3571
- if (_optionalChain([transformOptions, 'optionalAccess', _338 => _338.ssr]) && server) {
3590
+ if (_optionalChain([transformOptions, 'optionalAccess', _348 => _348.ssr]) && server) {
3572
3591
  const rewrittenImports = rewriteEarlySsrRelativeImports({
3573
3592
  code: transformedCode,
3574
3593
  id,
@@ -3580,28 +3599,38 @@ export const manifest = getManifest();
3580
3599
  transformed = true;
3581
3600
  }
3582
3601
  }
3583
- if (_chunkTQMI6BYOcjs.hasUseClientDirective.call(void 0, transformedCode)) {
3602
+ if (_chunkUYSTTPYJcjs.hasUseClientDirective.call(void 0, transformedCode)) {
3584
3603
  const clientBoundarySource = transformedCode;
3585
3604
  const moduleInfo = this.getModuleInfo(id);
3586
3605
  if (moduleInfo) {
3587
3606
  moduleInfo.isClientComponent = true;
3588
3607
  }
3589
- transformedCode = _chunkTQMI6BYOcjs.stripUseClientDirective.call(void 0, transformedCode);
3608
+ transformedCode = _chunkUYSTTPYJcjs.stripUseClientDirective.call(void 0, transformedCode);
3590
3609
  transformed = true;
3591
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _339 => _339.getConfig, 'call', _340 => _340()]), () => ( options));
3610
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _349 => _349.getConfig, 'call', _350 => _350()]), () => ( options));
3592
3611
  let isolatedModuleReference = null;
3593
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _341 => _341.config, 'access', _342 => _342.root]) || process.cwd();
3612
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _351 => _351.config, 'access', _352 => _352.root]) || process.cwd();
3594
3613
  const cleanId = id.split("?", 1)[0];
3595
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _343 => _343.getRouteManager, 'call', _344 => _344(), 'access', _345 => _345.getIsolatedClientBoundaryModules, 'call', _346 => _346(root)])));
3596
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _347 => _347.has, 'call', _348 => _348(path5.resolve(cleanId))]) === true;
3597
- if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkTQMI6BYOcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
3598
- isolatedModuleReference = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, cleanId, root);
3614
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _353 => _353.getRouteManager, 'call', _354 => _354(), 'access', _355 => _355.getIsolatedClientBoundaryModules, 'call', _356 => _356(root)])));
3615
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _357 => _357.has, 'call', _358 => _358(path5.resolve(cleanId))]) === true;
3616
+ if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkUYSTTPYJcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
3617
+ isolatedModuleReference = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, cleanId, root);
3618
+ const islandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _359 => _359.experimental, 'optionalAccess', _360 => _360.serverComponents])) === "islands";
3619
+ const explicitStrategy = _chunkUYSTTPYJcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
3620
+ const inference = islandsMode && explicitStrategy === null ? _chunkUYSTTPYJcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
3621
+ if (inference) {
3622
+ for (const file of inference.files) {
3623
+ if (file !== path5.resolve(cleanId)) this.addWatchFile(file);
3624
+ recordFarmIslandInferenceDependency(file, cleanId);
3625
+ }
3626
+ }
3599
3627
  const transformedBoundary = transformIsolatedClientBoundaryModule({
3600
3628
  code: transformedCode,
3601
3629
  moduleReference: isolatedModuleReference,
3602
- islandStrategy: _nullishCoalesce(_chunkTQMI6BYOcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
3630
+ islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
3603
3631
  parse: (source) => this.parse(source),
3604
- slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _349 => _349.experimental, 'optionalAccess', _350 => _350.serverComponents])) === "islands"
3632
+ slots: islandsMode,
3633
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _361 => _361.strategy]) === "interaction"
3605
3634
  });
3606
3635
  if (!transformedBoundary) {
3607
3636
  this.error(
@@ -3631,7 +3660,7 @@ export const manifest = getManifest();
3631
3660
  );
3632
3661
  return;
3633
3662
  }` : "";
3634
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _351 => _351.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
3663
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _362 => _362.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
3635
3664
  if (import.meta.hot) {
3636
3665
  import.meta.hot.accept((newModule) => {
3637
3666
  ${isolatedHmrUpdate}
@@ -3681,19 +3710,19 @@ if (import.meta.hot) {
3681
3710
  if (!routeManager) return;
3682
3711
  const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
3683
3712
  if (ssgPages.length === 0) {
3684
- _chunkVQJYGZNXcjs.logger.info("No SSG pages found - all pages will use SSR");
3713
+ _chunkQMNWKQL4cjs.logger.info("No SSG pages found - all pages will use SSR");
3685
3714
  return;
3686
3715
  }
3687
- _chunkVQJYGZNXcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
3688
- _chunkVQJYGZNXcjs.logger.info("Pre-rendering SSG pages...");
3689
- const outDir = path5.join(_optionalChain([server, 'optionalAccess', _352 => _352.config, 'access', _353 => _353.root]) || process.cwd(), options.outDir || "dist");
3716
+ _chunkQMNWKQL4cjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
3717
+ _chunkQMNWKQL4cjs.logger.info("Pre-rendering SSG pages...");
3718
+ const outDir = path5.join(_optionalChain([server, 'optionalAccess', _363 => _363.config, 'access', _364 => _364.root]) || process.cwd(), options.outDir || "dist");
3690
3719
  const clientDir = path5.join(outDir, "client");
3691
3720
  for (const page of ssgPages) {
3692
3721
  try {
3693
3722
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
3694
3723
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
3695
3724
  const mod = await routeManager.loadRouteModule(page.filePath);
3696
- if (!_optionalChain([mod, 'optionalAccess', _354 => _354.default])) return;
3725
+ if (!_optionalChain([mod, 'optionalAccess', _365 => _365.default])) return;
3697
3726
  const { layouts } = routeManager.matchRoute(page.urlPath);
3698
3727
  const layoutModules = await Promise.all(
3699
3728
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -3725,7 +3754,7 @@ if (import.meta.hot) {
3725
3754
  const i18nSnapshot = _chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, );
3726
3755
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
3727
3756
  const fullHtml = `<!DOCTYPE html>
3728
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _355 => _355.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
3757
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _366 => _366.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
3729
3758
  <head>
3730
3759
  <meta charset="utf-8">
3731
3760
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -3743,10 +3772,10 @@ if (import.meta.hot) {
3743
3772
  fs2.mkdirSync(path5.dirname(outputPath), { recursive: true });
3744
3773
  fs2.writeFileSync(outputPath, fullHtml);
3745
3774
  const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
3746
- _chunkVQJYGZNXcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
3775
+ _chunkQMNWKQL4cjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
3747
3776
  });
3748
3777
  } catch (error) {
3749
- _chunkVQJYGZNXcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
3778
+ _chunkQMNWKQL4cjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
3750
3779
  }
3751
3780
  }
3752
3781
  const manifestPath = path5.join(outDir, "__ssg_manifest.json");
@@ -3762,9 +3791,9 @@ if (import.meta.hot) {
3762
3791
  2
3763
3792
  )
3764
3793
  );
3765
- _chunkVQJYGZNXcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
3794
+ _chunkQMNWKQL4cjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
3766
3795
  } catch (error) {
3767
- _chunkVQJYGZNXcjs.logger.error(`SSG build failed: ${error}`);
3796
+ _chunkQMNWKQL4cjs.logger.error(`SSG build failed: ${error}`);
3768
3797
  }
3769
3798
  },
3770
3799
  async handleHotUpdate(ctx) {
@@ -3783,13 +3812,19 @@ if (import.meta.hot) {
3783
3812
  });
3784
3813
  }
3785
3814
  }
3786
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _356 => _356.getConfig, 'call', _357 => _357()]);
3815
+ for (const island of _nullishCoalesce(farmIslandInferenceDependents.get(path5.resolve(file)), () => ( []))) {
3816
+ if (island === path5.resolve(file)) continue;
3817
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkQMNWKQL4cjs.toPosixPath.call(void 0, island)), () => ( []))) {
3818
+ server2.moduleGraph.invalidateModule(mod);
3819
+ }
3820
+ }
3821
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368()]);
3787
3822
  const normalizedFile = file.replace(/\\/g, "/");
3788
3823
  if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
3789
- (appDir) => normalizedFile.startsWith(`${_chunkVQJYGZNXcjs.toPosixPath.call(void 0, appDir)}/api/`)
3824
+ (appDir) => normalizedFile.startsWith(`${_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appDir)}/api/`)
3790
3825
  )) {
3791
3826
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
3792
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _358 => _358(`updated ${file}`)]);
3827
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _369 => _369(`updated ${file}`)]);
3793
3828
  server2.ws.send({ type: "full-reload", path: "*" });
3794
3829
  return [];
3795
3830
  }
@@ -3799,7 +3834,7 @@ if (import.meta.hot) {
3799
3834
  for (const mod of modules) {
3800
3835
  server2.moduleGraph.invalidateModule(mod);
3801
3836
  }
3802
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _359 => _359(`updated ${file}`)]);
3837
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _370 => _370(`updated ${file}`)]);
3803
3838
  server2.ws.send({
3804
3839
  type: "full-reload",
3805
3840
  path: "*"
@@ -3812,7 +3847,7 @@ if (import.meta.hot) {
3812
3847
  for (const mod of modules) {
3813
3848
  server2.moduleGraph.invalidateModule(mod);
3814
3849
  }
3815
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _360 => _360(`updated ${file}`)]);
3850
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _371 => _371(`updated ${file}`)]);
3816
3851
  server2.ws.send({
3817
3852
  type: "full-reload",
3818
3853
  path: "*"
@@ -3820,12 +3855,12 @@ if (import.meta.hot) {
3820
3855
  return [];
3821
3856
  }
3822
3857
  if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
3823
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _361 => _361(`updated ${file}`)]);
3858
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _372 => _372(`updated ${file}`)]);
3824
3859
  }
3825
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _362 => _362.experimental, 'optionalAccess', _363 => _363.isolatedClientHydration]);
3826
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _364 => _364.getRouteManager, 'call', _365 => _365()]);
3860
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _373 => _373.experimental, 'optionalAccess', _374 => _374.isolatedClientHydration]);
3861
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _375 => _375.getRouteManager, 'call', _376 => _376()]);
3827
3862
  const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
3828
- const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _366 => _366.renderer])) && planRouteManager !== void 0;
3863
+ const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _377 => _377.renderer])) && planRouteManager !== void 0;
3829
3864
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
3830
3865
  const routeManager = planRouteManager;
3831
3866
  if (routeManager) {
@@ -3849,7 +3884,7 @@ if (import.meta.hot) {
3849
3884
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
3850
3885
  for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
3851
3886
  if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
3852
- for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkVQJYGZNXcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
3887
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkQMNWKQL4cjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
3853
3888
  server2.moduleGraph.invalidateModule(mod);
3854
3889
  }
3855
3890
  }
@@ -3861,7 +3896,7 @@ if (import.meta.hot) {
3861
3896
  return [];
3862
3897
  }
3863
3898
  } catch (error) {
3864
- _chunkVQJYGZNXcjs.logger.warn(
3899
+ _chunkQMNWKQL4cjs.logger.warn(
3865
3900
  `[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
3866
3901
  );
3867
3902
  return modules;
@@ -3872,7 +3907,7 @@ if (import.meta.hot) {
3872
3907
  if (normalizedFile.includes("middleware.")) {
3873
3908
  if (middlewareManager) {
3874
3909
  await middlewareManager.reload();
3875
- _chunkVQJYGZNXcjs.logger.success("\u2705 Middleware reloaded!");
3910
+ _chunkQMNWKQL4cjs.logger.success("\u2705 Middleware reloaded!");
3876
3911
  if (initialPluginManager) {
3877
3912
  for (const middleware of middlewareManager.getMiddlewares()) {
3878
3913
  await initialPluginManager.runHookParallel("middlewareDiscovered", {
@@ -3885,7 +3920,7 @@ if (import.meta.hot) {
3885
3920
  }
3886
3921
  return [];
3887
3922
  }
3888
- _optionalChain([farmApp, 'optionalAccess', _367 => _367.getRouteManager, 'call', _368 => _368(), 'access', _369 => _369.invalidateClientManifest, 'call', _370 => _370()]);
3923
+ _optionalChain([farmApp, 'optionalAccess', _378 => _378.getRouteManager, 'call', _379 => _379(), 'access', _380 => _380.invalidateClientManifest, 'call', _381 => _381()]);
3889
3924
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
3890
3925
  if (manifestModule) {
3891
3926
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -3935,18 +3970,27 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
3935
3970
  }
3936
3971
  return farmRoot;
3937
3972
  }
3973
+ var farmIslandInferenceDependents = /* @__PURE__ */ new Map();
3974
+ function recordFarmIslandInferenceDependency(file, island) {
3975
+ const key = path5.resolve(file);
3976
+ let islands = farmIslandInferenceDependents.get(key);
3977
+ if (!islands) farmIslandInferenceDependents.set(key, islands = /* @__PURE__ */ new Set());
3978
+ islands.add(path5.resolve(island));
3979
+ }
3980
+ var FARM_DEV_CLIENT_BOOT_ID = "/@farm/client-boot.js";
3981
+ var FARM_DEV_CLIENT_BOOT_MODULE = 'import { startFarmIslandsBoot } from "@farm.js/core/internal/islands-boot";\nstartFarmIslandsBoot();\n';
3938
3982
  function isFarmClientVirtualId(id) {
3939
3983
  const pathname = id.split("?", 1)[0];
3940
3984
  return pathname === "/@farm/client" || pathname === "/@farm/client.js";
3941
3985
  }
3942
3986
  function isClientEnvironment(context, loadOptions) {
3943
3987
  const environment = context.environment;
3944
- if (_optionalChain([environment, 'optionalAccess', _371 => _371.config, 'optionalAccess', _372 => _372.consumer])) return environment.config.consumer === "client";
3945
- if (_optionalChain([environment, 'optionalAccess', _373 => _373.name])) return environment.name === "client";
3946
- return _optionalChain([loadOptions, 'optionalAccess', _374 => _374.ssr]) !== true;
3988
+ if (_optionalChain([environment, 'optionalAccess', _382 => _382.config, 'optionalAccess', _383 => _383.consumer])) return environment.config.consumer === "client";
3989
+ if (_optionalChain([environment, 'optionalAccess', _384 => _384.name])) return environment.name === "client";
3990
+ return _optionalChain([loadOptions, 'optionalAccess', _385 => _385.ssr]) !== true;
3947
3991
  }
3948
3992
  function invalidateProgrammaticClientRouteModules(server) {
3949
- const graph = _optionalChain([server, 'access', _375 => _375.environments, 'optionalAccess', _376 => _376.client, 'optionalAccess', _377 => _377.moduleGraph]);
3993
+ const graph = _optionalChain([server, 'access', _386 => _386.environments, 'optionalAccess', _387 => _387.client, 'optionalAccess', _388 => _388.moduleGraph]);
3950
3994
  if (!graph) return;
3951
3995
  for (const [id, module] of graph.idToModuleMap) {
3952
3996
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -3960,7 +4004,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
3960
4004
  kind: parsed.kind,
3961
4005
  routePath: parsed.routePath,
3962
4006
  routesFile,
3963
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _378 => _378.routes, 'access', _379 => _379.get, 'call', _380 => _380(
4007
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _389 => _389.routes, 'access', _390 => _390.get, 'call', _391 => _391(
3964
4008
  _chunkNK2VWS7Pcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
3965
4009
  )]),
3966
4010
  rendererServer: renderer.server,
@@ -3968,11 +4012,11 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
3968
4012
  });
3969
4013
  }
3970
4014
  function resolveRealModuleFile(filePath, root) {
3971
- const resolved = _nullishCoalesce(_chunkTQMI6BYOcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
4015
+ const resolved = _nullishCoalesce(_chunkUYSTTPYJcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
3972
4016
  try {
3973
- return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
4017
+ return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
3974
4018
  } catch (e15) {
3975
- return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, resolved);
4019
+ return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, resolved);
3976
4020
  }
3977
4021
  }
3978
4022
  function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkRD623KW4cjs.REACT_RENDERER) {
@@ -4268,7 +4312,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
4268
4312
  `.trim();
4269
4313
  }
4270
4314
  function toProgrammaticRouteImportSpecifier(filePath, root) {
4271
- return root ? _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
4315
+ return root ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, filePath, root) : filePath;
4272
4316
  }
4273
4317
  async function parseRouteModuleProps(routeModule, input) {
4274
4318
  if (typeof routeModule.__farmResolveRouteProps === "function") {
@@ -4282,12 +4326,12 @@ async function parseRouteModuleProps(routeModule, input) {
4282
4326
  }
4283
4327
  const schemas = routeModule.__farmRouteSchemas;
4284
4328
  const params = parseRouteModuleSchema(
4285
- _optionalChain([schemas, 'optionalAccess', _381 => _381.params]),
4329
+ _optionalChain([schemas, 'optionalAccess', _392 => _392.params]),
4286
4330
  input.props.params,
4287
4331
  "params",
4288
4332
  input.routePath
4289
4333
  );
4290
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _382 => _382.search]), input.search, "search", input.routePath);
4334
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _393 => _393.search]), input.search, "search", input.routePath);
4291
4335
  return {
4292
4336
  ...input.props,
4293
4337
  params,
@@ -4307,12 +4351,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
4307
4351
  }
4308
4352
  }
4309
4353
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkRD623KW4cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
4310
- const providerClientCode = _chunkTQMI6BYOcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4354
+ const providerClientCode = _chunkUYSTTPYJcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4311
4355
  integrationProviders,
4312
4356
  root,
4313
4357
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
4314
4358
  );
4315
- const clientPluginEntry = _chunkTQMI6BYOcjs.generateFarmClientPluginEntryCode.call(void 0,
4359
+ const clientPluginEntry = _chunkUYSTTPYJcjs.generateFarmClientPluginEntryCode.call(void 0,
4316
4360
  plugins,
4317
4361
  root,
4318
4362
  srcDir,
@@ -4321,7 +4365,7 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
4321
4365
  const appSetupPath = _chunkRD623KW4cjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
4322
4366
  const rendererClientImports = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
4323
4367
  import { hydrateRoot, createRoot } from 'react-dom/client'` : appSetupPath ? `import React, { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
4324
- import __farmAppSetup from ${JSON.stringify(_chunkVQJYGZNXcjs.toViteModuleId.call(void 0, appSetupPath, root))}
4368
+ import __farmAppSetup from ${JSON.stringify(_chunkQMNWKQL4cjs.toViteModuleId.call(void 0, appSetupPath, root))}
4325
4369
  __farmConfigureApp(__farmAppSetup)` : `import React, { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}`;
4326
4370
  const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
4327
4371
  const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
@@ -4360,7 +4404,7 @@ async function createFarmServerTreePageElement(source, pathname) {
4360
4404
  return null;
4361
4405
  }
4362
4406
  }
4363
- ${islandValues ? `${_chunkTQMI6BYOcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4407
+ ${islandValues ? `${_chunkUYSTTPYJcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4364
4408
  let farmLastRouteState = null;
4365
4409
 
4366
4410
  // A hot update to a layout tree's client module renders the route again.
@@ -4387,6 +4431,7 @@ import {
4387
4431
  createFarmDeploymentRequestHeaders,
4388
4432
  isFarmDeploymentMismatchResponse,
4389
4433
  } from '@farm.js/core/deployment'
4434
+ ${islandValues ? "import { getFarmIslandValueHeaders } from '@farm.js/core/internal/client-runtime'" : ""}
4390
4435
  ${providerClientCode.imports}
4391
4436
  ${clientPluginEntry.imports}
4392
4437
 
@@ -4853,6 +4898,7 @@ class LegacyManifestSPARouter {
4853
4898
  // Initialize the SPA router
4854
4899
  const spaRouter = new SPARouter({
4855
4900
  shouldUseDocumentNavigation: matchesDocumentNavigation,
4901
+ ${islandValues ? "fetchNavigationDocument: fetchFarmNavigationDocument," : ""}
4856
4902
  });
4857
4903
  window.__FARM_SPA_ROUTER__ = spaRouter;
4858
4904
 
@@ -5169,7 +5215,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
5169
5215
  return loadedLayouts;
5170
5216
  }
5171
5217
 
5172
- ${_chunkTQMI6BYOcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5218
+ ${_chunkUYSTTPYJcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5173
5219
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
5174
5220
  let wrapped = element;
5175
5221
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -5471,7 +5517,14 @@ function parseNavigationFragment(html) {
5471
5517
  return template.content;
5472
5518
  }
5473
5519
 
5474
- function replaceNavigationBoundary(container, fragment, currentPatterns, nextPatterns, refresh = false) {
5520
+ function replaceNavigationBoundary(
5521
+ container,
5522
+ fragment,
5523
+ currentPatterns,
5524
+ nextPatterns,
5525
+ refresh = false,
5526
+ find = findLayoutBoundary,
5527
+ ) {
5475
5528
  let sharedCount = 0;
5476
5529
  while (
5477
5530
  sharedCount < currentPatterns.length &&
@@ -5482,13 +5535,13 @@ function replaceNavigationBoundary(container, fragment, currentPatterns, nextPat
5482
5535
  }
5483
5536
 
5484
5537
  const fragmentTreeRoot = nextPatterns.length > 0
5485
- ? findLayoutBoundary(fragment, nextPatterns[0])
5538
+ ? find(fragment, nextPatterns[0])
5486
5539
  : fragment.querySelector('#__farm_page__');
5487
5540
  const currentTarget = sharedCount < currentPatterns.length
5488
- ? findLayoutBoundary(container, currentPatterns[sharedCount])
5541
+ ? find(container, currentPatterns[sharedCount])
5489
5542
  : container.querySelector('#__farm_page__');
5490
5543
  const nextTarget = sharedCount < nextPatterns.length
5491
- ? findLayoutBoundary(fragment, nextPatterns[sharedCount])
5544
+ ? find(fragment, nextPatterns[sharedCount])
5492
5545
  : fragment.querySelector('#__farm_page__');
5493
5546
 
5494
5547
  if (!currentTarget || !nextTarget) {
@@ -5519,6 +5572,184 @@ function replaceNavigationBoundary(container, fragment, currentPatterns, nextPat
5519
5572
  return nextTarget;
5520
5573
  }
5521
5574
 
5575
+ ${islandValues ? `${_chunkUYSTTPYJcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
5576
+
5577
+ // Islands mode navigates as the production client does: it fetches the page itself, names the
5578
+ // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
5579
+ // before slow Suspense content. Other pages (a client page, a layout that hydrates, route slots)
5580
+ // keep the page-data request.
5581
+ function farmLayoutIdentity(boundary) {
5582
+ return boundary.getAttribute('data-farm-layout-key') || boundary.getAttribute('data-farm-layout-pattern');
5583
+ }
5584
+
5585
+ function findLayoutBoundaryByIdentity(root, identity) {
5586
+ const boundaries = root.querySelectorAll
5587
+ ? root.querySelectorAll('[data-farm-layout-boundary="true"]')
5588
+ : [];
5589
+ for (const boundary of boundaries) {
5590
+ if (farmLayoutIdentity(boundary) === identity) return boundary;
5591
+ }
5592
+ return null;
5593
+ }
5594
+
5595
+ function readLayoutIdentities(root) {
5596
+ return Array.from(root.querySelectorAll ? root.querySelectorAll('[data-farm-layout-boundary="true"]') : [])
5597
+ .map(farmLayoutIdentity)
5598
+ .filter(Boolean);
5599
+ }
5600
+
5601
+ // A segment response leaves out the layouts the browser said it shows. It fits this page only if
5602
+ // the page still shows each of them, at the same depth.
5603
+ function fitsFarmSegment(currentRoot, nextRoot) {
5604
+ const nextBoundaries = Array.from(nextRoot.querySelectorAll('[data-farm-layout-boundary="true"]'));
5605
+ const lastKept = nextBoundaries
5606
+ .map((boundary) => boundary.getAttribute('data-farm-layout-kept') === 'true')
5607
+ .lastIndexOf(true);
5608
+ if (lastKept === -1) return true;
5609
+ const current = readLayoutIdentities(currentRoot);
5610
+ for (let index = 0; index <= lastKept; index++) {
5611
+ if (current[index] !== farmLayoutIdentity(nextBoundaries[index])) return false;
5612
+ }
5613
+ return true;
5614
+ }
5615
+
5616
+ // Each navigation starts a new generation, so a page left while it streams stops adding content.
5617
+ let farmNavigationStreamGeneration = 0;
5618
+
5619
+ function farmDocumentNavigationRoute(pathname) {
5620
+ const match = findRoute(pathname);
5621
+ if (!match) return null;
5622
+ const route = match.route;
5623
+ if (route.isClientComponent || route.shouldHydrate) return null;
5624
+ if (route.renderPlan && route.renderPlan.hydration !== 'none') return null;
5625
+ const layouts = findLayouts(pathname);
5626
+ if (layouts.some((layout) => layout.shouldHydrate)) return null;
5627
+ const owners = new Set([route.pattern, ...layouts.map((layout) => layout.pattern)]);
5628
+ if ((getManifest().slots || []).some((slot) => owners.has(slot.ownerPattern))) return null;
5629
+ return { ...match, layouts };
5630
+ }
5631
+
5632
+ async function fetchFarmNavigationDocument(path, context) {
5633
+ farmNavigationStreamGeneration++;
5634
+ const url = new URL(path, window.location.href);
5635
+ const match = farmDocumentNavigationRoute(url.pathname);
5636
+ const container = document.getElementById('root');
5637
+ if (!match || !container) return null;
5638
+ const deploymentId = window.__FARM_DEPLOYMENT_ID__;
5639
+ const request = async (keepLayouts) => {
5640
+ // A refresh renders every layout; so does a page whose layout React owns, which the swap
5641
+ // replaces whole.
5642
+ const identities =
5643
+ keepLayouts && !context.refresh && !activeLayoutShouldHydrate
5644
+ ? readLayoutIdentities(container)
5645
+ : [];
5646
+ const response = await fetch(url.pathname + url.search, {
5647
+ signal: context.signal,
5648
+ redirect: 'manual',
5649
+ headers: createFarmDeploymentRequestHeaders(deploymentId, {
5650
+ Accept: 'text/html',
5651
+ 'F-Stream': 'flush',
5652
+ ...getFarmIslandValueHeaders(),
5653
+ ...(identities.length ? { 'F-Layouts': JSON.stringify(identities) } : {}),
5654
+ }),
5655
+ });
5656
+ if (isFarmDeploymentMismatchResponse(response, deploymentId)) {
5657
+ const error = createFarmDeploymentMismatchError(response, deploymentId || 'unknown');
5658
+ window.dispatchEvent(new CustomEvent('farm:deployment-mismatch', { detail: error }));
5659
+ throw error;
5660
+ }
5661
+ // A redirect, an error or anything but HTML: the router loads the document instead.
5662
+ if (
5663
+ !response.ok ||
5664
+ !response.body ||
5665
+ !(response.headers.get('content-type') || '').includes('text/html')
5666
+ ) {
5667
+ throw new Error('Failed to fetch the page: ' + response.status);
5668
+ }
5669
+ const stream = await readFarmNavigationStream(response.body, response.headers.get('F-Flush'));
5670
+ const doc = new DOMParser().parseFromString(stream.shell, 'text/html');
5671
+ return { stream, doc, nextRoot: doc.getElementById('root') };
5672
+ };
5673
+ let result = await request(true);
5674
+ if (result.nextRoot && !fitsFarmSegment(container, result.nextRoot)) {
5675
+ result.stream.cancel?.();
5676
+ result = await request(false);
5677
+ }
5678
+ if (!result.nextRoot) {
5679
+ result.stream.cancel?.();
5680
+ throw new Error('The page has no #root');
5681
+ }
5682
+ const { stream, doc, nextRoot } = result;
5683
+ const description = doc.querySelector('meta[name="description"]')?.getAttribute('content');
5684
+ return {
5685
+ props: { params: match.params },
5686
+ modulePath: match.route.modulePath,
5687
+ isClientComponent: false,
5688
+ pageShouldHydrate: false,
5689
+ layoutShouldHydrate: false,
5690
+ shouldHydrate: false,
5691
+ islandStrategy: 'load',
5692
+ renderPlan: match.route.renderPlan,
5693
+ fragment: {
5694
+ html: nextRoot.innerHTML,
5695
+ layoutPatterns: Array.from(nextRoot.querySelectorAll('[data-farm-layout-boundary="true"]'))
5696
+ .map((boundary) => boundary.getAttribute('data-farm-layout-pattern'))
5697
+ .filter(Boolean),
5698
+ },
5699
+ metadata: { title: doc.title, ...(description ? { description } : {}) },
5700
+ layoutModules: match.layouts.map((layout) => layout.modulePath),
5701
+ farmDocument: { stream: stream.next ? stream : null },
5702
+ };
5703
+ }
5704
+
5705
+ // Adds the flushes after a streamed navigation's shell, as the production client does: React's
5706
+ // staged Suspense content and the scripts that reveal it.${isolatedHydrationEnabled ? " The islands React reveals hydrate as they\n// appear, and the ones it removes (a replaced fallback) are released." : ""}
5707
+ async function streamFarmDevNavigation(stream, root, generation) {
5708
+ const isCurrent = () => generation === farmNavigationStreamGeneration && root.isConnected;
5709
+ ${isolatedHydrationEnabled ? `let streaming = true;
5710
+ const removed = new Set();
5711
+ let queued = false;
5712
+ const run = () => {
5713
+ queued = false;
5714
+ if (!isCurrent()) return observer.disconnect();
5715
+ for (const node of removed) if (!node.isConnected) disposeFarmIsolatedClientBoundaries(node);
5716
+ removed.clear();
5717
+ if (!streaming && !root.querySelector('div[hidden][id^="S:"]')) observer.disconnect();
5718
+ hydrateFarmIsolatedClientBoundaries(root).catch((error) => {
5719
+ console.error('[Farm.js] Hydrating streamed islands failed:', error);
5720
+ });
5721
+ };
5722
+ const observer = new MutationObserver((records) => {
5723
+ for (const record of records) for (const node of record.removedNodes) removed.add(node);
5724
+ if (queued) return;
5725
+ queued = true;
5726
+ queueMicrotask(run);
5727
+ });
5728
+ observer.observe(root, { childList: true, subtree: true });` : "const observer = { disconnect() {} };"}
5729
+ try {
5730
+ for (let flush = await stream.next(); flush !== null; flush = await stream.next()) {
5731
+ if (!isCurrent()) {
5732
+ observer.disconnect();
5733
+ return stream.cancel();
5734
+ }
5735
+ const parsed = new DOMParser().parseFromString('<div id="root">' + flush, 'text/html');
5736
+ const fragment = document.createDocumentFragment();
5737
+ for (const node of Array.from(parsed.getElementById('root').childNodes)) fragment.appendChild(node);
5738
+ activateFragmentScripts(fragment);
5739
+ root.appendChild(fragment);
5740
+ }
5741
+ } catch (error) {
5742
+ ${isolatedHydrationEnabled ? "streaming = false;" : ""}
5743
+ if (!isCurrent()) return observer.disconnect();
5744
+ console.error('[Farm.js] A streamed navigation failed:', error);
5745
+ ${isolatedHydrationEnabled ? "farmIsolatedHydrationRuntime.endStream?.(root);\n if (!queued) run();" : ""}
5746
+ return;
5747
+ }
5748
+ if (!isCurrent()) return observer.disconnect();
5749
+ ${isolatedHydrationEnabled ? "streaming = false;\n farmIsolatedHydrationRuntime.endStream?.(root);\n if (!queued) run();" : "observer.disconnect();"}
5750
+ }
5751
+ ` : ""}
5752
+
5522
5753
  let activeLayoutPatterns = readActiveLayoutPatterns();
5523
5754
  let activeLayoutShouldHydrate = window.__FARM_LAYOUT_SHOULD_HYDRATE__ === true;
5524
5755
 
@@ -5528,6 +5759,7 @@ async function renderPage(pageData, info) {
5528
5759
  const container = document.getElementById('root');
5529
5760
  if (!container) return;
5530
5761
  cancelPendingPageHydration();
5762
+ ${islandValues ? "const farmStreamGeneration = ++farmNavigationStreamGeneration;" : ""}
5531
5763
  const destination = window.location.pathname + window.location.search;
5532
5764
 
5533
5765
  if (pageData.interception) {
@@ -5657,7 +5889,7 @@ async function renderPage(pageData, info) {
5657
5889
  if (appRoot) { try { appRoot.unmount(); } catch (error) {} appRoot = null; }
5658
5890
  if (reactRoot) { try { reactRoot.unmount(); } catch (error) {} reactRoot = null; }
5659
5891
  delete window.__FARM_REACT_ROOT__;
5660
- ${isolatedHydrationEnabled ? "isolatedHydrationScope = replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true) || container;" : "replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);"}
5892
+ ${isolatedHydrationEnabled ? islandValues ? "isolatedHydrationScope = (pageData.farmDocument ? replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), info?.refresh === true, findLayoutBoundaryByIdentity) : replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true)) || container;" : "isolatedHydrationScope = replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true) || container;" : islandValues ? "if (pageData.farmDocument) replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), false, findLayoutBoundaryByIdentity); else replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);" : "replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);"}
5661
5893
  }
5662
5894
 
5663
5895
  const hydrationController = new AbortController();
@@ -5712,6 +5944,7 @@ async function renderPage(pageData, info) {
5712
5944
  activeLayoutPatterns = layoutPatterns;
5713
5945
  activeLayoutShouldHydrate = layoutShouldHydrate;
5714
5946
  window.__FARM_LOADING_MODULE__ = route.loadingModulePath || null;
5947
+ ${islandValues ? "if (pageData.farmDocument?.stream) void streamFarmDevNavigation(pageData.farmDocument.stream, container, farmStreamGeneration);" : ""}
5715
5948
  return true;
5716
5949
  };
5717
5950
 
@@ -5798,12 +6031,10 @@ function farmIslandsOnlyDocument() {
5798
6031
  (window.__FARM_SHOULD_HYDRATE__ === true || pageShouldHydrate || layoutShouldHydrate);
5799
6032
  const hydratedSlots = await hydrateInitialRouteSlots();
5800
6033
  ${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries && !pageShouldHydrate && !layoutShouldHydrate) {
5801
- const hydrationController = new AbortController();
5802
- pendingPageHydrationController = hydrationController;
5803
6034
  // Islands mode hydrates the document, as production does, so islx also watches the islands
5804
- // that stream in after this runs.
5805
- await hydrateFarmIsolatedClientBoundaries(${islandValues ? "document" : "rootContainer"}, hydrationController.signal);
5806
- if (hydrationController.signal.aborted) return;
6035
+ // that stream in after this runs. Not cancelled by a navigation: an island it removes is
6036
+ // disposed with its DOM, and one in a layout it keeps still waits for its trigger.
6037
+ await hydrateFarmIsolatedClientBoundaries(${islandValues ? "document" : "rootContainer"});
5807
6038
  // The rest of the document is static server HTML with nothing to hydrate, so
5808
6039
  // stop holding its clicks and submits once the load-strategy islands are live.
5809
6040
  // Deferred islands capture their own interactions, and held targets outside an
@@ -6023,9 +6254,9 @@ function generateClientManifest(bundle) {
6023
6254
  return manifest;
6024
6255
  }
6025
6256
  async function defineConfig(config = {}) {
6026
- const tailwindVitePlugin = await _chunkLNM57D3Hcjs.loadTailwindVitePlugin.call(void 0, );
6257
+ const tailwindVitePlugin = await _chunkR53QDV6Tcjs.loadTailwindVitePlugin.call(void 0, );
6027
6258
  const appRoot = path5.resolve(config.root || process.cwd());
6028
- if (_optionalChain([config, 'access', _383 => _383.extends, 'optionalAccess', _384 => _384.length])) {
6259
+ if (_optionalChain([config, 'access', _394 => _394.extends, 'optionalAccess', _395 => _395.length])) {
6029
6260
  const { config: layeredConfig } = await import("./layers-DMRXRL7F.cjs").then(
6030
6261
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
6031
6262
  root: appRoot,
@@ -6035,7 +6266,7 @@ async function defineConfig(config = {}) {
6035
6266
  config = layeredConfig;
6036
6267
  }
6037
6268
  config.renderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, config.renderer);
6038
- config.images = _chunkTQMI6BYOcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
6269
+ config.images = _chunkUYSTTPYJcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
6039
6270
  const rendererVitePlugins = await _chunkRD623KW4cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
6040
6271
  ssr: true
6041
6272
  });
@@ -6127,13 +6358,13 @@ async function defineConfig(config = {}) {
6127
6358
  if (!serverStarted) {
6128
6359
  serverStarted = true;
6129
6360
  const elapsed = Date.now() - startTime;
6130
- const address = _optionalChain([server, 'access', _385 => _385.httpServer, 'optionalAccess', _386 => _386.address, 'call', _387 => _387()]);
6361
+ const address = _optionalChain([server, 'access', _396 => _396.httpServer, 'optionalAccess', _397 => _397.address, 'call', _398 => _398()]);
6131
6362
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
6132
6363
  const hostConfig = server.config.server.host;
6133
6364
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
6134
6365
  console.log("");
6135
6366
  console.log(
6136
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkOAMUSC7Hcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
6367
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk2FRLSDBTcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
6137
6368
  );
6138
6369
  console.log("");
6139
6370
  console.log(
@@ -6167,7 +6398,7 @@ async function defineConfig(config = {}) {
6167
6398
  plugins: [
6168
6399
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
6169
6400
  _chunk65Y5SIBHcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
6170
- _chunkTQMI6BYOcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
6401
+ _chunkUYSTTPYJcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
6171
6402
  tailwindVitePlugin,
6172
6403
  ...rendererVitePlugins,
6173
6404
  ...reactRefreshPlugins,
@@ -6181,8 +6412,8 @@ async function defineConfig(config = {}) {
6181
6412
  customLogger: farmLogger,
6182
6413
  clearScreen: false,
6183
6414
  optimizeDeps: {
6184
- ..._chunkTQMI6BYOcjs.createFarmClientOptimizeDepsConfig.call(void 0,
6185
- _chunkTQMI6BYOcjs.createFarmClientOptimizeDepsEntries.call(void 0,
6415
+ ..._chunkUYSTTPYJcjs.createFarmClientOptimizeDepsConfig.call(void 0,
6416
+ _chunkUYSTTPYJcjs.createFarmClientOptimizeDepsEntries.call(void 0,
6186
6417
  appRoot,
6187
6418
  _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
6188
6419
  ),
@@ -6225,7 +6456,7 @@ async function defineConfig(config = {}) {
6225
6456
  // Stub out problematic server-only modules during dev mode
6226
6457
  alias: {
6227
6458
  ..._chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, config.layers),
6228
- ..._chunkTQMI6BYOcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
6459
+ ..._chunkUYSTTPYJcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
6229
6460
  // Nitro internals that should not be resolved in browser
6230
6461
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
6231
6462
  "@poppinss/dumper": "data:text/javascript,export default {};",