@farm.js/core 0.1.34 → 0.1.36

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 (282) hide show
  1. package/dist/agent-mcp-BVExL8rZ.d.mts +109 -0
  2. package/dist/agent-mcp-handler-LPJ2CADR.mjs +19 -0
  3. package/dist/agent-mcp-handler-SJAHFSPI.cjs +19 -0
  4. package/dist/agent-mcp-luzfXK-P.d.ts +109 -0
  5. package/dist/agent-runtime.cjs +5 -3
  6. package/dist/agent-runtime.d.mts +4 -5
  7. package/dist/agent-runtime.d.ts +4 -5
  8. package/dist/agent-runtime.mjs +4 -2
  9. package/dist/api/route-manager.cjs +7 -7
  10. package/dist/api/route-manager.d.mts +15 -10
  11. package/dist/api/route-manager.d.ts +15 -10
  12. package/dist/api/route-manager.mjs +6 -6
  13. package/dist/api/runtime.cjs +7 -5
  14. package/dist/api/runtime.d.mts +7 -66
  15. package/dist/api/runtime.d.ts +7 -66
  16. package/dist/api/runtime.mjs +7 -5
  17. package/dist/api.cjs +9 -9
  18. package/dist/api.d.mts +8 -9
  19. package/dist/api.d.ts +8 -9
  20. package/dist/api.mjs +8 -8
  21. package/dist/{app-q4rmZlXK.d.mts → app-BukwkFIu.d.mts} +52 -12
  22. package/dist/{app-DgotYGbq.d.ts → app-Yfa2dsFy.d.ts} +52 -12
  23. package/dist/app-markdown.cjs +6 -6
  24. package/dist/app-markdown.d.mts +5 -6
  25. package/dist/app-markdown.d.ts +5 -6
  26. package/dist/app-markdown.mjs +5 -5
  27. package/dist/{chunk-XV5DJTBX.mjs → chunk-276VJSM6.mjs} +627 -260
  28. package/dist/{chunk-36MK5YCW.cjs → chunk-2YTDKNH3.cjs} +547 -240
  29. package/dist/{chunk-VHANUNEG.mjs → chunk-35GKZR22.mjs} +2 -2
  30. package/dist/{chunk-LR5QSC2P.mjs → chunk-35WV46VL.mjs} +399 -92
  31. package/dist/{chunk-UX5S4JEO.cjs → chunk-42NHY7HW.cjs} +57 -7
  32. package/dist/{chunk-U4PTAHW3.mjs → chunk-4E5AEDKY.mjs} +7 -11
  33. package/dist/{chunk-NGVORZVZ.mjs → chunk-4E5WBPEG.mjs} +73 -351
  34. package/dist/{chunk-AQZFOP7S.mjs → chunk-4GLOOWKE.mjs} +5 -5
  35. package/dist/{chunk-7BT4H4P7.cjs → chunk-4NU4GGTC.cjs} +2 -2
  36. package/dist/{chunk-AGC75XAE.mjs → chunk-4WCZJQUO.mjs} +55 -5
  37. package/dist/chunk-4WQ6PGSJ.cjs +367 -0
  38. package/dist/{chunk-QCFFHV5H.mjs → chunk-4WVJLURN.mjs} +1 -1
  39. package/dist/chunk-6SJ2KJTA.mjs +314 -0
  40. package/dist/chunk-75RZHGLS.cjs +135 -0
  41. package/dist/{chunk-P64MIF5B.cjs → chunk-ADEA7PN3.cjs} +483 -60
  42. package/dist/{chunk-YQVSHTMR.mjs → chunk-AJQTP4OO.mjs} +1 -1
  43. package/dist/{chunk-TA5G2HWD.cjs → chunk-AO6RYU5N.cjs} +31 -28
  44. package/dist/{chunk-MOKLYNHV.cjs → chunk-BO36SELV.cjs} +6 -6
  45. package/dist/{chunk-7Y6ZNFPX.mjs → chunk-BPOF5U4N.mjs} +17 -7
  46. package/dist/{chunk-JHWOVJ3M.mjs → chunk-BUGNQIHC.mjs} +5 -0
  47. package/dist/{chunk-TDFPACVX.cjs → chunk-CBJJH36A.cjs} +50 -25
  48. package/dist/{chunk-VKNHTSAP.cjs → chunk-CGBDNNSM.cjs} +2 -2
  49. package/dist/chunk-CI6E3UOH.cjs +314 -0
  50. package/dist/{chunk-QZCT2CQ4.mjs → chunk-CXEN47J3.mjs} +64 -2
  51. package/dist/{chunk-ATK2R4CH.cjs → chunk-D227TIEN.cjs} +14 -4
  52. package/dist/{chunk-QGYRXFU2.cjs → chunk-D2BB47NB.cjs} +8 -8
  53. package/dist/chunk-DTSROJ5J.mjs +367 -0
  54. package/dist/{chunk-ODBZYBAB.cjs → chunk-DZ5ZVB2K.cjs} +1 -1
  55. package/dist/{chunk-ROUTX2E5.cjs → chunk-ECKF2BAM.cjs} +18 -5
  56. package/dist/{chunk-3LUF2PE2.cjs → chunk-EK4QAEFZ.cjs} +67 -5
  57. package/dist/{chunk-VVBO3QH7.mjs → chunk-ENLZ4R3Y.mjs} +10 -1
  58. package/dist/{chunk-XXJU7FCC.cjs → chunk-EUV4YR3V.cjs} +2 -2
  59. package/dist/{chunk-HR5KPHC2.mjs → chunk-EWET4D2Y.mjs} +1 -1
  60. package/dist/{chunk-PXKIEXZD.mjs → chunk-F5QO4FNE.mjs} +1 -1
  61. package/dist/{chunk-MIDIZJZC.cjs → chunk-FO427P6I.cjs} +22 -12
  62. package/dist/{chunk-AWC4VUZL.cjs → chunk-GQ3Z3IZI.cjs} +14 -14
  63. package/dist/{chunk-JDPAKVS4.mjs → chunk-GQRWBCWK.mjs} +8 -5
  64. package/dist/{chunk-75WGQVQA.cjs → chunk-HITLGIAO.cjs} +10 -1
  65. package/dist/{chunk-WNNYOOIB.mjs → chunk-HOXTWRGB.mjs} +1 -1
  66. package/dist/{chunk-KROWKCUH.cjs → chunk-JGLC4TO3.cjs} +8 -1
  67. package/dist/{chunk-QJ3J6MZT.cjs → chunk-JNUWCDTF.cjs} +8 -8
  68. package/dist/{chunk-BTAG7LI7.cjs → chunk-JZVADIOD.cjs} +2 -2
  69. package/dist/{chunk-EM6SBQKM.cjs → chunk-KIIMAWOJ.cjs} +37 -2
  70. package/dist/{chunk-43FMW62B.mjs → chunk-KMTGADN3.mjs} +28 -0
  71. package/dist/{chunk-GOABMOX3.mjs → chunk-LSZAVSGY.mjs} +468 -45
  72. package/dist/{chunk-2NQQ5H5G.cjs → chunk-M7MKQXAF.cjs} +2 -1
  73. package/dist/{chunk-GNSDTTWZ.mjs → chunk-MKYBIIAQ.mjs} +30 -5
  74. package/dist/{chunk-ZHPHJPQP.cjs → chunk-MRMI32SN.cjs} +88 -366
  75. package/dist/{chunk-7M52YUMY.cjs → chunk-N2NAS2AM.cjs} +2 -2
  76. package/dist/{chunk-SJVKK4JE.cjs → chunk-NMHWYWDR.cjs} +1144 -777
  77. package/dist/chunk-NRDBW4MP.mjs +45 -0
  78. package/dist/{chunk-657WJNRY.mjs → chunk-O6I6VWKK.mjs} +20 -5
  79. package/dist/{chunk-O27L4YAA.mjs → chunk-O6WAEAX3.mjs} +2 -2
  80. package/dist/chunk-OFZUJMCU.mjs +601 -0
  81. package/dist/{chunk-ZKP7C2B6.mjs → chunk-OHLSEQ57.mjs} +22 -13
  82. package/dist/{chunk-X242HVD5.mjs → chunk-OO7GXVSR.mjs} +1 -1
  83. package/dist/chunk-PTZ2TVNE.cjs +178 -0
  84. package/dist/{chunk-3ATMYLLJ.mjs → chunk-Q2KB32T4.mjs} +1 -1
  85. package/dist/{chunk-LHODW25H.mjs → chunk-QORUJDIV.mjs} +2 -2
  86. package/dist/{chunk-UBO4SGH4.mjs → chunk-RHAZ22ZN.mjs} +2 -1
  87. package/dist/{chunk-G26MUMKL.cjs → chunk-S6VYG6XU.cjs} +23 -8
  88. package/dist/{chunk-6VVL3MHY.mjs → chunk-SC2WYWPF.mjs} +1 -1
  89. package/dist/{chunk-MPEYMSCF.cjs → chunk-SDOTRX3V.cjs} +5 -5
  90. package/dist/{chunk-BMWDEBXO.cjs → chunk-SHLXACIO.cjs} +31 -3
  91. package/dist/{chunk-LMJ7VRHZ.mjs → chunk-T4OGRVNS.mjs} +13 -3
  92. package/dist/{chunk-T5CERMEH.cjs → chunk-T5OJPTVN.cjs} +2 -2
  93. package/dist/{chunk-Z2YLTERK.cjs → chunk-TE2G5ION.cjs} +6 -6
  94. package/dist/chunk-UH6QN5NL.mjs +178 -0
  95. package/dist/{chunk-PQDFUSXD.cjs → chunk-UVW64BCB.cjs} +44 -35
  96. package/dist/{chunk-VCCUOMQN.mjs → chunk-VILIPRS6.mjs} +1 -1
  97. package/dist/{chunk-A5FGU2WU.cjs → chunk-VQLJWDVW.cjs} +19 -23
  98. package/dist/{chunk-VPTDD5XF.cjs → chunk-WBKEZXWE.cjs} +5 -0
  99. package/dist/{chunk-K3F2E6GS.cjs → chunk-WC5UV2HQ.cjs} +2 -2
  100. package/dist/chunk-WWFTAUFG.cjs +45 -0
  101. package/dist/{chunk-ZUSJDQ2Q.mjs → chunk-WWIKMBRN.mjs} +1 -1
  102. package/dist/{chunk-3VSKDFAT.mjs → chunk-WZ77PUAM.mjs} +1 -1
  103. package/dist/{chunk-CLJYVZAD.mjs → chunk-XCMCS4DA.mjs} +11 -1
  104. package/dist/{chunk-F6OHXPWR.mjs → chunk-YFILVET3.mjs} +8 -1
  105. package/dist/{chunk-DZ4DTRJ5.cjs → chunk-YKX5BK66.cjs} +7 -7
  106. package/dist/chunk-YSLWRWWP.cjs +601 -0
  107. package/dist/{chunk-LI2LMOLR.mjs → chunk-YWMZUGIS.mjs} +18 -5
  108. package/dist/chunk-ZLAT2CWY.mjs +135 -0
  109. package/dist/{chunk-XF7Q24PF.mjs → chunk-ZMMBIVQM.mjs} +35 -0
  110. package/dist/{chunk-U74I55WB.cjs → chunk-ZWM5KGAA.cjs} +19 -9
  111. package/dist/{client-plugins-CLObcuCq.d.mts → client-plugins-C3mK9Pol.d.mts} +300 -7
  112. package/dist/{client-plugins-DZjHC4Mi.d.ts → client-plugins-r1mOtSC1.d.ts} +300 -7
  113. package/dist/client-plugins.d.mts +4 -5
  114. package/dist/client-plugins.d.ts +4 -5
  115. package/dist/client.cjs +5 -5
  116. package/dist/client.d.mts +8 -9
  117. package/dist/client.d.ts +8 -9
  118. package/dist/client.mjs +4 -4
  119. package/dist/config.d.mts +4 -5
  120. package/dist/config.d.ts +4 -5
  121. package/dist/{devtools-RNXCTS4R.mjs → devtools-ERIKFEXX.mjs} +11 -10
  122. package/dist/{devtools-HU6Y2MNV.cjs → devtools-JZJJY5CK.cjs} +12 -11
  123. package/dist/docs.cjs +15 -14
  124. package/dist/docs.d.mts +41 -4
  125. package/dist/docs.d.ts +41 -4
  126. package/dist/docs.mjs +14 -13
  127. package/dist/i18n/client.d.mts +2 -2
  128. package/dist/i18n/client.d.ts +2 -2
  129. package/dist/i18n/index.d.mts +3 -3
  130. package/dist/i18n/index.d.ts +3 -3
  131. package/dist/i18n/server.d.mts +5 -5
  132. package/dist/i18n/server.d.ts +5 -5
  133. package/dist/image/server.cjs +3 -3
  134. package/dist/image/server.mjs +2 -2
  135. package/dist/image/sharp.cjs +10 -10
  136. package/dist/image/sharp.mjs +2 -2
  137. package/dist/{index-a-8Z5kZU.d.mts → index-BJJfLxJo.d.mts} +2 -2
  138. package/dist/{index-BWVfxIsO.d.ts → index-CwoOP-MW.d.ts} +2 -2
  139. package/dist/index.cjs +51 -44
  140. package/dist/index.d.mts +20 -21
  141. package/dist/index.d.ts +20 -21
  142. package/dist/index.mjs +50 -43
  143. package/dist/integrations.cjs +7 -3
  144. package/dist/integrations.d.mts +4 -5
  145. package/dist/integrations.d.ts +4 -5
  146. package/dist/integrations.mjs +6 -2
  147. package/dist/internal/app-markdown-runtime.cjs +5 -5
  148. package/dist/internal/app-markdown-runtime.d.mts +5 -6
  149. package/dist/internal/app-markdown-runtime.d.ts +5 -6
  150. package/dist/internal/app-markdown-runtime.mjs +4 -4
  151. package/dist/internal/build-runtime.cjs +32 -30
  152. package/dist/internal/build-runtime.d.mts +6 -7
  153. package/dist/internal/build-runtime.d.ts +6 -7
  154. package/dist/internal/build-runtime.mjs +31 -29
  155. package/dist/internal/cli-runtime.cjs +17 -16
  156. package/dist/internal/cli-runtime.mjs +16 -15
  157. package/dist/internal/client-error-overlay.cjs +6 -6
  158. package/dist/internal/client-error-overlay.mjs +2 -2
  159. package/dist/internal/client-runtime.cjs +2 -2
  160. package/dist/internal/client-runtime.mjs +1 -1
  161. package/dist/internal/compression-runtime.d.mts +4 -5
  162. package/dist/internal/compression-runtime.d.ts +4 -5
  163. package/dist/internal/config-runtime.cjs +12 -11
  164. package/dist/internal/config-runtime.d.mts +5 -6
  165. package/dist/internal/config-runtime.d.ts +5 -6
  166. package/dist/internal/config-runtime.mjs +11 -10
  167. package/dist/internal/isolated-boundary.cjs +3 -2
  168. package/dist/internal/isolated-boundary.d.mts +1 -1
  169. package/dist/internal/isolated-boundary.d.ts +1 -1
  170. package/dist/internal/isolated-boundary.mjs +2 -1
  171. package/dist/internal/metadata-image-runtime.cjs +3 -3
  172. package/dist/internal/metadata-image-runtime.mjs +2 -2
  173. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  174. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  175. package/dist/internal/production-runtime.cjs +63 -25
  176. package/dist/internal/production-runtime.d.mts +117 -37
  177. package/dist/internal/production-runtime.d.ts +117 -37
  178. package/dist/internal/production-runtime.mjs +65 -27
  179. package/dist/internal/server-tree.cjs +12 -0
  180. package/dist/internal/server-tree.d.mts +27 -0
  181. package/dist/internal/server-tree.d.ts +27 -0
  182. package/dist/internal/server-tree.mjs +12 -0
  183. package/dist/{layers-BRQF5ETU.mjs → layers-UTB43B7A.mjs} +1 -1
  184. package/dist/layers-VUWIOFEO.cjs +18 -0
  185. package/dist/markdown.cjs +4 -4
  186. package/dist/markdown.d.mts +4 -5
  187. package/dist/markdown.d.ts +4 -5
  188. package/dist/markdown.mjs +3 -3
  189. package/dist/middleware.cjs +7 -7
  190. package/dist/middleware.d.mts +6 -7
  191. package/dist/middleware.d.ts +6 -7
  192. package/dist/middleware.mjs +6 -6
  193. package/dist/navigation.cjs +5 -5
  194. package/dist/navigation.d.mts +7 -8
  195. package/dist/navigation.d.ts +7 -8
  196. package/dist/navigation.mjs +4 -4
  197. package/dist/{nitro-HSAQFXSS.cjs → nitro-7F65EZZS.cjs} +3 -3
  198. package/dist/{nitro-4XGPNIK4.mjs → nitro-MPZJGPXK.mjs} +2 -2
  199. package/dist/{observability-BupkiN0m.d.mts → observability-CoXunYhS.d.mts} +4 -3
  200. package/dist/{observability-BupkiN0m.d.ts → observability-CoXunYhS.d.ts} +4 -3
  201. package/dist/observability.d.mts +1 -1
  202. package/dist/observability.d.ts +1 -1
  203. package/dist/plugin.cjs +28 -26
  204. package/dist/plugin.d.mts +4 -5
  205. package/dist/plugin.d.ts +4 -5
  206. package/dist/plugin.mjs +27 -25
  207. package/dist/{production-runtime-CysZl3EV.d.mts → production-runtime-CCeVZXst.d.mts} +4 -4
  208. package/dist/{production-runtime-BU5ETAK9.d.ts → production-runtime-DPnsggY3.d.ts} +4 -4
  209. package/dist/query/client.cjs +6 -6
  210. package/dist/query/client.mjs +2 -2
  211. package/dist/{render-plan-CKr4ltOd.d.mts → render-plan-BuGaPFe6.d.mts} +1 -1
  212. package/dist/{render-plan-D72O1qm4.d.ts → render-plan-Cw4f5E_R.d.ts} +1 -1
  213. package/dist/renderer/react/server.cjs +10 -4
  214. package/dist/renderer/react/server.d.mts +2 -1
  215. package/dist/renderer/react/server.d.ts +2 -1
  216. package/dist/renderer/react/server.mjs +7 -1
  217. package/dist/renderer-client.cjs +5 -5
  218. package/dist/renderer-client.d.mts +6 -7
  219. package/dist/renderer-client.d.ts +6 -7
  220. package/dist/renderer-client.mjs +2 -2
  221. package/dist/renderer.d.mts +2 -0
  222. package/dist/renderer.d.ts +2 -0
  223. package/dist/{request-DbyOYI2j.d.ts → request-Bkg-hERy.d.ts} +1 -1
  224. package/dist/{request-Be83WafN.d.mts → request-CsGARcAw.d.mts} +1 -1
  225. package/dist/request.d.mts +5 -6
  226. package/dist/request.d.ts +5 -6
  227. package/dist/{resolver-PPEeiJ6M.d.ts → resolver-DadfRL6F.d.ts} +1 -1
  228. package/dist/{resolver-DhW0CqZN.d.mts → resolver-khasx3fU.d.mts} +1 -1
  229. package/dist/{route-rendering-CtVMpV-k.d.ts → route-rendering-BUZMH_64.d.ts} +1 -1
  230. package/dist/{route-rendering-BG56SzvJ.d.mts → route-rendering-f11yh5dp.d.mts} +1 -1
  231. package/dist/{router-D94-SDlW.d.ts → router-B8CR9GbD.d.ts} +1 -1
  232. package/dist/{router-ALUvm8gC.d.mts → router-Cp6yRE8A.d.mts} +1 -1
  233. package/dist/routes.d.mts +4 -5
  234. package/dist/routes.d.ts +4 -5
  235. package/dist/{runtime-BirxPwbZ.d.ts → runtime-BgDQzBiu.d.ts} +2 -2
  236. package/dist/runtime-CAEv36S_.d.mts +69 -0
  237. package/dist/runtime-CQVsT330.d.ts +69 -0
  238. package/dist/{runtime-AOJge4vQ.d.mts → runtime-CV2UCV-5.d.mts} +2 -2
  239. package/dist/server-action-security.cjs +3 -3
  240. package/dist/server-action-security.mjs +2 -2
  241. package/dist/server-fn.cjs +4 -4
  242. package/dist/server-fn.mjs +3 -3
  243. package/dist/server-plugins.d.mts +5 -6
  244. package/dist/server-plugins.d.ts +5 -6
  245. package/dist/server-query.cjs +5 -5
  246. package/dist/server-query.mjs +4 -4
  247. package/dist/server.cjs +47 -45
  248. package/dist/server.d.mts +13 -14
  249. package/dist/server.d.ts +13 -14
  250. package/dist/server.mjs +30 -28
  251. package/dist/{spa-router-CxK3USIz.d.ts → spa-router-BuciWGCZ.d.ts} +3 -3
  252. package/dist/{spa-router-DbxNRKOB.d.mts → spa-router-DwbqGkGj.d.mts} +3 -3
  253. package/dist/testing.cjs +9 -9
  254. package/dist/testing.d.mts +4 -5
  255. package/dist/testing.d.ts +4 -5
  256. package/dist/testing.mjs +7 -7
  257. package/dist/{types-Z0aotQ8w.d.mts → types-CnH8DOqo.d.mts} +1 -1
  258. package/dist/{types-Z0aotQ8w.d.ts → types-CnH8DOqo.d.ts} +1 -1
  259. package/dist/{utils-4wVRcpOw.d.mts → utils-B9V0S_yL.d.mts} +1 -1
  260. package/dist/{utils-311Y8eoK.d.ts → utils-CaoWKtYM.d.ts} +1 -1
  261. package/dist/version.cjs +2 -2
  262. package/dist/version.mjs +1 -1
  263. package/dist/vite.cjs +28 -26
  264. package/dist/vite.d.mts +4 -5
  265. package/dist/vite.d.ts +4 -5
  266. package/dist/vite.mjs +27 -25
  267. package/dist/{workflows-CR9ex-gz.d.ts → workflows-jZ4BcdoZ.d.mts} +1 -1
  268. package/dist/{workflows-CR9ex-gz.d.mts → workflows-jZ4BcdoZ.d.ts} +1 -1
  269. package/dist/workflows.cjs +3 -3
  270. package/dist/workflows.d.mts +1 -1
  271. package/dist/workflows.d.ts +1 -1
  272. package/dist/workflows.mjs +2 -2
  273. package/package.json +9 -1
  274. package/dist/chunk-M64YUMA4.cjs +0 -58
  275. package/dist/chunk-QLQ32WC4.mjs +0 -58
  276. package/dist/layers-4PNE2HOY.cjs +0 -18
  277. package/dist/metadata-2HSU2i_w.d.mts +0 -52
  278. package/dist/metadata-Cjs8JMRM.d.ts +0 -52
  279. package/dist/types-DFbjpjXX.d.mts +0 -105
  280. package/dist/types-DFbjpjXX.d.ts +0 -105
  281. package/dist/{chunk-2F2ER724.cjs → chunk-BPMATOP2.cjs} +2 -2
  282. package/dist/{chunk-IHNMMXHV.mjs → chunk-OTC5BDGO.mjs} +3 -3
