@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
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { g as APIResult, p as ClientOptions } from './api-client.d-BWcqZciH.js';
2
- export { A as APIClient, a as APIClientError, b as APIClientOptions, c as APIClientSystemError, d as APIClientWithoutIntegrationsOptions, j as ApiClients, n as ClientHeaders, o as ClientLifecycleHooks, q as ClientRequestEvent, r as ClientResponseEvent, I as InferIntegrationOperationBody, t as InferIntegrationOperationQuery, u as InferIntegrationOperationResponse, v as IntegrationAPI, w as IntegrationClient, x as IntegrationClientAliases, y as IntegrationClientData, z as IntegrationClientError, B as IntegrationClientOptions, D as IntegrationClientRequestOptions, E as IntegrationClientRoot, G as IntegrationClients, H as IntegrationOperationResult, J as IntegrationServerClient, K as IntegrationServerClientAliases, L as IntegrationServerClientOptions, M as IntegrationServerClientRequestOptions, N as IntegrationServerClientRoot, O as IntegrationServerRequestLike, X as RouteAPIClient, Y as ServerAPIClient, Z as ServerAPIClientOptions, _ as ServerAPIClientWithoutIntegrationsOptions, a2 as createAPIClient, a3 as createApiClients, a4 as createIntegrationApi, a5 as createIntegrationClient, a6 as createIntegrationClients, a7 as createIntegrationServerClient, a8 as createIntegrations, a9 as createServerAPIClient, ab as getIntegrationAPIManifest, ac as integrationClients, ad as integrationsClient, ae as integrationsServer } from './api-client.d-BWcqZciH.js';
1
+ import { n as APIResult, v as ClientOptions } from './api-client.d-ddQBNGtu.js';
2
+ export { A as APIClient, b as APIClientError, d as APIClientOptions, e as APIClientSystemError, f as APIClientWithoutIntegrationsOptions, g as ApiClients, t as ClientHeaders, u as ClientLifecycleHooks, w as ClientRequestEvent, x as ClientResponseEvent, I as InferIntegrationOperationBody, z as InferIntegrationOperationQuery, B as InferIntegrationOperationResponse, D as IntegrationAPI, E as IntegrationClient, G as IntegrationClientAliases, H as IntegrationClientData, J as IntegrationClientError, K as IntegrationClientOptions, L as IntegrationClientRequestOptions, M as IntegrationClientRoot, N as IntegrationClients, O as IntegrationOperationResult, P as IntegrationServerClient, Q as IntegrationServerClientAliases, T as IntegrationServerClientOptions, U as IntegrationServerClientRequestOptions, V as IntegrationServerClientRoot, W as IntegrationServerRequestLike, R as RouteAPIClient, S as ServerAPIClient, h as ServerAPIClientOptions, i as ServerAPIClientWithoutIntegrationsOptions, c as createAPIClient, a as createApiClients, a5 as createIntegrationApi, a6 as createIntegrationClient, a7 as createIntegrationClients, a8 as createIntegrationServerClient, a9 as createIntegrations, j as createServerAPIClient, ab as getIntegrationAPIManifest, ac as integrationClients, ad as integrationsClient, ae as integrationsServer } from './api-client.d-ddQBNGtu.js';
3
3
  export { F as FarmAPIStream } from './endpoint.d-BgHn0lhl.js';
4
4
  import React__default, { FormHTMLAttributes, FormEvent, ComponentType, AnchorHTMLAttributes } from 'react';
5
5
  export { RouteActionTarget, UseActionFormProps, UseActionReturn, UseServerFnOptions, useAction } from './server-fn-client.js';