@@ -1,23 +1,24 @@
1
1
  export { _runWithAfterRequest } from '../after.mjs';
2
- import { aE as FarmMCPCatalogDetails, aO as APIRequestRuntime, aP as ResolvedFarmMCPConfig, J as FarmConfig, $ as FarmContextFactoryInput } from '../client-plugins-CLObcuCq.mjs';
3
- export { aY as FarmLlmsTxtUserConfig, aZ as ResolvedFarmLlmsTxtConfig, b2 as applyFarmCspNonceToResponse, aS as collectFarmLlmsTxtPages, aR as createFarmAgentRobots, aT as createFarmDefaultLlmsTxt, aW as createFarmLlmsFullRenderer, aU as createFarmLlmsMarkdownReader, aQ as createFarmMetadataRouteResponse, g as getFarmRedirectError, i as isFarmNotFoundError, b as isFarmRedirectError, a_ as manageFarmDocumentPreloads, a$ as manageFarmHtmlPreloads, b0 as manageFarmLinkHeaderPreloads, aV as renderFarmLlmsFullTxt, b1 as reportFarmPreloadWarnings, aX as resolveFarmLlmsTxtConfig, b3 as resolveFarmSecurityConfig } from '../client-plugins-CLObcuCq.mjs';
4
- export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-BG56SzvJ.mjs';
5
- import { R as ResolvedFarmServerConfig } from '../workflows-CR9ex-gz.mjs';
6
- export { a as FarmServerConfig, b as bufferFarmRequestBody, c as cloneFarmRequestWithContext, d as createFarmNodeRequestAbortSignal, e as createFarmRequestBodyErrorResponse, m as matchesFarmIfNoneMatch, r as readFarmRequestBody, f as readNodeRequestBody, g as resolveFarmServerConfig } from '../workflows-CR9ex-gz.mjs';
7
- export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-Be83WafN.mjs';
2
+ import { aJ as FarmMCPCatalogDetails, fN as APIRequestRuntime, bT as ResolvedFarmMCPConfig, aE as FarmMCPServerRegistration, fO as FarmLlmsTxtLink, I as FarmConfig, _ as FarmContextFactoryInput } from '../client-plugins-C3mK9Pol.mjs';
3
+ export { fY as FarmLlmsTxtUserConfig, fZ as ResolvedFarmLlmsTxtConfig, g2 as applyFarmCspNonceToResponse, fS as collectFarmLlmsTxtPages, fQ as createFarmAgentRobots, fT as createFarmDefaultLlmsTxt, fR as createFarmDefaultSitemap, fW as createFarmLlmsFullRenderer, fU as createFarmLlmsMarkdownReader, fP as createFarmMetadataRouteResponse, g as getFarmRedirectError, i as isFarmNotFoundError, b as isFarmRedirectError, f_ as manageFarmDocumentPreloads, f$ as manageFarmHtmlPreloads, g0 as manageFarmLinkHeaderPreloads, aI as registerFarmMCPServer, fV as renderFarmLlmsFullTxt, g1 as reportFarmPreloadWarnings, fX as resolveFarmLlmsTxtConfig, g3 as resolveFarmSecurityConfig } from '../client-plugins-C3mK9Pol.mjs';
4
+ export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-f11yh5dp.mjs';
5
+ import { R as ResolvedFarmServerConfig } from '../workflows-jZ4BcdoZ.mjs';
6
+ export { a as FarmServerConfig, y as bufferFarmRequestBody, z as cloneFarmRequestWithContext, A as createFarmNodeRequestAbortSignal, B as createFarmRequestBodyErrorResponse, C as matchesFarmIfNoneMatch, E as readFarmRequestBody, G as readNodeRequestBody, H as resolveFarmServerConfig } from '../workflows-jZ4BcdoZ.mjs';
7
+ export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-CsGARcAw.mjs';
8
8
  export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.mjs';