@@ -8,11 +8,11 @@ export { a as FarmClientCacheEntry, b as FarmClientCacheKey, F as FarmClientCach
8
8
  export { F as FarmIntegrationAPI, e as FarmIntegrationAPIBodyFormat, f as FarmIntegrationAPIMethod, g as FarmIntegrationAPIOperation, h as FarmIntegrationAPIResponseFormat, p as api, r as defineIntegrationAPI, s as defineIntegrationAPIOperation, t as endpoint } from './route.d-DBTEqifW.js';
9
9
  export { UseThemeResult, useTheme } from './theme/client.js';
10
10
  import { FarmRouterPathParams, FarmRouterPathParam, FarmRouterBuildOptions } from './router.js';
11
- import { f as FarmViewTransitionMode } from './spa-router.d-DqZ6Lfs0.js';
12
- export { b as FarmNavigateOptions, c as FarmNavigationBlocker, F as FarmNavigationBlockerContext, d as FarmNavigationListener, e as FarmNavigationLocation, a as FarmNavigationState, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, h as pushState, r as readPageState, i as replaceState } from './spa-router.d-DqZ6Lfs0.js';
11
+ import { f as FarmViewTransitionMode } from './spa-router.d-DAtnNoBe.js';
12
+ export { b as FarmNavigateOptions, c as FarmNavigationBlocker, F as FarmNavigationBlockerContext, d as FarmNavigationListener, e as FarmNavigationLocation, a as FarmNavigationState, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, h as pushState, r as readPageState, i as replaceState } from './spa-router.d-DAtnNoBe.js';
13
13
  import { c as FarmI18nLocale } from './types.d-C41ePjvP.js';
14
- export { U as UseBlockerOptions, a as UseBlockerReturn, b as UseRouterOptions, u as useBlocker, c as useNavigation, d as usePageState, e as useRouter, f as useScrollRestoration } from './router.d-DQ3k7EYn.js';
15
- export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-DIyDslxt.js';
14
+ export { U as UseBlockerOptions, a as UseBlockerReturn, b as UseRouterOptions, u as useBlocker, c as useNavigation, d as usePageState, e as useRouter, f as useScrollRestoration } from './router.d-DjGn_al7.js';
15
+ export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-JXx40JzR.js';
16
16
  export { F as FarmChunkRecoveryOptions, i as installChunkErrorRecovery, a as isChunkLoadError } from './chunk-recovery.d-lnQFzcQP.js';
17
17
  export { b as FarmClientHydrationCompleteEvent, d as FarmClientHydrationEvent, e as FarmClientHydrationMode, f as FarmClientHydrationSession, g as FarmClientLocation, h as FarmClientNavigationAction, i as FarmClientNavigationErrorEvent, j as FarmClientNavigationEvent, k as FarmClientNavigationLoadedEvent, l as FarmClientNavigationResolvedEvent, m as FarmClientNavigationSession, n as FarmClientPerformanceEvent, a as FarmClientPlugin, o as FarmClientPluginCloseEvent, p as FarmClientPluginEnforce, q as FarmClientPluginErrorEvent, r as FarmClientPluginErrorPhase, F as FarmClientPluginManager, s as FarmClientPluginManagerOptions, t as FarmClientPluginMetadata, u as FarmClientPluginRegistration, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, c as createClientPluginManager } from './lifecycle.d-C2aLBOwu.js';
18
18
  export { S as ServerQueryFetchOptions, f as fetchServerQuery, p as prefetchServerQuery } from './server-query-runtime.d-DXRNhX_3.js';
@@ -22,7 +22,7 @@ import './server-fn.js';
22
22
  import './server-fn-error.d-DrcH9cc1.js';
23
23
  import './server-query.js';
24
24
  import './types.d-DQnyD3VD.js';
25
- import './client-plugins.d-n3iWY1EJ.js';
25
+ import './client-plugins.d-vXrbcfJ1.js';
26
26
  import './renderer.js';
27
27
  import './deployment.js';
28
28
  import 'http';
@@ -43,10 +43,10 @@ import './layers.d-CcS42OGR.js';
43
43
  import 'rolldown/utils';
44
44
  import 'rolldown';
45
45
  import './image-config.d-CeDgNyX4.js';
46
- import './config.d-DqKaCr1r.js';
46
+ import './config.d-DqZkLwef.js';
47
47
  import './font.js';
48
48
  import './island.d-CfGru1MO.js';
49
- import './render-plan.d-Dr5WRjoV.js';
49
+ import './render-plan.d-B9lAP3uX.js';
50
50
 
51
51
  type MutationStatus = "idle" | "pending" | "success" | "error";
52
52
  type AnyMutationTarget = (...args: any[]) => Promise<any>;
package/dist/client.mjs CHANGED
@@ -13,24 +13,24 @@ import {
13
13
  storageClientCacheAdapter,
14
14
  useFetcher,
15
15
  useMutation
16
- } from "./chunk-JWI5PUO2.mjs";
16
+ } from "./chunk-W2ZXMMHA.mjs";
17
17
  import {
18
18
  installChunkErrorRecovery,
19
19
  isChunkLoadError
20
20
  } from "./chunk-O4F3JUST.mjs";
21
- import {
22
- useServerQuery
23
- } from "./chunk-724WT3NI.mjs";
24
21
  import {
25
22
  useAction
26
23
  } from "./chunk-GL3ZDHKI.mjs";
24
+ import {
25
+ useServerQuery
26
+ } from "./chunk-724WT3NI.mjs";
27
27
  import {
28
28
  useBlocker,
29
29
  useNavigation,
30
30
  usePageState,
31
31
  useRouter,
32
32
  useScrollRestoration
33
- } from "./chunk-VAHBCI6X.mjs";
33
+ } from "./chunk-BQWBHWEW.mjs";
34
34
  import {
35
35
  useTheme
36
36
  } from "./chunk-EFLNOZGH.mjs";
@@ -49,7 +49,7 @@ import {
49
49
  integrationClients,
50
50
  integrationsClient,
51
51
  integrationsServer
52
- } from "./chunk-2NHOYYUT.mjs";
52
+ } from "./chunk-7H45IJWO.mjs";
53
53
  import "./chunk-IAPTECEB.mjs";
54
54
  import "./chunk-Z64V4WZI.mjs";
55
55
  import {
@@ -70,11 +70,11 @@ import {
70
70
  pushState,
71
71
  readPageState,
72
72
  replaceState
73
- } from "./chunk-SN5VSO3Q.mjs";
73
+ } from "./chunk-25T5VXOE.mjs";
74
74
  import "./chunk-PTLXHRJZ.mjs";
75
75
  import {
76
76
  delegateNavigation
77
- } from "./chunk-G2KTRMWA.mjs";
77
+ } from "./chunk-RSEAX5MW.mjs";
78
78
  import "./chunk-NCIAP562.mjs";