9
- import { g as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-Z0aotQ8w.mjs';
10
- export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-DhW0CqZN.mjs';
11
- import { F as FarmLocalePathConfig } from '../index-a-8Z5kZU.mjs';
12
- export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-a-8Z5kZU.mjs';
13
- export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, m as mergeMetadata, r as renderMetadataHead, c as resolveFarmNotFoundMetadata } from '../metadata-2HSU2i_w.mjs';
14
- export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-CysZl3EV.mjs';
15
- export { c as configureFarmObservability, e as emitFarmEvent, r as runWithFarmRequestSpan } from '../observability-BupkiN0m.mjs';
9
+ import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-CnH8DOqo.mjs';
10
+ export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-khasx3fU.mjs';
11
+ import { F as FarmLocalePathConfig } from '../index-BJJfLxJo.mjs';
12
+ export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-BJJfLxJo.mjs';
13
+ import { F as FarmDefaultMCPPage } from '../agent-mcp-BVExL8rZ.mjs';
14
+ export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, g as collectFarmDefaultMCPPages, m as mergeMetadata, d as mergeModuleViewport, r as renderMetadataHead, e as renderViewportHead, h as resolveFarmDefaultMCPServer, f as resolveFarmNotFoundMetadata } from '../agent-mcp-BVExL8rZ.mjs';
15
+ export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner } from '../production-runtime-CCeVZXst.mjs';
16
+ export { L as configureFarmObservability, P as emitFarmEvent, Q as runWithFarmRequestSpan } from '../observability-CoXunYhS.mjs';
16
17
  export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.mjs';
17
18
  export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.mjs';
18
19
  import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.mjs';
19
20
  export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.mjs';
20
- export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-4wVRcpOw.mjs';
21
+ export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-B9V0S_yL.mjs';
21
22
  import 'node:http';
22
23
  import '../lifecycle-DK06VuKP.mjs';
23
24
  import '../integration-api-0y4FXJpC.mjs';
@@ -35,7 +36,6 @@ import 'unstorage';
35
36
  import '../schema.mjs';
36
37
  import 'react';
37
38
  import '@farming-labs/orm';
38
- import '../types-DFbjpjXX.mjs';
39
39
  import '@farming-labs/docs';
40
40
  import 'vite';
41
41
  import '../cron.mjs';
@@ -62,18 +62,6 @@ interface FarmAppManifestWebMCPTool {
62
62
  inputSchemaSource: "literal" | "computed" | "none";
63
63
  }
64
64
 
65
- /**
66
- * `/.well-known/farmjs`: one document describing a Farm app, so tools can discover it
67
- * instead of each rebuilding the picture: Farm's version, renderer and packages, the app's
68
- * MCP servers with every tool (however it was defined) and its schemas, their resources and
69
- * prompts, its WebMCP browser tools, its integrations, its agent surfaces and its plugins.
70
- * Never environment values, settings or secrets.
71
- *
72
- * Development serves it to anyone on the dev server. Production answers only a request
73
- * signed for the app's Farm Infra key, so the public never reads the app's internals; any
74
- * other request gets a 404. Kept free of Node built-ins: Web Crypto only.
75
- */
76
-
77
65
  type FarmAppManifestToolSource = "endpoint" | "defineTool" | "serverFunction";