79
79
  import {
80
80
  getFarmClientDataCache,
@@ -97,7 +97,7 @@ import {
97
97
  import "./chunk-5Y4GYKKH.mjs";
98
98
  import "./chunk-YT3SLLZK.mjs";
99
99
  import "./chunk-GUZC226X.mjs";
100
- import "./chunk-BLD5GVCG.mjs";
100
+ import "./chunk-W6QLRQ3V.mjs";
101
101
  import "./chunk-MFQGU5CC.mjs";
102
102
  import "./chunk-S6O2L47H.mjs";
103
103
  import "./chunk-NBIVGHAT.mjs";
@@ -7,6 +7,125 @@ interface PlatformBlockChecker {
7
7
  /** Results of function-valued blocks for one dev session or build. */
8
8
  type PlatformBlockCache<T> = Map<string, Promise<T>>;
9
9
 
10
+ /**
11
+ * What web screens can call on an app native module (RFC 0004, 7.5): the Promise methods of its
12
+ * Codegen spec, read with React Native's own Codegen parser so the spec stays the one source. The
13
+ * Android shell checks arguments against these types before the module runs, and `src/farm.d.ts`
14
+ * types `native.<module>` from them.
15
+ */
16
+ /** A value a web screen sends or receives, as the Codegen spec declares it. */
17
+ type FarmNativeType = ({
18
+ type: "string";
19
+ } | {
20
+ type: "number";
21
+ integer?: true;
22
+ } | {
23
+ type: "boolean";
24
+ }
25
+ /** A string literal union, a single literal, or an enum: the values the spec allows. */
26
+ | {
27
+ type: "literal";
28
+ values: Array<string | number>;
29
+ }
30
+ /** An object type with declared properties: `ReadableMap` in Kotlin. */
31
+ | {
32
+ type: "object";
33
+ properties: FarmNativeProperty[];
34
+ }
35
+ /** `Object` or `UnsafeObject`: any JSON object, `ReadableMap` in Kotlin. */
36
+ | {
37
+ type: "map";
38
+ }
39
+ /** An array; without `element`, any JSON values. `ReadableArray` in Kotlin. */
40
+ | {
41
+ type: "array";
42
+ element?: FarmNativeType;
43
+ }
44
+ /** Return values only: `Promise<void>`. */
45
+ | {
46
+ type: "void";
47
+ }
48
+ /** Return values only: a type web screens get as JSON without a narrower type. */
49
+ | {
50
+ type: "unknown";
51
+ }) & {
52
+ nullable?: true;
53
+ };
54
+ interface FarmNativeProperty {
55
+ name: string;
56
+ optional: boolean;
57
+ type: FarmNativeType;
58
+ }
59
+ interface FarmNativeMethod {
60
+ name: string;
61
+ params: FarmNativeProperty[];
62
+ /** What the Promise resolves with. */
63
+ returns: FarmNativeType;
64
+ }
65
+ /** The part of one Codegen spec web screens reach. */
66
+ interface FarmNativeWebSpec {
67
+ /** Promise methods whose parameters web screens can send, in spec order. */
68
+ methods: FarmNativeMethod[];
69
+ /** Promise methods web screens cannot call, and why, such as a callback parameter. */
70
+ unsupported: Array<{
71
+ method: string;
72
+ reason: string;
73
+ }>;
74
+ }
75
+
76
+ /**
77
+ * Native modules (RFC 0004, 7.5): the app's own TurboModules in `src/native/`, and
78
+ * `mobile.modules`, the OS permission entries and usage strings per module.
79
+ */
80
+ /** What the OS needs for one module: `mobile.modules.<name>`. */
81
+ interface FarmMobileModuleConfig {
82
+ /**
83
+ * Android permissions the generated `AndroidManifest.xml` declares, such as
84
+ * `"android.permission.VIBRATE"`. Community modules already merge their own manifest's
85
+ * permissions, so this is for extra ones.
86
+ */
87
+ permissions?: string[];
88
+ /**
89
+ * iOS usage strings the generated `Info.plist` gets, keyed by usage-description key, such as
90
+ * `{ NSCameraUsageDescription: "Scans receipts." }`.
91
+ */
92
+ usage?: Record<string, string>;
93
+ /**
94
+ * Lets web screens (`page.tsx` in the shell's WebView) call the module's Promise methods as
95
+ * `native.<name>.<method>()` from `@farm.js/core/native`, with arguments checked against its
96
+ * Codegen spec. App modules in `src/native/` only: community modules need the React Native JS
97
+ * runtime. Android only for now. Defaults to `false`.
98
+ */
99
+ web?: boolean;
100
+ }
101
+ interface ResolvedFarmMobileModuleConfig {
102
+ permissions: string[];
103
+ usage: Record<string, string>;
104
+ web: boolean;
105
+ }
106
+ /** One Codegen spec in `src/native/`, such as `NativeDevice.ts`. */
107
+ interface FarmMobileAppModuleSpec {
108
+ /** The name the spec registers: `TurboModuleRegistry.getEnforcing<Spec>("Device")`. */
109
+ name: string;
110
+ /** Absolute path of the spec file. */
111
+ file: string;
112
+ /**
113
+ * With `mobile.modules.<name>.web`: the Promise methods web screens may call, read from the spec
114
+ * with React Native's Codegen.
115
+ */
116
+ web?: FarmNativeWebSpec;
117
+ }
118
+ /** The app's own native modules: the files in `src/native/` the generated projects copy. */
119
+ interface FarmMobileAppModules {
120
+ /** Absolute path of `src/native/`. */
121
+ dir: string;
122
+ specs: FarmMobileAppModuleSpec[];
123
+ /** Absolute paths of the Kotlin files (`*.kt`), linked into the Android app. */
124
+ android: string[];
125
+ /** Absolute paths of the Swift files (`*.swift`), copied but not built: iOS has no host yet. */
126
+ ios: string[];
127
+ }
128
+
10
129
  type FarmMobileOS = "android" | "ios";
11
130
  /** How the native navigator shows a route: on a new stack screen, as a sheet, or in place. */
12
131
  type FarmMobilePresentation = "push" | "modal" | "replace";
@@ -114,6 +233,20 @@ interface FarmMobileUserConfig {
114
233
  routes?: Record<string, FarmMobileRouteConfig>;
115
234
  /** Screen tiers per route, the native engine, and the analyzer. */
116
235
  native?: FarmMobileNativeConfig;
236
+ /**
237
+ * Bundle a page shell, the route's layouts around its `loading.tsx`, into the app for routes
238
+ * whose loading file and layouts sit in static folders. A web screen that loads a document
239
+ * shows its shell at once, and keeps it up while the server is unreachable. Built by
240
+ * `farm build --mobile`; defaults to `false`.
241
+ */
242
+ shells?: boolean;
243
+ /**
244
+ * What the OS needs for each native module, keyed by module name: an app module's registered
245
+ * name (`src/native/NativeDevice.ts` registers `"Device"`) or an installed package such as
246
+ * `"react-native-vision-camera"`. `permissions` go into the Android manifest and `usage`
247
+ * strings into the iOS `Info.plist`.
248
+ */
249
+ modules?: Record<string, FarmMobileModuleConfig>;
117
250
  }
118
251
  /** What a function-valued `mobile` block receives. Resolved once per OS per dev start or build. */
119
252
  interface FarmMobileContext {
@@ -149,6 +282,9 @@ interface ResolvedFarmMobileConfig {
149
282
  /** `mobile.routes`, keyed by route pattern with route groups removed. */
150
283
  routes: Record<string, FarmMobileRouteConfig>;
151
284
  native: ResolvedFarmMobileNativeConfig;
285
+ shells: boolean;
286
+ /** `mobile.modules`, checked: permissions deduplicated per module, usage strings trimmed. */
287
+ modules: Record<string, ResolvedFarmMobileModuleConfig>;
152
288
  }
153
289
  /**
154
290
  * The origin a mobile app loads pages from. `https://` anywhere; `http://` only for loopback and
@@ -170,6 +306,8 @@ interface FarmMobileResolveOptions {
170
306
  srcDir?: string;
171
307
  /** The app's page route patterns, such as `"/notes/[id]"` (route groups removed). */
172
308
  routes: readonly string[];
309
+ /** Names the app's own native module specs register (`scanFarmMobileAppModules`). */
310
+ appModules?: readonly string[];
173
311
  }
174
312
  /**
175
313
  * Fill in defaults for an already resolved (static or returned) `mobile` block and check it
@@ -196,4 +334,4 @@ type FarmMobileBlockCache = PlatformBlockCache<FarmMobileUserConfig>;
196
334
  */
197
335
  declare function resolveFarmMobileBlock(input: FarmMobileConfigInput, context: FarmMobileContext, cache?: FarmMobileBlockCache): Promise<FarmMobileUserConfig>;
198
336
 
199
- export { type FarmMobileOS as F, type PlatformBlockCache as P, type ResolvedFarmMobileConfig as R, type FarmMobileBudgets as a, type FarmMobileConfigInput as b, type FarmMobileContext as c, type FarmMobileNativeAuto as d, type FarmMobileNativeConfig as e, type FarmMobileNativeEngine as f, type FarmMobileNativeRouteConfig as g, type FarmMobilePageConfig as h, type FarmMobilePrefetch as i, type FarmMobilePresentation as j, type FarmMobileRouteConfig as k, type FarmMobileRouteScreen as l, type FarmMobileScreen as m, type FarmMobileTab as n, type FarmMobileUserConfig as o, type FarmMobileBlockCache as p, type FarmMobileContextOptions as q, type FarmMobileResolveOptions as r, type ResolvedFarmMobileNativeConfig as s, createFarmMobileContext as t, resolveFarmMobileBlock as u, resolveFarmMobileConfig as v, resolveFarmMobileServer as w, validateFarmMobileConfig as x, validateFarmMobilePageConfig as y };
337
+ export { type ResolvedFarmMobileNativeConfig as A, createFarmMobileContext as B, resolveFarmMobileBlock as C, resolveFarmMobileConfig as D, resolveFarmMobileServer as E, type FarmMobileOS as F, validateFarmMobileConfig as G, validateFarmMobilePageConfig as H, type PlatformBlockCache as P, type ResolvedFarmMobileConfig as R, type FarmMobileAppModules as a, type FarmMobileAppModuleSpec as b, type FarmMobileBudgets as c, type FarmMobileConfigInput as d, type FarmMobileContext as e, type FarmMobileModuleConfig as f, type FarmMobileNativeAuto as g, type FarmMobileNativeConfig as h, type FarmMobileNativeEngine as i, type FarmMobileNativeRouteConfig as j, type FarmMobilePageConfig as k, type FarmMobilePrefetch as l, type FarmMobilePresentation as m, type FarmMobileRouteConfig as n, type FarmMobileRouteScreen as o, type FarmMobileScreen as p, type FarmMobileTab as q, type FarmMobileUserConfig as r, type FarmNativeMethod as s, type FarmNativeProperty as t, type FarmNativeType as u, type FarmNativeWebSpec as v, type ResolvedFarmMobileModuleConfig as w, type FarmMobileBlockCache as x, type FarmMobileContextOptions as y, type FarmMobileResolveOptions as z };
@@ -7,6 +7,125 @@ interface PlatformBlockChecker {
7
7
  /** Results of function-valued blocks for one dev session or build. */
8
8
  type PlatformBlockCache<T> = Map<string, Promise<T>>;
9
9
 
10
+ /**
11
+ * What web screens can call on an app native module (RFC 0004, 7.5): the Promise methods of its
12
+ * Codegen spec, read with React Native's own Codegen parser so the spec stays the one source. The
13
+ * Android shell checks arguments against these types before the module runs, and `src/farm.d.ts`
14
+ * types `native.<module>` from them.
15
+ */
16
+ /** A value a web screen sends or receives, as the Codegen spec declares it. */
17
+ type FarmNativeType = ({
18
+ type: "string";
19
+ } | {
20
+ type: "number";
21
+ integer?: true;
22
+ } | {
23
+ type: "boolean";
24
+ }
25
+ /** A string literal union, a single literal, or an enum: the values the spec allows. */
26
+ | {
27
+ type: "literal";
28
+ values: Array<string | number>;
29
+ }
30
+ /** An object type with declared properties: `ReadableMap` in Kotlin. */
31
+ | {
32
+ type: "object";
33
+ properties: FarmNativeProperty[];
34
+ }
35
+ /** `Object` or `UnsafeObject`: any JSON object, `ReadableMap` in Kotlin. */
36
+ | {
37
+ type: "map";
38
+ }
39
+ /** An array; without `element`, any JSON values. `ReadableArray` in Kotlin. */
40
+ | {
41
+ type: "array";
42
+ element?: FarmNativeType;
43
+ }
44
+ /** Return values only: `Promise<void>`. */
45
+ | {
46
+ type: "void";
47
+ }
48
+ /** Return values only: a type web screens get as JSON without a narrower type. */
49
+ | {
50
+ type: "unknown";
51
+ }) & {
52
+ nullable?: true;
53
+ };
54
+ interface FarmNativeProperty {
55
+ name: string;
56
+ optional: boolean;
57
+ type: FarmNativeType;
58
+ }
59
+ interface FarmNativeMethod {
60
+ name: string;
61
+ params: FarmNativeProperty[];
62
+ /** What the Promise resolves with. */
63
+ returns: FarmNativeType;
64
+ }
65
+ /** The part of one Codegen spec web screens reach. */
66
+ interface FarmNativeWebSpec {
67
+ /** Promise methods whose parameters web screens can send, in spec order. */
68
+ methods: FarmNativeMethod[];
69
+ /** Promise methods web screens cannot call, and why, such as a callback parameter. */
70
+ unsupported: Array<{
71
+ method: string;
72
+ reason: string;
73
+ }>;
74
+ }
75
+
76
+ /**
77
+ * Native modules (RFC 0004, 7.5): the app's own TurboModules in `src/native/`, and
78
+ * `mobile.modules`, the OS permission entries and usage strings per module.
79
+ */
80
+ /** What the OS needs for one module: `mobile.modules.<name>`. */
81
+ interface FarmMobileModuleConfig {
82
+ /**
83
+ * Android permissions the generated `AndroidManifest.xml` declares, such as
84
+ * `"android.permission.VIBRATE"`. Community modules already merge their own manifest's
85
+ * permissions, so this is for extra ones.
86
+ */
87
+ permissions?: string[];
88
+ /**
89
+ * iOS usage strings the generated `Info.plist` gets, keyed by usage-description key, such as
90
+ * `{ NSCameraUsageDescription: "Scans receipts." }`.
91
+ */
92
+ usage?: Record<string, string>;
93
+ /**
94
+ * Lets web screens (`page.tsx` in the shell's WebView) call the module's Promise methods as
95
+ * `native.<name>.<method>()` from `@farm.js/core/native`, with arguments checked against its
96
+ * Codegen spec. App modules in `src/native/` only: community modules need the React Native JS
97
+ * runtime. Android only for now. Defaults to `false`.
98
+ */
99
+ web?: boolean;
100
+ }
101
+ interface ResolvedFarmMobileModuleConfig {
102
+ permissions: string[];
103
+ usage: Record<string, string>;
104
+ web: boolean;
105
+ }
106
+ /** One Codegen spec in `src/native/`, such as `NativeDevice.ts`. */
107
+ interface FarmMobileAppModuleSpec {
108
+ /** The name the spec registers: `TurboModuleRegistry.getEnforcing<Spec>("Device")`. */
109
+ name: string;
110
+ /** Absolute path of the spec file. */
111
+ file: string;
112
+ /**
113
+ * With `mobile.modules.<name>.web`: the Promise methods web screens may call, read from the spec
114
+ * with React Native's Codegen.
115
+ */
116
+ web?: FarmNativeWebSpec;
117
+ }
118
+ /** The app's own native modules: the files in `src/native/` the generated projects copy. */
119
+ interface FarmMobileAppModules {
120
+ /** Absolute path of `src/native/`. */
121
+ dir: string;
122
+ specs: FarmMobileAppModuleSpec[];
123
+ /** Absolute paths of the Kotlin files (`*.kt`), linked into the Android app. */
124
+ android: string[];
125
+ /** Absolute paths of the Swift files (`*.swift`), copied but not built: iOS has no host yet. */
126
+ ios: string[];
127
+ }
128
+
10
129
  type FarmMobileOS = "android" | "ios";
11
130
  /** How the native navigator shows a route: on a new stack screen, as a sheet, or in place. */
12
131
  type FarmMobilePresentation = "push" | "modal" | "replace";
@@ -114,6 +233,20 @@ interface FarmMobileUserConfig {
114
233
  routes?: Record<string, FarmMobileRouteConfig>;
115
234
  /** Screen tiers per route, the native engine, and the analyzer. */
116
235
  native?: FarmMobileNativeConfig;
236
+ /**
237
+ * Bundle a page shell, the route's layouts around its `loading.tsx`, into the app for routes
238
+ * whose loading file and layouts sit in static folders. A web screen that loads a document
239
+ * shows its shell at once, and keeps it up while the server is unreachable. Built by
240
+ * `farm build --mobile`; defaults to `false`.
241
+ */
242
+ shells?: boolean;
243
+ /**
244
+ * What the OS needs for each native module, keyed by module name: an app module's registered
245
+ * name (`src/native/NativeDevice.ts` registers `"Device"`) or an installed package such as
246
+ * `"react-native-vision-camera"`. `permissions` go into the Android manifest and `usage`
247
+ * strings into the iOS `Info.plist`.
248
+ */
249
+ modules?: Record<string, FarmMobileModuleConfig>;
117
250
  }
118
251
  /** What a function-valued `mobile` block receives. Resolved once per OS per dev start or build. */
119
252
  interface FarmMobileContext {
@@ -149,6 +282,9 @@ interface ResolvedFarmMobileConfig {
149
282
  /** `mobile.routes`, keyed by route pattern with route groups removed. */
150
283
  routes: Record<string, FarmMobileRouteConfig>;
151
284
  native: ResolvedFarmMobileNativeConfig;
285
+ shells: boolean;
286
+ /** `mobile.modules`, checked: permissions deduplicated per module, usage strings trimmed. */
287
+ modules: Record<string, ResolvedFarmMobileModuleConfig>;
152
288
  }
153
289
  /**
154
290
  * The origin a mobile app loads pages from. `https://` anywhere; `http://` only for loopback and
@@ -170,6 +306,8 @@ interface FarmMobileResolveOptions {
170
306
  srcDir?: string;
171
307
  /** The app's page route patterns, such as `"/notes/[id]"` (route groups removed). */
172
308
  routes: readonly string[];
309
+ /** Names the app's own native module specs register (`scanFarmMobileAppModules`). */
310
+ appModules?: readonly string[];
173
311
  }
174
312
  /**
175
313
  * Fill in defaults for an already resolved (static or returned) `mobile` block and check it
@@ -196,4 +334,4 @@ type FarmMobileBlockCache = PlatformBlockCache<FarmMobileUserConfig>;
196
334
  */
197
335
  declare function resolveFarmMobileBlock(input: FarmMobileConfigInput, context: FarmMobileContext, cache?: FarmMobileBlockCache): Promise<FarmMobileUserConfig>;
198
336
 
199
- export { type FarmMobileOS as F, type PlatformBlockCache as P, type ResolvedFarmMobileConfig as R, type FarmMobileBudgets as a, type FarmMobileConfigInput as b, type FarmMobileContext as c, type FarmMobileNativeAuto as d, type FarmMobileNativeConfig as e, type FarmMobileNativeEngine as f, type FarmMobileNativeRouteConfig as g, type FarmMobilePageConfig as h, type FarmMobilePrefetch as i, type FarmMobilePresentation as j, type FarmMobileRouteConfig as k, type FarmMobileRouteScreen as l, type FarmMobileScreen as m, type FarmMobileTab as n, type FarmMobileUserConfig as o, type FarmMobileBlockCache as p, type FarmMobileContextOptions as q, type FarmMobileResolveOptions as r, type ResolvedFarmMobileNativeConfig as s, createFarmMobileContext as t, resolveFarmMobileBlock as u, resolveFarmMobileConfig as v, resolveFarmMobileServer as w, validateFarmMobileConfig as x, validateFarmMobilePageConfig as y };
337
+ export { type ResolvedFarmMobileNativeConfig as A, createFarmMobileContext as B, resolveFarmMobileBlock as C, resolveFarmMobileConfig as D, resolveFarmMobileServer as E, type FarmMobileOS as F, validateFarmMobileConfig as G, validateFarmMobilePageConfig as H, type PlatformBlockCache as P, type ResolvedFarmMobileConfig as R, type FarmMobileAppModules as a, type FarmMobileAppModuleSpec as b, type FarmMobileBudgets as c, type FarmMobileConfigInput as d, type FarmMobileContext as e, type FarmMobileModuleConfig as f, type FarmMobileNativeAuto as g, type FarmMobileNativeConfig as h, type FarmMobileNativeEngine as i, type FarmMobileNativeRouteConfig as j, type FarmMobilePageConfig as k, type FarmMobilePrefetch as l, type FarmMobilePresentation as m, type FarmMobileRouteConfig as n, type FarmMobileRouteScreen as o, type FarmMobileScreen as p, type FarmMobileTab as q, type FarmMobileUserConfig as r, type FarmNativeMethod as s, type FarmNativeProperty as t, type FarmNativeType as u, type FarmNativeWebSpec as v, type ResolvedFarmMobileModuleConfig as w, type FarmMobileBlockCache as x, type FarmMobileContextOptions as y, type FarmMobileResolveOptions as z };
package/dist/config.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { p as FarmUserConfig } from './client-plugins.d-DllmH8eM.mjs';
1
+ import { p as FarmUserConfig } from './client-plugins.d-CgQQ-EAv.mjs';
2
2
  import './lifecycle.d-C2aLBOwu.mjs';
3
3
  import './route.d-BaVH3V0w.mjs';
4
4
  import './endpoint.d-BkMSCRf6.mjs';
@@ -28,7 +28,7 @@ import 'rolldown/utils';
28
28
  import 'rolldown';
29
29
  import './image-config.d-CeDgNyX4.mjs';
30
30
  import './types.d-C41ePjvP.mjs';
31
- import './config.d-DqKaCr1r.mjs';
31
+ import './config.d-DqZkLwef.mjs';
32
32
  import './types.d-DQnyD3VD.mjs';
33
33
  import './font.mjs';
34
34
 
package/dist/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { p as FarmUserConfig } from './client-plugins.d-n3iWY1EJ.js';
1
+ import { p as FarmUserConfig } from './client-plugins.d-vXrbcfJ1.js';
2
2
  import './lifecycle.d-C2aLBOwu.js';
3
3
  import './route.d-DBTEqifW.js';
4
4
  import './endpoint.d-BgHn0lhl.js';
@@ -28,7 +28,7 @@ import 'rolldown/utils';
28
28
  import 'rolldown';
29
29
  import './image-config.d-CeDgNyX4.js';
30
30
  import './types.d-C41ePjvP.js';
31
- import './config.d-DqKaCr1r.js';
31
+ import './config.d-DqZkLwef.js';
32
32
  import './types.d-DQnyD3VD.js';
33
33
  import './font.js';
34
34
 
package/dist/cron.cjs CHANGED
@@ -11,10 +11,10 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkXYL4HSVCcjs = require('./chunk-XYL4HSVC.cjs');
14
+ var _chunkYI6FKTTNcjs = require('./chunk-YI6FKTTN.cjs');
15
15
  require('./chunk-2KMIJDY6.cjs');
16
16
  require('./chunk-SHIWRBFI.cjs');
17
- require('./chunk-VQJYGZNX.cjs');
17
+ require('./chunk-QMNWKQL4.cjs');
18
18
  require('./chunk-SUCDVKUB.cjs');
19
19
  require('./chunk-6CTFVBAT.cjs');
20
20
  require('./chunk-YTVSWXEZ.cjs');
@@ -32,4 +32,4 @@ require('./chunk-BTZ5O6VM.cjs');
32
32
 
33
33
 
34
34
 
35
- exports.DEFAULT_FARM_CRON_SECRET_ENV = _chunkXYL4HSVCcjs.DEFAULT_FARM_CRON_SECRET_ENV; exports.FARM_CRON_MANIFEST = _chunkXYL4HSVCcjs.FARM_CRON_MANIFEST; exports.applyFarmCronVercelCrons = _chunkXYL4HSVCcjs.applyFarmCronVercelCrons; exports.createFarmCronCloudflareConfig = _chunkXYL4HSVCcjs.createFarmCronCloudflareConfig; exports.createFarmCronCloudflareTriggers = _chunkXYL4HSVCcjs.createFarmCronCloudflareTriggers; exports.createFarmCronManifest = _chunkXYL4HSVCcjs.createFarmCronManifest; exports.createFarmCronVercelCrons = _chunkXYL4HSVCcjs.createFarmCronVercelCrons; exports.cronRoute = _chunkXYL4HSVCcjs.cronRoute; exports.isCronRequestAuthorized = _chunkXYL4HSVCcjs.isCronRequestAuthorized; exports.mergeScheduledTasks = _chunkXYL4HSVCcjs.mergeScheduledTasks; exports.prepareFarmCronForNitro = _chunkXYL4HSVCcjs.prepareFarmCronForNitro; exports.resolveCronConfig = _chunkXYL4HSVCcjs.resolveCronConfig;
35
+ exports.DEFAULT_FARM_CRON_SECRET_ENV = _chunkYI6FKTTNcjs.DEFAULT_FARM_CRON_SECRET_ENV; exports.FARM_CRON_MANIFEST = _chunkYI6FKTTNcjs.FARM_CRON_MANIFEST; exports.applyFarmCronVercelCrons = _chunkYI6FKTTNcjs.applyFarmCronVercelCrons; exports.createFarmCronCloudflareConfig = _chunkYI6FKTTNcjs.createFarmCronCloudflareConfig; exports.createFarmCronCloudflareTriggers = _chunkYI6FKTTNcjs.createFarmCronCloudflareTriggers; exports.createFarmCronManifest = _chunkYI6FKTTNcjs.createFarmCronManifest; exports.createFarmCronVercelCrons = _chunkYI6FKTTNcjs.createFarmCronVercelCrons; exports.cronRoute = _chunkYI6FKTTNcjs.cronRoute; exports.isCronRequestAuthorized = _chunkYI6FKTTNcjs.isCronRequestAuthorized; exports.mergeScheduledTasks = _chunkYI6FKTTNcjs.mergeScheduledTasks; exports.prepareFarmCronForNitro = _chunkYI6FKTTNcjs.prepareFarmCronForNitro; exports.resolveCronConfig = _chunkYI6FKTTNcjs.resolveCronConfig;
package/dist/cron.d.mts CHANGED
@@ -1,3 +1,6 @@
1
+ import { T as TypedEndpoint } from './endpoint.d-BkMSCRf6.mjs';
2
+ import './cache.mjs';
3
+
1
4
  type FarmCronSchedule = string | string[];
2
5
  interface FarmCronJobConfig {
3
6
  /** Portable five-field cron expression, or a list of expressions. */
@@ -73,6 +76,13 @@ declare function createFarmCronCloudflareTriggers(jobs: FarmCronJob[]): string[]
73
76
  declare function createFarmCronCloudflareConfig(jobs: FarmCronJob[]): FarmCronCloudflareConfig | undefined;
74
77
  declare function mergeScheduledTasks(...maps: Array<Record<string, string | string[]> | undefined>): Record<string, string | string[]>;
75
78
  declare function isCronRequestAuthorized(request: Request, options?: FarmCronRouteOptions): boolean;
79
+ /** A `createEndpoint()` result: Farm's route runtime calls `__handler` with the parsed context. */
80
+ type FarmCronEndpoint = TypedEndpoint<any, any, any, any, any, any, any, any>;
81
+ /**
82
+ * Guards an API route so only the scheduler can call it: a `createEndpoint()` result, which keeps its
83
+ * validation, types and metadata, or a plain handler that receives the `Request`.
84
+ */
85
+ declare function cronRoute<TEndpoint extends FarmCronEndpoint>(endpoint: TEndpoint, options?: FarmCronRouteOptions): TEndpoint;
76
86
  declare function cronRoute<TArgs extends unknown[], TResult>(handler: (request: Request, ...args: TArgs) => TResult, options?: FarmCronRouteOptions): (request: Request, ...args: TArgs) => TResult | Promise<Response>;
77
87
 
78
88
  export { DEFAULT_FARM_CRON_SECRET_ENV, FARM_CRON_MANIFEST, type FarmCronCloudflareConfig, type FarmCronJob, type FarmCronJobConfig, type FarmCronResolvedConfig, type FarmCronRouteOptions, type FarmCronSchedule, type FarmCronUserConfig, type PreparedFarmCron, applyFarmCronVercelCrons, createFarmCronCloudflareConfig, createFarmCronCloudflareTriggers, createFarmCronManifest, createFarmCronVercelCrons, cronRoute, isCronRequestAuthorized, mergeScheduledTasks, prepareFarmCronForNitro, resolveCronConfig };
package/dist/cron.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { T as TypedEndpoint } from './endpoint.d-BgHn0lhl.js';
2
+ import './cache.js';
3
+
1
4
  type FarmCronSchedule = string | string[];
2
5
  interface FarmCronJobConfig {
3
6
  /** Portable five-field cron expression, or a list of expressions. */
@@ -73,6 +76,13 @@ declare function createFarmCronCloudflareTriggers(jobs: FarmCronJob[]): string[]
73
76
  declare function createFarmCronCloudflareConfig(jobs: FarmCronJob[]): FarmCronCloudflareConfig | undefined;
74
77
  declare function mergeScheduledTasks(...maps: Array<Record<string, string | string[]> | undefined>): Record<string, string | string[]>;
75
78
  declare function isCronRequestAuthorized(request: Request, options?: FarmCronRouteOptions): boolean;
79
+ /** A `createEndpoint()` result: Farm's route runtime calls `__handler` with the parsed context. */
80
+ type FarmCronEndpoint = TypedEndpoint<any, any, any, any, any, any, any, any>;
81
+ /**
82
+ * Guards an API route so only the scheduler can call it: a `createEndpoint()` result, which keeps its
83
+ * validation, types and metadata, or a plain handler that receives the `Request`.
84
+ */
85
+ declare function cronRoute<TEndpoint extends FarmCronEndpoint>(endpoint: TEndpoint, options?: FarmCronRouteOptions): TEndpoint;
76
86
  declare function cronRoute<TArgs extends unknown[], TResult>(handler: (request: Request, ...args: TArgs) => TResult, options?: FarmCronRouteOptions): (request: Request, ...args: TArgs) => TResult | Promise<Response>;
77
87
 
78
88
  export { DEFAULT_FARM_CRON_SECRET_ENV, FARM_CRON_MANIFEST, type FarmCronCloudflareConfig, type FarmCronJob, type FarmCronJobConfig, type FarmCronResolvedConfig, type FarmCronRouteOptions, type FarmCronSchedule, type FarmCronUserConfig, type PreparedFarmCron, applyFarmCronVercelCrons, createFarmCronCloudflareConfig, createFarmCronCloudflareTriggers, createFarmCronManifest, createFarmCronVercelCrons, cronRoute, isCronRequestAuthorized, mergeScheduledTasks, prepareFarmCronForNitro, resolveCronConfig };
package/dist/cron.mjs CHANGED
@@ -11,10 +11,10 @@ import {
11
11
  mergeScheduledTasks,
12
12
  prepareFarmCronForNitro,
13
13
  resolveCronConfig
14
- } from "./chunk-X3JNB2TB.mjs";
14
+ } from "./chunk-3PX4AIXO.mjs";
15
15
  import "./chunk-WXFY5JIY.mjs";
16
16
  import "./chunk-YP7YO3S3.mjs";
17
- import "./chunk-Y3N5BFRJ.mjs";
17
+ import "./chunk-JSDV2NUN.mjs";
18
18
  import "./chunk-H3ASZDT7.mjs";
19
19
  import "./chunk-OHWM2VI4.mjs";
20
20
  import "./chunk-AYP2YFVN.mjs";
@@ -1,5 +1,5 @@
1
- import { R as ResolvedFarmDesktopConfig } from './client-plugins.d-DllmH8eM.mjs';
2
- export { b as FarmDesktopConfigInput, c as FarmDesktopContext, d as FarmDesktopUserConfig, e as FarmDesktopWindowConfig } from './client-plugins.d-DllmH8eM.mjs';
1
+ import { R as ResolvedFarmDesktopConfig } from './client-plugins.d-CgQQ-EAv.mjs';
2
+ export { b as FarmDesktopConfigInput, c as FarmDesktopContext, d as FarmDesktopUserConfig, e as FarmDesktopWindowConfig } from './client-plugins.d-CgQQ-EAv.mjs';
3
3
  import './lifecycle.d-C2aLBOwu.mjs';
4
4
  import './route.d-BaVH3V0w.mjs';
5
5
  import './endpoint.d-BkMSCRf6.mjs';
@@ -29,7 +29,7 @@ import 'rolldown/utils';
29
29
  import 'rolldown';
30
30
  import './image-config.d-CeDgNyX4.mjs';
31
31
  import './types.d-C41ePjvP.mjs';
32
- import './config.d-DqKaCr1r.mjs';
32
+ import './config.d-DqZkLwef.mjs';
33
33
  import './types.d-DQnyD3VD.mjs';
34
34
  import './font.mjs';
35
35
 
package/dist/desktop.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ResolvedFarmDesktopConfig } from './client-plugins.d-n3iWY1EJ.js';
2
- export { b as FarmDesktopConfigInput, c as FarmDesktopContext, d as FarmDesktopUserConfig, e as FarmDesktopWindowConfig } from './client-plugins.d-n3iWY1EJ.js';
1
+ import { R as ResolvedFarmDesktopConfig } from './client-plugins.d-vXrbcfJ1.js';
2
+ export { b as FarmDesktopConfigInput, c as FarmDesktopContext, d as FarmDesktopUserConfig, e as FarmDesktopWindowConfig } from './client-plugins.d-vXrbcfJ1.js';
3
3
  import './lifecycle.d-C2aLBOwu.js';
4
4
  import './route.d-DBTEqifW.js';
5
5
  import './endpoint.d-BgHn0lhl.js';
@@ -29,7 +29,7 @@ import 'rolldown/utils';
29
29
  import 'rolldown';
30
30
  import './image-config.d-CeDgNyX4.js';
31
31
  import './types.d-C41ePjvP.js';
32
- import './config.d-DqKaCr1r.js';
32
+ import './config.d-DqZkLwef.js';
33
33
  import './types.d-DQnyD3VD.js';
34
34
  import './font.js';
35
35