78
66
  interface FarmAppManifestTool {
79
67
  name: string;
@@ -81,7 +69,7 @@ interface FarmAppManifestTool {
81
69
  description?: string;
82
70
  /** How the app defined it: an API endpoint, `defineTool`, or a server function. */
83
71
  source: FarmAppManifestToolSource;
84
- /** The endpoint's method and route, for `source: "endpoint"`. */
72
+ /** The endpoint's method and route, for `source: "endpoint"`. Only in Farm Infra's view. */
85
73
  method?: string;
86
74
  path?: string;
87
75
  readOnlyHint?: boolean;
@@ -108,6 +96,11 @@ interface FarmAppManifest {
108
96
  name: string;
109
97
  version: string;
110
98
  path: string;
99
+ /**
100
+ * `"required"` when the server runs `authorize`: an anonymous client lists nothing,
101
+ * so the public view leaves `tools`, `resources` and `prompts` empty.
102
+ */
103
+ authorization: "none" | "required";
111
104
  tools: FarmAppManifestTool[];
112
105
  resources: NonNullable<ServerDetails["resources"]>;
113
106
  prompts: NonNullable<ServerDetails["prompts"]>;
@@ -142,18 +135,30 @@ interface FarmAppManifestInput {
142
135
  integrations: FarmAppManifest["integrations"];
143
136
  agent: FarmAppManifest["agent"];
144
137
  plugins: string[];
145
- /** `analytics: false` keeps the production manifest off: the app talks to no Farm Infra. */
138
+ /**
139
+ * `analytics: false` turns off Farm Infra's signed view: the app talks to no Farm Infra.
140
+ * The public manifest is still served; `agent.manifest: false` turns that off.
141
+ */
146
142
  analytics: boolean;
143
+ /**
144
+ * The default read-only MCP server (`agent.mcp`) while the app would serve it. Set by the
145
+ * server at runtime, not serialized: it answers only while no other MCP server is listed.
146
+ */
147
+ defaultMCP?: () => {
148
+ name: string;
149
+ version: string;
150
+ path: string;
151
+ } | undefined;
147
152
  }
148
153
  type Env = Record<string, string | undefined>;
149
154
  /**
150
- * Answers `/.well-known/farmjs`, or `null` to let the request go on as if Farm served nothing
151
- * there: methods other than GET and HEAD, and production apps not linked to Farm Infra.
155
+ * Answers `/.well-known/farmjs.json` for anyone. A request Farm Infra signed for the app's
156
+ * `FARMJS_API_KEY` gets the full view, unless `analytics` is off; any other read gets the
157
+ * public one.
152
158
  */
153
- declare function createFarmAppManifestResponse(request: Request, input: FarmAppManifestInput, options: {
154
- development: boolean;
159
+ declare function createFarmAppManifestResponse(request: Request, input: FarmAppManifestInput, options?: {
155
160
  env?: Env;
156
- }): Promise<Response | null>;
161
+ }): Promise<Response>;
157
162
 
158
163
  /**
159
164
  * Compare a caller-supplied secret against the configured one without leaking
@@ -170,10 +175,23 @@ declare function createFarmAppManifestResponse(request: Request, input: FarmAppM
170
175
  */
171
176
  declare function farmSecretsMatch(provided: string, expected: string): boolean;
172
177
 
173
- /** Internal: the production builder owns these immutable, depth-ordered descriptors. */
178
+ /**
179
+ * Internal: the production builder owns these immutable, depth-ordered descriptors.
180
+ *
181
+ * A layout's pattern is its directory, so a route group stays in it (`/(auth)`).
182
+ * The URL decides whether a layout covers a pathname; a layout inside a group also
183
+ * needs the selected page to sit in that group. `resolveRouteDirectory` finds that
184
+ * page's directory, and runs only when such a layout's URL matches.
185
+ */
174
186
  declare function createFarmLayoutSelector<T extends {
175
187
  pattern: string;
176
- }>(layouts: readonly T[]): (pathname: string) => T[];
188
+ }>(layouts: readonly T[], resolveRouteDirectory?: (pathname: string) => string | null | undefined): (pathname: string, routeDirectory?: string | null) => T[];
189
+
190
+ /**
191
+ * Whether a page directory sits inside a group scope. A null scope covers every page;
192
+ * a missing directory (no page matched) is inside no group.
193
+ */
194
+ declare function isInRouteGroupScope(directory: string | null | undefined, scope: string | null): boolean;
177
195
 
178
196
  type FarmProductionLifecycleState = "starting" | "ready" | "draining" | "failed" | "closed";
179
197
  interface FarmProductionLifecycleOptions {
@@ -259,6 +277,14 @@ interface FarmLocaleAlternateLinkOptions {
259
277
  */
260
278
  declare function renderFarmLocaleAlternateLinks(pathname: string, config: FarmLocalePathConfig, options?: FarmLocaleAlternateLinkOptions): string;
261
279
 
280
+ /**
281
+ * Start the head with `<meta charset>` and the viewport tags, as Next.js always renders both,
282
+ * skipping each one the layout's document already writes (a viewport, theme-color, or
283
+ * color-scheme tag of its own). The charset comes first because browsers only look for it in the
284
+ * document's first 1024 bytes. The production server uses this same function.
285
+ */
286
+ declare function ensureFarmDocumentMeta(markup: string, viewport?: string): string;
287
+
262
288
  /**
263
289
  * Runtime source that remounts the top-level `mcp` configuration in a built server.
264
290
  *
@@ -286,6 +312,60 @@ declare function _isFarmOwnedResponse(response: Response): boolean;
286
312
  */
287
313
  declare function _withFarmResponseHeaders(response: Response, edit: (headers: Headers) => void): Response;
288
314
 
315
+ /**
316
+ * The protocol side of the default MCP server (`agent.mcp`, see `agent-mcp.ts`): stateless
317
+ * Streamable HTTP with JSON responses, and three read-only tools over the app's public pages.
318
+ * A small JSON-RPC implementation rather than the MCP SDK, so apps that never receive an
319
+ * MCP request carry no SDK.
320
+ *
321
+ * Kept free of Node built-ins: the production server runs on edge runtimes too.
322
+ */
323
+
324
+ interface FarmDefaultMCPContext {
325
+ server: {
326
+ name: string;
327
+ version: string;
328
+ title?: string;
329
+ };
330
+ /** The app's public pages for this request's origin. */
331
+ listPages: () => FarmDefaultMCPPage[] | Promise<FarmDefaultMCPPage[]>;
332
+ /** Reads a Markdown URL anonymously; null when the page does not answer with Markdown. */
333
+ readMarkdown: (url: string) => Promise<string | null>;
334
+ basePath?: string;
335
+ }
336
+ /**
337
+ * Answers one request to the default MCP endpoint: stateless Streamable HTTP, JSON
338
+ * responses, no sessions, and no server-initiated stream (GET answers 405).
339
+ */
340
+ declare function handleFarmDefaultMCPRequest(request: Request, context: FarmDefaultMCPContext): Promise<Response>;
341
+
342
+ interface FarmAiCatalogInput {
343
+ /** The app's basePath; the catalog lives beneath it, like the API catalog. */
344
+ basePath?: string;
345
+ /** The app's public API path, which maps to Farm's canonical `/api`. */
346
+ apiServerBasePath?: string;
347
+ /**
348
+ * The default read-only server (`agent.mcp`), when this app would serve it. It is
349
+ * listed only while no other MCP server is, the same rule that decides whether it answers.
350
+ */
351
+ defaultMCP?: () => (FarmMCPServerRegistration & {
352
+ path: `/${string}`;
353
+ }) | undefined;
354
+ }
355
+ /**
356
+ * The llms.txt links for the app's MCP servers: each endpoint, then the catalog
357
+ * that lists their cards. Empty when the app mounts no MCP server.
358
+ */
359
+ declare function listFarmMCPLlmsTxtLinks(origin: string, input?: FarmAiCatalogInput): FarmLlmsTxtLink[];
360
+ /**
361
+ * Answers `/.well-known/ai-catalog.json`, `/.well-known/ard.json`, and each
362
+ * `<endpoint>/server-card`, or returns `null` for any other request and when
363
+ * the app mounts no MCP server, so the request goes on as if Farm served nothing.
364
+ * Every request passes through here; `requestUrl`, the caller's parse of
365
+ * `request.url`, saves parsing it again.
366
+ */
367
+ declare function createFarmAiCatalogResponse(request: Request, input?: FarmAiCatalogInput, requestUrl?: URL): Response | null;
368
+
289
369
  /**
290
370
  * `/.well-known/api-catalog` (RFC 9727): a Linkset listing the APIs an app
291
371
  * publishes, so an agent that knows only the origin can find the OpenAPI
@@ -384,4 +464,4 @@ declare function appendFarmRedirectQuery(destination: string, search: string): s
384
464
 
385
465
  declare function appendFarmLinkHeader(headers: Headers, value: string): void;
386
466
 
387
- export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
467
+ export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, handleFarmDefaultMCPRequest, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
@@ -1,23 +1,24 @@
1
1
  export { _runWithAfterRequest } from '../after.js';
2
- import { aE as FarmMCPCatalogDetails, aO as APIRequestRuntime, aP as ResolvedFarmMCPConfig, J as FarmConfig, $ as FarmContextFactoryInput } from '../client-plugins-DZjHC4Mi.js';
3
- export { aY as FarmLlmsTxtUserConfig, aZ as ResolvedFarmLlmsTxtConfig, b2 as applyFarmCspNonceToResponse, aS as collectFarmLlmsTxtPages, aR as createFarmAgentRobots, aT as createFarmDefaultLlmsTxt, aW as createFarmLlmsFullRenderer, aU as createFarmLlmsMarkdownReader, aQ as createFarmMetadataRouteResponse, g as getFarmRedirectError, i as isFarmNotFoundError, b as isFarmRedirectError, a_ as manageFarmDocumentPreloads, a$ as manageFarmHtmlPreloads, b0 as manageFarmLinkHeaderPreloads, aV as renderFarmLlmsFullTxt, b1 as reportFarmPreloadWarnings, aX as resolveFarmLlmsTxtConfig, b3 as resolveFarmSecurityConfig } from '../client-plugins-DZjHC4Mi.js';
4
- export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-CtVMpV-k.js';
5
- import { R as ResolvedFarmServerConfig } from '../workflows-CR9ex-gz.js';
6
- export { a as FarmServerConfig, b as bufferFarmRequestBody, c as cloneFarmRequestWithContext, d as createFarmNodeRequestAbortSignal, e as createFarmRequestBodyErrorResponse, m as matchesFarmIfNoneMatch, r as readFarmRequestBody, f as readNodeRequestBody, g as resolveFarmServerConfig } from '../workflows-CR9ex-gz.js';
7
- export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-DbyOYI2j.js';
2
+ import { aJ as FarmMCPCatalogDetails, fN as APIRequestRuntime, bT as ResolvedFarmMCPConfig, aE as FarmMCPServerRegistration, fO as FarmLlmsTxtLink, I as FarmConfig, _ as FarmContextFactoryInput } from '../client-plugins-r1mOtSC1.js';
3
+ export { fY as FarmLlmsTxtUserConfig, fZ as ResolvedFarmLlmsTxtConfig, g2 as applyFarmCspNonceToResponse, fS as collectFarmLlmsTxtPages, fQ as createFarmAgentRobots, fT as createFarmDefaultLlmsTxt, fR as createFarmDefaultSitemap, fW as createFarmLlmsFullRenderer, fU as createFarmLlmsMarkdownReader, fP as createFarmMetadataRouteResponse, g as getFarmRedirectError, i as isFarmNotFoundError, b as isFarmRedirectError, f_ as manageFarmDocumentPreloads, f$ as manageFarmHtmlPreloads, g0 as manageFarmLinkHeaderPreloads, aI as registerFarmMCPServer, fV as renderFarmLlmsFullTxt, g1 as reportFarmPreloadWarnings, fX as resolveFarmLlmsTxtConfig, g3 as resolveFarmSecurityConfig } from '../client-plugins-r1mOtSC1.js';
4
+ export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-BUZMH_64.js';
5
+ import { R as ResolvedFarmServerConfig } from '../workflows-jZ4BcdoZ.js';
6
+ export { a as FarmServerConfig, y as bufferFarmRequestBody, z as cloneFarmRequestWithContext, A as createFarmNodeRequestAbortSignal, B as createFarmRequestBodyErrorResponse, C as matchesFarmIfNoneMatch, E as readFarmRequestBody, G as readNodeRequestBody, H as resolveFarmServerConfig } from '../workflows-jZ4BcdoZ.js';
7
+ export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-Bkg-hERy.js';
8
8
  export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.js';
9
- import { g as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-Z0aotQ8w.js';
10
- export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-PPEeiJ6M.js';
11
- import { F as FarmLocalePathConfig } from '../index-BWVfxIsO.js';
12
- export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-BWVfxIsO.js';
13
- export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, m as mergeMetadata, r as renderMetadataHead, c as resolveFarmNotFoundMetadata } from '../metadata-Cjs8JMRM.js';
14
- export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-BU5ETAK9.js';
15
- export { c as configureFarmObservability, e as emitFarmEvent, r as runWithFarmRequestSpan } from '../observability-BupkiN0m.js';
9
+ import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-CnH8DOqo.js';
10
+ export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-DadfRL6F.js';
11
+ import { F as FarmLocalePathConfig } from '../index-CwoOP-MW.js';
12
+ export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-CwoOP-MW.js';
13
+ import { F as FarmDefaultMCPPage } from '../agent-mcp-luzfXK-P.js';
14
+ export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, g as collectFarmDefaultMCPPages, m as mergeMetadata, d as mergeModuleViewport, r as renderMetadataHead, e as renderViewportHead, h as resolveFarmDefaultMCPServer, f as resolveFarmNotFoundMetadata } from '../agent-mcp-luzfXK-P.js';
15
+ export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner } from '../production-runtime-DPnsggY3.js';
16
+ export { L as configureFarmObservability, P as emitFarmEvent, Q as runWithFarmRequestSpan } from '../observability-CoXunYhS.js';
16
17
  export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.js';
17
18
  export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.js';
18
19
  import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.js';
19
20
  export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.js';
20
- export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-311Y8eoK.js';
21
+ export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-CaoWKtYM.js';
21
22
  import 'node:http';
22
23
  import '../lifecycle-DK06VuKP.js';
23
24
  import '../integration-api-BPJo5oXb.js';
@@ -35,7 +36,6 @@ import 'unstorage';
35
36
  import '../schema.js';
36
37
  import 'react';
37
38
  import '@farming-labs/orm';
38
- import '../types-DFbjpjXX.js';
39
39
  import '@farming-labs/docs';
40
40
  import 'vite';
41
41
  import '../cron.js';
@@ -62,18 +62,6 @@ interface FarmAppManifestWebMCPTool {
62
62
  inputSchemaSource: "literal" | "computed" | "none";
63
63
  }
64
64
 
65
- /**
66
- * `/.well-known/farmjs`: one document describing a Farm app, so tools can discover it
67
- * instead of each rebuilding the picture: Farm's version, renderer and packages, the app's
68
- * MCP servers with every tool (however it was defined) and its schemas, their resources and
69
- * prompts, its WebMCP browser tools, its integrations, its agent surfaces and its plugins.
70
- * Never environment values, settings or secrets.
71
- *
72
- * Development serves it to anyone on the dev server. Production answers only a request
73
- * signed for the app's Farm Infra key, so the public never reads the app's internals; any
74
- * other request gets a 404. Kept free of Node built-ins: Web Crypto only.
75
- */
76
-
77
65
  type FarmAppManifestToolSource = "endpoint" | "defineTool" | "serverFunction";
78
66
  interface FarmAppManifestTool {
79
67
  name: string;
@@ -81,7 +69,7 @@ interface FarmAppManifestTool {
81
69
  description?: string;
82
70
  /** How the app defined it: an API endpoint, `defineTool`, or a server function. */
83
71
  source: FarmAppManifestToolSource;
84
- /** The endpoint's method and route, for `source: "endpoint"`. */
72
+ /** The endpoint's method and route, for `source: "endpoint"`. Only in Farm Infra's view. */
85
73
  method?: string;
86
74
  path?: string;
87
75
  readOnlyHint?: boolean;
@@ -108,6 +96,11 @@ interface FarmAppManifest {
108
96
  name: string;
109
97
  version: string;
110
98
  path: string;
99
+ /**
100
+ * `"required"` when the server runs `authorize`: an anonymous client lists nothing,
101
+ * so the public view leaves `tools`, `resources` and `prompts` empty.
102
+ */
103
+ authorization: "none" | "required";
111
104
  tools: FarmAppManifestTool[];
112
105
  resources: NonNullable<ServerDetails["resources"]>;
113
106
  prompts: NonNullable<ServerDetails["prompts"]>;
@@ -142,18 +135,30 @@ interface FarmAppManifestInput {
142
135
  integrations: FarmAppManifest["integrations"];
143
136
  agent: FarmAppManifest["agent"];
144
137
  plugins: string[];
145
- /** `analytics: false` keeps the production manifest off: the app talks to no Farm Infra. */
138
+ /**
139
+ * `analytics: false` turns off Farm Infra's signed view: the app talks to no Farm Infra.
140
+ * The public manifest is still served; `agent.manifest: false` turns that off.
141
+ */
146
142
  analytics: boolean;
143
+ /**
144
+ * The default read-only MCP server (`agent.mcp`) while the app would serve it. Set by the
145
+ * server at runtime, not serialized: it answers only while no other MCP server is listed.
146
+ */
147
+ defaultMCP?: () => {
148
+ name: string;
149
+ version: string;
150
+ path: string;
151
+ } | undefined;
147
152
  }
148
153
  type Env = Record<string, string | undefined>;
149
154
  /**
150
- * Answers `/.well-known/farmjs`, or `null` to let the request go on as if Farm served nothing
151
- * there: methods other than GET and HEAD, and production apps not linked to Farm Infra.
155
+ * Answers `/.well-known/farmjs.json` for anyone. A request Farm Infra signed for the app's
156
+ * `FARMJS_API_KEY` gets the full view, unless `analytics` is off; any other read gets the
157
+ * public one.
152
158
  */
153
- declare function createFarmAppManifestResponse(request: Request, input: FarmAppManifestInput, options: {
154
- development: boolean;
159
+ declare function createFarmAppManifestResponse(request: Request, input: FarmAppManifestInput, options?: {
155
160
  env?: Env;
156
- }): Promise<Response | null>;
161
+ }): Promise<Response>;
157
162
 
158
163
  /**
159
164
  * Compare a caller-supplied secret against the configured one without leaking
@@ -170,10 +175,23 @@ declare function createFarmAppManifestResponse(request: Request, input: FarmAppM
170
175
  */
171
176
  declare function farmSecretsMatch(provided: string, expected: string): boolean;
172
177
 
173
- /** Internal: the production builder owns these immutable, depth-ordered descriptors. */
178
+ /**
179
+ * Internal: the production builder owns these immutable, depth-ordered descriptors.
180
+ *
181
+ * A layout's pattern is its directory, so a route group stays in it (`/(auth)`).
182
+ * The URL decides whether a layout covers a pathname; a layout inside a group also
183
+ * needs the selected page to sit in that group. `resolveRouteDirectory` finds that
184
+ * page's directory, and runs only when such a layout's URL matches.
185
+ */
174
186
  declare function createFarmLayoutSelector<T extends {
175
187
  pattern: string;
176
- }>(layouts: readonly T[]): (pathname: string) => T[];
188
+ }>(layouts: readonly T[], resolveRouteDirectory?: (pathname: string) => string | null | undefined): (pathname: string, routeDirectory?: string | null) => T[];
189
+
190
+ /**
191
+ * Whether a page directory sits inside a group scope. A null scope covers every page;
192
+ * a missing directory (no page matched) is inside no group.
193
+ */
194
+ declare function isInRouteGroupScope(directory: string | null | undefined, scope: string | null): boolean;
177
195
 
178
196
  type FarmProductionLifecycleState = "starting" | "ready" | "draining" | "failed" | "closed";
179
197
  interface FarmProductionLifecycleOptions {
@@ -259,6 +277,14 @@ interface FarmLocaleAlternateLinkOptions {
259
277
  */
260
278
  declare function renderFarmLocaleAlternateLinks(pathname: string, config: FarmLocalePathConfig, options?: FarmLocaleAlternateLinkOptions): string;
261
279
 
280
+ /**
281
+ * Start the head with `<meta charset>` and the viewport tags, as Next.js always renders both,
282
+ * skipping each one the layout's document already writes (a viewport, theme-color, or
283
+ * color-scheme tag of its own). The charset comes first because browsers only look for it in the
284
+ * document's first 1024 bytes. The production server uses this same function.
285
+ */
286
+ declare function ensureFarmDocumentMeta(markup: string, viewport?: string): string;
287
+
262
288
  /**
263
289
  * Runtime source that remounts the top-level `mcp` configuration in a built server.
264
290
  *
@@ -286,6 +312,60 @@ declare function _isFarmOwnedResponse(response: Response): boolean;
286
312
  */
287
313
  declare function _withFarmResponseHeaders(response: Response, edit: (headers: Headers) => void): Response;
288
314
 
315
+ /**
316
+ * The protocol side of the default MCP server (`agent.mcp`, see `agent-mcp.ts`): stateless
317
+ * Streamable HTTP with JSON responses, and three read-only tools over the app's public pages.
318
+ * A small JSON-RPC implementation rather than the MCP SDK, so apps that never receive an
319
+ * MCP request carry no SDK.
320
+ *
321
+ * Kept free of Node built-ins: the production server runs on edge runtimes too.
322
+ */
323
+
324
+ interface FarmDefaultMCPContext {
325
+ server: {
326
+ name: string;
327
+ version: string;
328
+ title?: string;
329
+ };
330
+ /** The app's public pages for this request's origin. */
331
+ listPages: () => FarmDefaultMCPPage[] | Promise<FarmDefaultMCPPage[]>;
332
+ /** Reads a Markdown URL anonymously; null when the page does not answer with Markdown. */
333
+ readMarkdown: (url: string) => Promise<string | null>;
334
+ basePath?: string;
335
+ }
336
+ /**
337
+ * Answers one request to the default MCP endpoint: stateless Streamable HTTP, JSON
338
+ * responses, no sessions, and no server-initiated stream (GET answers 405).
339
+ */
340
+ declare function handleFarmDefaultMCPRequest(request: Request, context: FarmDefaultMCPContext): Promise<Response>;
341
+
342
+ interface FarmAiCatalogInput {
343
+ /** The app's basePath; the catalog lives beneath it, like the API catalog. */
344
+ basePath?: string;
345
+ /** The app's public API path, which maps to Farm's canonical `/api`. */
346
+ apiServerBasePath?: string;
347
+ /**
348
+ * The default read-only server (`agent.mcp`), when this app would serve it. It is
349
+ * listed only while no other MCP server is, the same rule that decides whether it answers.
350
+ */
351
+ defaultMCP?: () => (FarmMCPServerRegistration & {
352
+ path: `/${string}`;
353
+ }) | undefined;
354
+ }
355
+ /**
356
+ * The llms.txt links for the app's MCP servers: each endpoint, then the catalog
357
+ * that lists their cards. Empty when the app mounts no MCP server.
358
+ */
359
+ declare function listFarmMCPLlmsTxtLinks(origin: string, input?: FarmAiCatalogInput): FarmLlmsTxtLink[];
360
+ /**
361
+ * Answers `/.well-known/ai-catalog.json`, `/.well-known/ard.json`, and each
362
+ * `<endpoint>/server-card`, or returns `null` for any other request and when
363
+ * the app mounts no MCP server, so the request goes on as if Farm served nothing.
364
+ * Every request passes through here; `requestUrl`, the caller's parse of
365
+ * `request.url`, saves parsing it again.
366
+ */
367
+ declare function createFarmAiCatalogResponse(request: Request, input?: FarmAiCatalogInput, requestUrl?: URL): Response | null;
368
+
289
369
  /**
290
370
  * `/.well-known/api-catalog` (RFC 9727): a Linkset listing the APIs an app
291
371
  * publishes, so an agent that knows only the origin can find the OpenAPI
@@ -384,4 +464,4 @@ declare function appendFarmRedirectQuery(destination: string, search: string): s
384
464
 
385
465
  declare function appendFarmLinkHeader(headers: Headers, value: string): void;
386
466
 
387
- export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
467
+ export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, handleFarmDefaultMCPRequest, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };