@farm.js/core 0.1.71 → 0.1.73

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 (256) hide show
  1. package/dist/{agent-mcp-handler-VIT4GOSR.mjs → agent-mcp-handler-RK7LDYEL.mjs} +5 -5
  2. package/dist/{agent-mcp-handler-KE4J3W7S.cjs → agent-mcp-handler-VBCA3WZ6.cjs} +6 -6
  3. package/dist/{agent-mcp.d-BzNw6JI8.d.ts → agent-mcp.d-D_gHjCAE.d.ts} +2 -2
  4. package/dist/{agent-mcp.d-CgFen3EH.d.mts → agent-mcp.d-PvEf-1mi.d.mts} +2 -2
  5. package/dist/agent-runtime.d.mts +4 -4
  6. package/dist/agent-runtime.d.ts +4 -4
  7. package/dist/{analyzer-VK3BAOFI.mjs → analyzer-MFYCJT75.mjs} +2 -2
  8. package/dist/analyzer-V5ZMRIIY.cjs +16 -0
  9. package/dist/api/node.d.mts +6 -6
  10. package/dist/api/node.d.ts +6 -6
  11. package/dist/api/route-manager.cjs +7 -6
  12. package/dist/api/route-manager.d.mts +8 -8
  13. package/dist/api/route-manager.d.ts +8 -8
  14. package/dist/api/route-manager.mjs +6 -5
  15. package/dist/api/runtime.d.mts +5 -5
  16. package/dist/api/runtime.d.ts +5 -5
  17. package/dist/api.cjs +8 -7
  18. package/dist/api.d.mts +9 -9
  19. package/dist/api.d.ts +9 -9
  20. package/dist/api.mjs +7 -6
  21. package/dist/{app-manifest.d-DY4JfJxi.d.ts → app-manifest.d-BpVTg43i.d.ts} +1 -1
  22. package/dist/{app-manifest.d-DpDK_B1k.d.mts → app-manifest.d-CN7cEWHX.d.mts} +1 -1
  23. package/dist/app-markdown.cjs +4 -4
  24. package/dist/app-markdown.d.mts +5 -5
  25. package/dist/app-markdown.d.ts +5 -5
  26. package/dist/app-markdown.mjs +3 -3
  27. package/dist/{app.d-D-5UNrFd.d.mts → app.d-BFWzAdTe.d.mts} +54 -6
  28. package/dist/{app.d-BeK6bb1c.d.ts → app.d-DO4PTCWm.d.ts} +54 -6
  29. package/dist/{chunk-7A3URI2F.mjs → chunk-2EVESLP3.mjs} +8 -1
  30. package/dist/{chunk-IYDJNCR7.mjs → chunk-462MUII7.mjs} +10 -5
  31. package/dist/{chunk-MWUDEYBI.mjs → chunk-4CTCSKAF.mjs} +1 -1
  32. package/dist/{chunk-SXMWVP2L.cjs → chunk-4YHGQDTT.cjs} +12 -12
  33. package/dist/{chunk-YCNHUIPR.cjs → chunk-4Z3YLMSW.cjs} +10 -10
  34. package/dist/{chunk-K66JILV3.cjs → chunk-5LOARKDP.cjs} +2 -2
  35. package/dist/{chunk-O32QPFVV.cjs → chunk-5PDMBWAF.cjs} +5 -5
  36. package/dist/{chunk-IGXS54GC.mjs → chunk-6O6PAZZR.mjs} +1 -1
  37. package/dist/{chunk-LXEJNWF5.mjs → chunk-73K53YPP.mjs} +2 -2
  38. package/dist/{chunk-2CQC5CMD.mjs → chunk-7GMBETHM.mjs} +1 -1
  39. package/dist/{chunk-W2T6NDNP.mjs → chunk-B67CW2LM.mjs} +2 -2
  40. package/dist/{chunk-CSQPMV3Q.cjs → chunk-CLEWORVY.cjs} +6 -6
  41. package/dist/{chunk-KPJYBSHL.mjs → chunk-CPMME66W.mjs} +149 -22
  42. package/dist/{chunk-BBPDJGCU.cjs → chunk-CYOTNHDF.cjs} +2 -2
  43. package/dist/{chunk-4OD2LXF2.mjs → chunk-CYRIIVD4.mjs} +26 -15
  44. package/dist/{chunk-DPIGYXSV.mjs → chunk-FRO4BB2T.mjs} +1 -1
  45. package/dist/{chunk-Y2SZVIVH.cjs → chunk-GPICBTDV.cjs} +8 -1
  46. package/dist/{chunk-N3XO5AL5.cjs → chunk-GPO3LJDJ.cjs} +2 -2
  47. package/dist/{chunk-MITIAOUQ.mjs → chunk-GZOKWJIW.mjs} +4 -4
  48. package/dist/{chunk-NAXKOTPP.cjs → chunk-HFUOLILA.cjs} +21 -21
  49. package/dist/{chunk-C2JOS77Z.cjs → chunk-HGB4PM2C.cjs} +178 -51
  50. package/dist/{chunk-2IFT2CSA.cjs → chunk-HTXKSREF.cjs} +515 -151
  51. package/dist/{chunk-Z3GPAFIA.mjs → chunk-HY6IVQ54.mjs} +1 -1
  52. package/dist/{chunk-X7LGLF33.mjs → chunk-IBVN7SW5.mjs} +480 -116
  53. package/dist/{chunk-DPYBVVL3.cjs → chunk-ILQ5DKYF.cjs} +2 -2
  54. package/dist/{chunk-V25GSH43.mjs → chunk-IXZSBO76.mjs} +1 -1
  55. package/dist/{chunk-RJUCNO7R.mjs → chunk-JMOCMXTQ.mjs} +1 -1
  56. package/dist/{chunk-UISZLYKY.cjs → chunk-KDOZORJD.cjs} +52 -41
  57. package/dist/{chunk-PLXD2MJV.cjs → chunk-KTDG4THT.cjs} +2 -2
  58. package/dist/{chunk-L6E4SHUB.cjs → chunk-LGR7565L.cjs} +6 -6
  59. package/dist/chunk-LRPPXKCX.mjs +58 -0
  60. package/dist/{chunk-GUU3IZSM.mjs → chunk-MJEKMT6B.mjs} +324 -148
  61. package/dist/chunk-NDOE76QC.cjs +58 -0
  62. package/dist/{chunk-2AM26UGI.cjs → chunk-NLBK37HI.cjs} +5 -4
  63. package/dist/{chunk-REP6HWJN.mjs → chunk-OBYM5S5G.mjs} +2 -2
  64. package/dist/{chunk-ZUVAGMQ5.cjs → chunk-ODBM54RT.cjs} +7 -7
  65. package/dist/{chunk-J5ASGNKF.mjs → chunk-OIP62QEL.mjs} +1 -1
  66. package/dist/{chunk-KEB7AGS6.cjs → chunk-OXNZUCHN.cjs} +16 -11
  67. package/dist/{chunk-2MR4MABG.cjs → chunk-PXAHSCR6.cjs} +58 -8
  68. package/dist/{chunk-7BUE2GM6.mjs → chunk-QGCSUC5O.mjs} +174 -81
  69. package/dist/{chunk-VXB5CMNC.cjs → chunk-QKEZLYON.cjs} +2 -2
  70. package/dist/{chunk-UQUOSNRN.mjs → chunk-REK6HZSU.mjs} +470 -267
  71. package/dist/{chunk-E77IA5IF.mjs → chunk-RLFGKJQ6.mjs} +1 -1
  72. package/dist/{chunk-3BQ7QHUH.cjs → chunk-ROCF6UQD.cjs} +17 -8
  73. package/dist/{chunk-KQAB5LML.mjs → chunk-SUQACHER.mjs} +2 -2
  74. package/dist/{chunk-NA77GEIU.mjs → chunk-SVQX5HYW.mjs} +53 -3
  75. package/dist/{chunk-KWST2O22.cjs → chunk-TAU3OF5B.cjs} +611 -435
  76. package/dist/{chunk-ZPUAOKHV.cjs → chunk-TDCP3Z4T.cjs} +3 -3
  77. package/dist/{chunk-3AUINHFG.mjs → chunk-TNYC3TYP.mjs} +3 -2
  78. package/dist/{chunk-TP4RAV7Y.cjs → chunk-TU6VAH4V.cjs} +8 -8
  79. package/dist/{chunk-MEJCP2LX.cjs → chunk-UVQRMUAR.cjs} +1 -1
  80. package/dist/{chunk-JMFTKNBA.mjs → chunk-UVZMSRHF.mjs} +2 -2
  81. package/dist/{chunk-MU5V7XHL.mjs → chunk-VJSXPN3W.mjs} +3 -0
  82. package/dist/{chunk-DU4VHHPJ.mjs → chunk-VO55MMBX.mjs} +1 -1
  83. package/dist/{chunk-GF22VGMS.cjs → chunk-VPETSSWN.cjs} +2 -2
  84. package/dist/{chunk-LDVJIBGN.mjs → chunk-VT25ERQK.mjs} +1 -1
  85. package/dist/{chunk-AYVGD3PK.mjs → chunk-XI3OXOMK.mjs} +1 -1
  86. package/dist/{chunk-7OHJWFLB.cjs → chunk-XUSJVHHD.cjs} +466 -373
  87. package/dist/{chunk-FILXOEWD.cjs → chunk-YXIQYWOK.cjs} +2 -2
  88. package/dist/{chunk-JVA4PIYN.cjs → chunk-YZK64PZT.cjs} +635 -432
  89. package/dist/{chunk-THG2TVDH.mjs → chunk-YZLEOMMA.mjs} +3 -3
  90. package/dist/{chunk-QUFENL7Q.mjs → chunk-Z3IN6GEX.mjs} +16 -7
  91. package/dist/{chunk-Q5HMVGR5.cjs → chunk-ZFEJ2SF2.cjs} +13 -13
  92. package/dist/{chunk-LNVGXUL3.cjs → chunk-ZMSVKVI3.cjs} +3 -0
  93. package/dist/{client-component.d-DwpH251K.d.mts → client-component.d-C71rMuHF.d.mts} +2 -2
  94. package/dist/{client-component.d-fYupugbZ.d.ts → client-component.d-sF-Znk0j.d.ts} +2 -2
  95. package/dist/{client-plugins.d-k3bOT5gz.d.mts → client-plugins.d-B-Gd9mWR.d.mts} +5 -4
  96. package/dist/{client-plugins.d-BxqFfHpM.d.ts → client-plugins.d-MFibjgBg.d.ts} +5 -4
  97. package/dist/client-plugins.d.mts +4 -4
  98. package/dist/client-plugins.d.ts +4 -4
  99. package/dist/client.cjs +1 -1
  100. package/dist/client.d.mts +9 -9
  101. package/dist/client.d.ts +9 -9
  102. package/dist/client.mjs +1 -1
  103. package/dist/config.d.mts +4 -4
  104. package/dist/config.d.ts +4 -4
  105. package/dist/desktop.d.mts +5 -5
  106. package/dist/desktop.d.ts +5 -5
  107. package/dist/{devtools-O5625KCK.cjs → devtools-6K4QXFRL.cjs} +7 -7
  108. package/dist/{devtools-6MXPFPNJ.mjs → devtools-TDIJ6HVC.mjs} +6 -6
  109. package/dist/docs.cjs +10 -10
  110. package/dist/docs.d.mts +5 -5
  111. package/dist/docs.d.ts +5 -5
  112. package/dist/docs.mjs +9 -9
  113. package/dist/environment/vite.cjs +3 -3
  114. package/dist/environment/vite.mjs +2 -2
  115. package/dist/{headers.d-sNT7ZQiU.d.mts → headers.d-BUxGJTsj.d.mts} +2 -2
  116. package/dist/{headers.d-DalIGbVO.d.ts → headers.d-uQ6BR59u.d.ts} +2 -2
  117. package/dist/i18n/client.cjs +3 -2
  118. package/dist/i18n/client.d.mts +2 -2
  119. package/dist/i18n/client.d.ts +2 -2
  120. package/dist/i18n/client.mjs +2 -1
  121. package/dist/i18n/index.cjs +3 -2
  122. package/dist/i18n/index.d.mts +3 -3
  123. package/dist/i18n/index.d.ts +3 -3
  124. package/dist/i18n/index.mjs +2 -1
  125. package/dist/i18n/server.cjs +6 -5
  126. package/dist/i18n/server.d.mts +5 -5
  127. package/dist/i18n/server.d.ts +5 -5
  128. package/dist/i18n/server.mjs +5 -4
  129. package/dist/index.cjs +32 -30
  130. package/dist/{index.d-BcA-secm.d.ts → index.d-BCGfxCXY.d.ts} +1 -1
  131. package/dist/{index.d-DDHHAv7j.d.mts → index.d-CuWOJ-un.d.mts} +1 -1
  132. package/dist/index.d.mts +24 -24
  133. package/dist/index.d.ts +24 -24
  134. package/dist/index.mjs +31 -29
  135. package/dist/integrations/orm.d.mts +4 -4
  136. package/dist/integrations/orm.d.ts +4 -4
  137. package/dist/integrations.d.mts +4 -4
  138. package/dist/integrations.d.ts +4 -4
  139. package/dist/internal/app-markdown-runtime.cjs +3 -3
  140. package/dist/internal/app-markdown-runtime.d.mts +5 -5
  141. package/dist/internal/app-markdown-runtime.d.ts +5 -5
  142. package/dist/internal/app-markdown-runtime.mjs +2 -2
  143. package/dist/internal/build-runtime.cjs +29 -29
  144. package/dist/internal/build-runtime.d.mts +6 -6
  145. package/dist/internal/build-runtime.d.ts +6 -6
  146. package/dist/internal/build-runtime.mjs +28 -28
  147. package/dist/internal/cli-runtime.cjs +12 -12
  148. package/dist/internal/cli-runtime.mjs +11 -11
  149. package/dist/internal/client-error-overlay.cjs +4 -4
  150. package/dist/internal/client-error-overlay.mjs +1 -1
  151. package/dist/internal/client-runtime.cjs +2 -2
  152. package/dist/internal/client-runtime.d.mts +7 -7
  153. package/dist/internal/client-runtime.d.ts +7 -7
  154. package/dist/internal/client-runtime.mjs +3 -3
  155. package/dist/internal/compression-runtime.d.mts +4 -4
  156. package/dist/internal/compression-runtime.d.ts +4 -4
  157. package/dist/internal/config-runtime.cjs +8 -8
  158. package/dist/internal/config-runtime.d.mts +7 -7
  159. package/dist/internal/config-runtime.d.ts +7 -7
  160. package/dist/internal/config-runtime.mjs +7 -7
  161. package/dist/internal/infra-analytics-runtime.cjs +10 -10
  162. package/dist/internal/infra-analytics-runtime.mjs +8 -8
  163. package/dist/internal/native-server-fns.cjs +4 -4
  164. package/dist/internal/native-server-fns.mjs +3 -3
  165. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  166. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  167. package/dist/internal/production-runtime.cjs +19 -19
  168. package/dist/internal/production-runtime.d.mts +37 -25
  169. package/dist/internal/production-runtime.d.ts +37 -25
  170. package/dist/internal/production-runtime.mjs +18 -18
  171. package/dist/internal/vercel-edge-middleware.d.mts +2 -2
  172. package/dist/internal/vercel-edge-middleware.d.ts +2 -2
  173. package/dist/markdown.cjs +2 -2
  174. package/dist/markdown.d.mts +4 -4
  175. package/dist/markdown.d.ts +4 -4
  176. package/dist/markdown.mjs +1 -1
  177. package/dist/middleware.cjs +3 -3
  178. package/dist/middleware.d.mts +5 -5
  179. package/dist/middleware.d.ts +5 -5
  180. package/dist/middleware.mjs +2 -2
  181. package/dist/mobile.d.mts +3 -3
  182. package/dist/mobile.d.ts +3 -3
  183. package/dist/{mount.d-C1PONsEe.d.mts → mount.d-BIYmcGGg.d.mts} +1 -1
  184. package/dist/{mount.d-D3JOux2V.d.ts → mount.d-q8k0cJV0.d.ts} +1 -1
  185. package/dist/{native-tree-L2IIEBXH.mjs → native-tree-OYGKP2NZ.mjs} +2 -2
  186. package/dist/{native-tree-GF4BH33L.cjs → native-tree-R6CQMDTI.cjs} +3 -3
  187. package/dist/{navigation-delegate.d-CQQPbdkE.d.ts → navigation-delegate.d-Btfs6Uoa.d.ts} +1 -1
  188. package/dist/{navigation-delegate.d-CJQQHboA.d.mts → navigation-delegate.d-CYBUupsv.d.mts} +1 -1
  189. package/dist/navigation.d.mts +7 -7
  190. package/dist/navigation.d.ts +7 -7
  191. package/dist/{observability.d-B2363jB6.d.mts → observability.d-DdJRiaIX.d.mts} +27 -3
  192. package/dist/{observability.d-B2363jB6.d.ts → observability.d-DdJRiaIX.d.ts} +27 -3
  193. package/dist/observability.d.mts +1 -1
  194. package/dist/observability.d.ts +1 -1
  195. package/dist/plugin.cjs +21 -21
  196. package/dist/plugin.d.mts +7 -7
  197. package/dist/plugin.d.ts +7 -7
  198. package/dist/plugin.mjs +20 -20
  199. package/dist/{production-runtime.d-B0IeWWyO.d.mts → production-runtime.d-Bcu37SCo.d.mts} +1 -1
  200. package/dist/{production-runtime.d-q3aHIv5Y.d.ts → production-runtime.d-qPj3XRET.d.ts} +1 -1
  201. package/dist/{render-plan.d-DHuJMJRP.d.ts → render-plan.d-0FHusf1D.d.ts} +1 -1
  202. package/dist/{render-plan.d-CiUj0rq5.d.mts → render-plan.d-BlyxqKMu.d.mts} +1 -1
  203. package/dist/renderer-client.cjs +3 -2
  204. package/dist/renderer-client.d.mts +7 -7
  205. package/dist/renderer-client.d.ts +7 -7
  206. package/dist/renderer-client.mjs +2 -1
  207. package/dist/{request.d-DRUbOmYD.d.ts → request.d-CPdVjssg.d.ts} +1 -1
  208. package/dist/{request.d-D-F7o7tb.d.mts → request.d-CX-gks1l.d.mts} +1 -1
  209. package/dist/request.d.mts +5 -5
  210. package/dist/request.d.ts +5 -5
  211. package/dist/{resolver.d-9iKC79CU.d.mts → resolver.d-DJgzbdsp.d.mts} +1 -1
  212. package/dist/{resolver.d-CY6mEa_F.d.ts → resolver.d-yaHcGCCG.d.ts} +1 -1
  213. package/dist/{route-rendering.d-6smgwT2t.d.mts → route-rendering.d-CcvZ_4N2.d.mts} +1 -1
  214. package/dist/{route-rendering.d-KwqM_mlK.d.ts → route-rendering.d-DcOoSNoG.d.ts} +1 -1
  215. package/dist/{router.d-BYmDeDlp.d.mts → router.d-C8RHma4A.d.mts} +1 -1
  216. package/dist/{router.d-B6sesMRD.d.ts → router.d-D2QnK8cM.d.ts} +1 -1
  217. package/dist/{routes.d-D3aJw1H5.d.mts → routes.d-CCccJRrp.d.mts} +1 -1
  218. package/dist/{routes.d-K-Qg79AA.d.ts → routes.d-b7khoRoU.d.ts} +1 -1
  219. package/dist/routes.d.mts +4 -4
  220. package/dist/routes.d.ts +4 -4
  221. package/dist/{routing.d-DwSUVZbF.d.mts → routing.d-BhPgtN_S.d.ts} +2 -1
  222. package/dist/{routing.d-BxOZ2YWc.d.ts → routing.d-D67HQmnv.d.mts} +2 -1
  223. package/dist/{rsc-pipeline-R2GOKIMU.mjs → rsc-pipeline-LC2FBZAR.mjs} +7 -7
  224. package/dist/{rsc-pipeline-P4PCWDO2.cjs → rsc-pipeline-NTAM65NT.cjs} +8 -8
  225. package/dist/{runtime-DP5DYGW5.mjs → runtime-MWAC7NWR.mjs} +7 -7
  226. package/dist/{runtime-WA2Q4SLG.cjs → runtime-U4PAMTVH.cjs} +9 -9
  227. package/dist/{runtime.d-CbdMI0Oy.d.ts → runtime.d-1l_1bLrL.d.ts} +1 -1
  228. package/dist/{runtime.d-BFSJf-ww.d.mts → runtime.d-BQUHHq8M.d.mts} +1 -1
  229. package/dist/{runtime.d-nUz0HAL4.d.mts → runtime.d-CTAXWZby.d.mts} +2 -2
  230. package/dist/{runtime.d-B_uPfMjA.d.ts → runtime.d-PUA5qBnd.d.ts} +2 -2
  231. package/dist/server-plugins.d.mts +6 -6
  232. package/dist/server-plugins.d.ts +6 -6
  233. package/dist/server.cjs +43 -41
  234. package/dist/server.d.mts +15 -15
  235. package/dist/server.d.ts +15 -15
  236. package/dist/server.mjs +26 -24
  237. package/dist/{spa-router.d-mC1D5cTN.d.ts → spa-router.d-BJtXNeqo.d.ts} +3 -3
  238. package/dist/{spa-router.d-D4EDwR20.d.mts → spa-router.d-BzPdi48R.d.mts} +3 -3
  239. package/dist/testing.cjs +6 -5
  240. package/dist/testing.d.mts +4 -4
  241. package/dist/testing.d.ts +4 -4
  242. package/dist/testing.mjs +6 -5
  243. package/dist/{types.d-wVRlLtBf.d.ts → types.d-euATAbE4.d.mts} +4 -0
  244. package/dist/{types.d-wVRlLtBf.d.mts → types.d-euATAbE4.d.ts} +4 -0
  245. package/dist/{utils.d-DxMzteqE.d.mts → utils.d-B4ZW-6z6.d.mts} +1 -1
  246. package/dist/{utils.d-A2X3a6z_.d.ts → utils.d-DquC6qxy.d.ts} +1 -1
  247. package/dist/version.cjs +2 -2
  248. package/dist/version.mjs +1 -1
  249. package/dist/vite.cjs +23 -21
  250. package/dist/vite.d.mts +18 -9
  251. package/dist/vite.d.ts +18 -9
  252. package/dist/vite.mjs +22 -20
  253. package/package.json +1 -1
  254. package/dist/analyzer-LPIVRSTJ.cjs +0 -16
  255. package/dist/chunk-V3UOEWCB.cjs +0 -46
  256. package/dist/chunk-VE3FWJBO.mjs +0 -46
@@ -6,7 +6,7 @@ var _chunkQEJWNXRIcjs = require('./chunk-QEJWNXRI.cjs');
6
6
  var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
7
7
 
8
8
 
9
- var _chunk2AM26UGIcjs = require('./chunk-2AM26UGI.cjs');
9
+ var _chunkNLBK37HIcjs = require('./chunk-NLBK37HI.cjs');
10
10
 
11
11
 
12
12
  var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
@@ -371,7 +371,7 @@ var APIRouteManager = class _APIRouteManager {
371
371
  return _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
372
372
  }
373
373
  };
374
- return _optionalChain([this, 'access', _10 => _10.i18n, 'optionalAccess', _11 => _11.config, 'access', _12 => _12.enabled]) ? _chunk2AM26UGIcjs._runWithFarmI18nRequest.call(void 0, this.i18n, request, invoke, {
374
+ return _optionalChain([this, 'access', _10 => _10.i18n, 'optionalAccess', _11 => _11.config, 'access', _12 => _12.enabled]) ? _chunkNLBK37HIcjs._runWithFarmI18nRequest.call(void 0, this.i18n, request, invoke, {
375
375
  redirect: false
376
376
  }) : invoke();
377
377
  };
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
6
+ var _chunkHGB4PM2Ccjs = require('./chunk-HGB4PM2C.cjs');
7
7
 
8
8
 
9
9
  var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
@@ -65,12 +65,12 @@ function collectFarmLlmsTxtPages(sources, options) {
65
65
  for (const source of sources) {
66
66
  const path = source.pattern;
67
67
  if (path.includes("[") || pages.has(path)) continue;
68
- if (include.length && !include.some((pattern) => _chunkC2JOS77Zcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
68
+ if (include.length && !include.some((pattern) => _chunkHGB4PM2Ccjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
69
69
  continue;
70
70
  }
71
- if (exclude.some((pattern) => _chunkC2JOS77Zcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
71
+ if (exclude.some((pattern) => _chunkHGB4PM2Ccjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
72
72
  if (isFarmMetadataNoIndex(source.metadata)) continue;
73
- const target = _chunkC2JOS77Zcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? getFarmAgentPagePublicPath(_chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, path), options) : _chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
73
+ const target = _chunkHGB4PM2Ccjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? getFarmAgentPagePublicPath(_chunkHGB4PM2Ccjs.getFarmMarkdownMirrorPath.call(void 0, path), options) : _chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
74
74
  getFarmAgentPagePublicPath(path, options),
75
75
  options.trailingSlash === true
76
76
  );
@@ -199,7 +199,7 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
199
199
  try {
200
200
  const response = await fetchMarkdown(
201
201
  new Request(url, {
202
- headers: { accept: "text/markdown", [_chunkC2JOS77Zcjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
202
+ headers: { accept: "text/markdown", [_chunkHGB4PM2Ccjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
203
203
  })
204
204
  );
205
205
  const type = _nullishCoalesce(response.headers.get("content-type"), () => ( ""));
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-FN5UEC7I.mjs";
11
11
  import {
12
12
  resolveDeployOutputPath
13
- } from "./chunk-IYDJNCR7.mjs";
13
+ } from "./chunk-462MUII7.mjs";
14
14
  import {
15
15
  farmDesktopDevGuardPlugin,
16
16
  loadFarmReactPlugin
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  docsEngine,
10
10
  loadFarmDocsEngine
11
- } from "./chunk-VE3FWJBO.mjs";
11
+ } from "./chunk-LRPPXKCX.mjs";
12
12
  import {
13
13
  resolveFarmDocsFontAssets,
14
14
  toFarmDocsPublicFontAssets
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-22W4FNTG.mjs";
19
19
  import {
20
20
  farmAcceptQuality
21
- } from "./chunk-KPJYBSHL.mjs";
21
+ } from "./chunk-CPMME66W.mjs";
22
22
  import {
23
23
  isMissingPackageError
24
24
  } from "./chunk-NR63PD3P.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readAliases,
3
3
  resolveFile
4
- } from "./chunk-DPIGYXSV.mjs";
4
+ } from "./chunk-FRO4BB2T.mjs";
5
5
  import {
6
6
  transformFarmServerFns
7
7
  } from "./chunk-GNZIAJGB.mjs";
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-E7VF3LQ5.mjs";
29
29
  import {
30
30
  isFarmMarkdownPageFile
31
- } from "./chunk-J5ASGNKF.mjs";
31
+ } from "./chunk-OIP62QEL.mjs";
32
32
  import {
33
33
  resolveSchemaModels
34
34
  } from "./chunk-F3N52U7S.mjs";
@@ -37,7 +37,7 @@ import {
37
37
  } from "./chunk-K63OWRY2.mjs";
38
38
  import {
39
39
  readFarmI18nCatalogs
40
- } from "./chunk-DU4VHHPJ.mjs";
40
+ } from "./chunk-VO55MMBX.mjs";
41
41
  import {
42
42
  resolvePluginRoutes
43
43
  } from "./chunk-OB45EAQL.mjs";
@@ -28,7 +28,7 @@ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
28
28
  var _chunkMTBDJ326cjs = require('./chunk-MTBDJ326.cjs');
29
29
 
30
30
 
31
- var _chunkL6E4SHUBcjs = require('./chunk-L6E4SHUB.cjs');
31
+ var _chunkLGR7565Lcjs = require('./chunk-LGR7565L.cjs');
32
32
 
33
33
 
34
34
  var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
@@ -37,7 +37,7 @@ var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
37
37
  var _chunkJ6TZRYCOcjs = require('./chunk-J6TZRYCO.cjs');
38
38
 
39
39
 
40
- var _chunkBBPDJGCUcjs = require('./chunk-BBPDJGCU.cjs');
40
+ var _chunkCYOTNHDFcjs = require('./chunk-CYOTNHDF.cjs');
41
41
 
42
42
 
43
43
  var _chunk2AFW7673cjs = require('./chunk-2AFW7673.cjs');
@@ -423,7 +423,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
423
423
  continue;
424
424
  }
425
425
  const source = await _promises.readFile.call(void 0, route.filePath, "utf8").catch(() => void 0);
426
- if (_optionalChain([options, 'access', _41 => _41.docsAdapterRoutes, 'optionalAccess', _42 => _42.owns, 'call', _43 => _43(route.path)]) && _chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, route.filePath)) {
426
+ if (_optionalChain([options, 'access', _41 => _41.docsAdapterRoutes, 'optionalAccess', _42 => _42.owns, 'call', _43 => _43(route.path)]) && _chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, route.filePath)) {
427
427
  ssrRoutes.push(route.path);
428
428
  if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(null, source, { isDynamic: route.isDynamic }).candidate) {
429
429
  staticCandidateDocsPages += 1;
@@ -560,7 +560,7 @@ declare module "*?url" {
560
560
 
561
561
  async function generateFarmI18nTypes(options) {
562
562
  if (!options.config.enabled) return void 0;
563
- const { signatures } = await _chunkBBPDJGCUcjs.readFarmI18nCatalogs.call(void 0, options.config);
563
+ const { signatures } = await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, options.config);
564
564
  const outFile = options.outFile ? _path.resolve.call(void 0, options.root, options.outFile) : _path.join.call(void 0, _path.resolve.call(void 0, options.root), options.srcDir || "src", "farm-i18n.d.ts");
565
565
  const content = renderFarmI18nTypes(options.config.locales, signatures);
566
566
  _fs.mkdirSync.call(void 0, _path.dirname.call(void 0, outFile), { recursive: true });
@@ -917,13 +917,13 @@ async function generateFarmTypeArtifacts(options) {
917
917
  }
918
918
  }
919
919
  if (shouldRefreshUnifiedTypes && _optionalChain([options, 'access', _56 => _56.i18nConfig, 'optionalAccess', _57 => _57.enabled]) && !options.i18nTypesOutFile) {
920
- const { signatures } = await _chunkBBPDJGCUcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
920
+ const { signatures } = await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
921
921
  unifiedSections.push(renderFarmI18nTypes(options.i18nConfig.locales, signatures));
922
922
  result.i18nTypesPath = unifiedTypesPath;
923
923
  } else if (shouldGenerateI18n && options.i18nConfig) {
924
924
  if (options.check) {
925
925
  const i18nTypesPath = resolveGeneratedPath(root, srcDir, options.i18nTypesOutFile, false);
926
- const { signatures } = await _chunkBBPDJGCUcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
926
+ const { signatures } = await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
927
927
  checkGeneratedFile(
928
928
  i18nTypesPath,
929
929
  renderFarmI18nTypes(options.i18nConfig.locales, signatures),
@@ -15,34 +15,160 @@ import {
15
15
  } from "./chunk-SF3JB56B.mjs";
16
16
 
17
17
  // src/agent-identity.ts
18
- var AGENT_TOKENS = [
19
- ["ChatGPT-User", "openai", "agent"],
20
- ["OAI-SearchBot", "openai", "crawler"],
21
- ["GPTBot", "openai", "crawler"],
22
- ["Claude-User", "anthropic", "agent"],
23
- ["Claude-SearchBot", "anthropic", "crawler"],
24
- ["ClaudeBot", "anthropic", "crawler"],
25
- ["Perplexity-User", "perplexity", "agent"],
26
- ["PerplexityBot", "perplexity", "crawler"],
27
- ["CCBot", "other", "crawler"],
28
- ["Bytespider", "other", "crawler"],
29
- ["Meta-ExternalAgent", "other", "crawler"]
18
+ var CLIENT_TOKENS = [
19
+ ["ChatGPT-User", "ChatGPT-User", "openai", "agent"],
20
+ ["OAI-SearchBot", "OAI-SearchBot", "openai", "crawler"],
21
+ ["GPTBot", "GPTBot", "openai", "crawler"],
22
+ ["codex[_-][a-z]+(?:[_-][a-z]+)*", "Codex", "openai", "harness"],
23
+ ["Claude-User", "Claude-User", "anthropic", "agent"],
24
+ ["Claude-SearchBot", "Claude-SearchBot", "anthropic", "crawler"],
25
+ ["ClaudeBot", "ClaudeBot", "anthropic", "crawler"],
26
+ ["claude-code", "Claude Code", "anthropic", "harness"],
27
+ ["Perplexity-User", "Perplexity-User", "perplexity", "agent"],
28
+ ["PerplexityBot", "PerplexityBot", "perplexity", "crawler"],
29
+ ["Google-CloudVertexBot", "Google-CloudVertexBot", "google", "crawler"],
30
+ ["MistralAI-User", "MistralAI-User", "other", "agent"],
31
+ ["Meta-ExternalFetcher", "Meta-ExternalFetcher", "other", "agent"],
32
+ ["Meta-ExternalAgent", "Meta-ExternalAgent", "other", "crawler"],
33
+ ["Amazonbot", "Amazonbot", "other", "crawler"],
34
+ ["DuckAssistBot", "DuckAssistBot", "other", "crawler"],
35
+ ["CCBot", "CCBot", "other", "crawler"],
36
+ ["Bytespider", "Bytespider", "other", "crawler"],
37
+ ["Googlebot", "Googlebot", "google", "search"],
38
+ ["Google-InspectionTool", "Google-InspectionTool", "google", "search"],
39
+ ["bingbot", "Bingbot", "microsoft", "search"],
40
+ ["Applebot", "Applebot", "unknown", "search"],
41
+ ["DuckDuckBot", "DuckDuckBot", "unknown", "search"],
42
+ ["YandexBot", "YandexBot", "unknown", "search"],
43
+ ["Baiduspider", "Baiduspider", "unknown", "search"],
44
+ ["PetalBot", "PetalBot", "unknown", "search"],
45
+ ["BingPreview", "BingPreview", "microsoft", "preview"],
46
+ ["facebookexternalhit", "facebookexternalhit", "unknown", "preview"],
47
+ ["Slackbot-LinkExpanding", "Slackbot", "unknown", "preview"],
48
+ ["Slackbot", "Slackbot", "unknown", "preview"],
49
+ ["Twitterbot", "Twitterbot", "unknown", "preview"],
50
+ ["Discordbot", "Discordbot", "unknown", "preview"],
51
+ ["LinkedInBot", "LinkedInBot", "unknown", "preview"],
52
+ ["TelegramBot", "TelegramBot", "unknown", "preview"],
53
+ ["WhatsApp", "WhatsApp", "unknown", "preview"],
54
+ ["UptimeRobot", "UptimeRobot", "unknown", "monitor"],
55
+ ["vercel-cron", "Vercel Cron", "unknown", "monitor"],
56
+ ["farmjs-clock", "Farm.js clock", "unknown", "monitor"],
57
+ ["farmjs-infra-safe-fetch", "Farm.js Infra", "unknown", "bot"],
58
+ ["FarmjsInfra-Discovery", "Farm.js Infra", "unknown", "bot"],
59
+ ["GoogleOther", "GoogleOther", "google", "bot"],
60
+ ["HeadlessChrome", "Headless Chrome", "unknown", "bot"],
61
+ ["PhantomJS", "PhantomJS", "unknown", "bot"],
62
+ ["Chrome-Lighthouse", "Lighthouse", "unknown", "bot"],
63
+ ["Scrapy", "Scrapy", "unknown", "bot"],
64
+ ["curl", "curl", "unknown", "script"],
65
+ ["Wget", "Wget", "unknown", "script"],
66
+ ["python-requests", "python-requests", "unknown", "script"],
67
+ ["python-httpx", "python-httpx", "unknown", "script"],
68
+ ["Python-urllib", "Python-urllib", "unknown", "script"],
69
+ ["aiohttp", "aiohttp", "unknown", "script"],
70
+ ["axios", "axios", "unknown", "script"],
71
+ ["node-fetch", "node-fetch", "unknown", "script"],
72
+ ["undici", "undici", "unknown", "script"],
73
+ // Node's built-in fetch sends exactly `node`.
74
+ ["node", "Node.js", "unknown", "script"],
75
+ ["Bun", "Bun", "unknown", "script"],
76
+ ["Deno", "Deno", "unknown", "script"],
77
+ ["Go-http-client", "Go", "unknown", "script"],
78
+ ["okhttp", "OkHttp", "unknown", "script"],
79
+ ["Java-http-client", "Java", "unknown", "script"],
80
+ ["Java", "Java", "unknown", "script"],
81
+ ["Apache-HttpClient", "Apache HttpClient", "unknown", "script"],
82
+ ["PostmanRuntime", "Postman", "unknown", "script"],
83
+ ["insomnia", "Insomnia", "unknown", "script"],
84
+ ["HTTPie", "HTTPie", "unknown", "script"],
85
+ ["libwww-perl", "libwww-perl", "unknown", "script"],
86
+ ["Ruby", "Ruby", "unknown", "script"],
87
+ ["got", "got", "unknown", "script"]
30
88
  ];
31
- var AGENT_PATTERNS = AGENT_TOKENS.map(([token, family, category]) => ({
32
- pattern: new RegExp(`(?:^|[\\s;(])${token}(?=[/\\s;)]|$)`, "i"),
33
- family,
34
- category
35
- }));
89
+ var CLIENT_PATTERN = new RegExp(
90
+ `(?:^|[\\s;(])(?:${CLIENT_TOKENS.map(([token]) => `(${token})`).join("|")})(?=[/\\s;)]|$)`,
91
+ "gi"
92
+ );
93
+ var PRECEDENCE = [
94
+ "harness",
95
+ "agent",
96
+ "crawler",
97
+ "search",
98
+ "preview",
99
+ "monitor",
100
+ "bot",
101
+ "script"
102
+ ];
103
+ var AI_CATEGORIES = /* @__PURE__ */ new Set(["agent", "crawler", "harness"]);
104
+ var BROWSERS = [
105
+ [/\bEdg(?:e|A|iOS)?\//, "Edge"],
106
+ [/\bOPR\//, "Opera"],
107
+ [/\bSamsungBrowser\//, "Samsung Internet"],
108
+ [/\b(?:Firefox|FxiOS)\//, "Firefox"],
109
+ [/\b(?:Chrome|CriOS)\//, "Chrome"],
110
+ [/\bVersion\/[\d.]+ (?:Mobile\/\w+ )?Safari\//, "Safari"]
111
+ ];
112
+ var BOT_WORD = /(?:bot|crawler|spider|scraper)(?:[/\s;)_-]|$)/i;
36
113
  var UNKNOWN = { family: "unknown", category: "unknown", identity: "unknown" };
114
+ function matchToken(userAgent) {
115
+ let best = null;
116
+ let vendor;
117
+ for (const match of userAgent.matchAll(CLIENT_PATTERN)) {
118
+ const index = match.findIndex((group, i) => i > 0 && group !== void 0) - 1;
119
+ const [, name, family, category] = CLIENT_TOKENS[index];
120
+ if (family !== "unknown") {
121
+ if (vendor && vendor !== family) return false;
122
+ vendor = family;
123
+ }
124
+ if (!best || PRECEDENCE.indexOf(category) < PRECEDENCE.indexOf(best.category))
125
+ best = { name, family, category };
126
+ }
127
+ return best;
128
+ }
37
129
  function classifyFarmAgent(userAgent) {
38
- const value = (userAgent ?? "").slice(0, 2048);
39
- const matches = AGENT_PATTERNS.filter(({ pattern }) => pattern.test(value));
40
- if (matches.length === 1) {
41
- const { family, category } = matches[0];
42
- return { family, category, identity: "self-reported" };
130
+ const match = matchToken((userAgent ?? "").slice(0, 2048));
131
+ if (match && AI_CATEGORIES.has(match.category)) {
132
+ const { family, category } = match;
133
+ return {
134
+ family,
135
+ category,
136
+ identity: "self-reported"
137
+ };
43
138
  }
44
139
  return { ...UNKNOWN };
45
140
  }
141
+ function classifyFarmClient(request) {
142
+ const { headers } = request;
143
+ const userAgent = (headers.get("user-agent") ?? "").slice(0, 2048);
144
+ const match = matchToken(userAgent);
145
+ if (match === false) return { ...UNKNOWN };
146
+ if (match && AI_CATEGORIES.has(match.category)) return declared(match);
147
+ if (/"https:\/\/chatgpt\.com\/?"/i.test(headers.get("signature-agent") ?? ""))
148
+ return declared({ name: "ChatGPT agent", family: "openai", category: "agent" });
149
+ if (isMcpRequest(request))
150
+ return declared({ name: "MCP client", family: "unknown", category: "harness" });
151
+ if (match) return declared(match);
152
+ const browser = browserName(userAgent);
153
+ if (browser !== void 0 && headers.has("sec-fetch-site") && headers.has("sec-fetch-dest"))
154
+ return declared({ name: browser, family: "unknown", category: "browser" });
155
+ if (BOT_WORD.test(userAgent) || userAgent.includes("://"))
156
+ return declared({ name: "", family: "unknown", category: "bot" });
157
+ return { ...UNKNOWN };
158
+ }
159
+ function declared({ name, family, category }) {
160
+ return { family, category, identity: "self-reported", ...name ? { name } : {} };
161
+ }
162
+ function isMcpRequest(request) {
163
+ const { headers } = request;
164
+ if (headers.has("mcp-protocol-version") || headers.has("mcp-session-id")) return true;
165
+ const accept = headers.get("accept") ?? "";
166
+ return request.method === "POST" && /(?:^|[\s,])application\/json(?:[\s;,]|$)/i.test(accept) && /(?:^|[\s,])text\/event-stream(?:[\s;,]|$)/i.test(accept);
167
+ }
168
+ function browserName(userAgent) {
169
+ if (!userAgent.startsWith("Mozilla/5.0 (") || /compatible;|:\/\//i.test(userAgent)) return;
170
+ return BROWSERS.find(([pattern]) => pattern.test(userAgent))?.[1] ?? "";
171
+ }
46
172
  var FARM_INTERNAL_READ_HEADER = "x-farm-internal-read";
47
173
  function emitFarmAgentRead(request, surface, status, view) {
48
174
  if (request.headers.has(FARM_INTERNAL_READ_HEADER)) return;
@@ -1369,6 +1495,7 @@ function decodeHtml(input) {
1369
1495
 
1370
1496
  export {
1371
1497
  classifyFarmAgent,
1498
+ classifyFarmClient,
1372
1499
  FARM_INTERNAL_READ_HEADER,
1373
1500
  emitFarmAgentRead,
1374
1501
  createFarmMarkdownViewResponse,
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
3
+ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
4
4
 
5
5
  // src/i18n/catalog.ts
6
6
  var _promises = require('fs/promises');
@@ -11,7 +11,7 @@ async function readFarmI18nCatalogs(config) {
11
11
  }
12
12
  const catalogs = {};
13
13
  for (const locale of config.locales) {
14
- const filePath = _chunkLNVGXUL3cjs.resolveFarmI18nMessagePath.call(void 0, config, locale);
14
+ const filePath = _chunkZMSVKVI3cjs.resolveFarmI18nMessagePath.call(void 0, config, locale);
15
15
  let source;
16
16
  try {
17
17
  source = await _promises.readFile.call(void 0, filePath, "utf8");
@@ -10,14 +10,15 @@ import {
10
10
  resolveFarmDocsContentDir,
11
11
  toFarmDocsMarkdownPage,
12
12
  toFarmDocsPublicSitemapConfig
13
- } from "./chunk-LXEJNWF5.mjs";
13
+ } from "./chunk-73K53YPP.mjs";
14
14
  import {
15
15
  docsEngine,
16
- loadFarmDocsEngine
17
- } from "./chunk-VE3FWJBO.mjs";
16
+ loadFarmDocsEngine,
17
+ loadFarmDocsOpenApiDiscovery
18
+ } from "./chunk-LRPPXKCX.mjs";
18
19
  import {
19
20
  resolveDocsConfig
20
- } from "./chunk-IYDJNCR7.mjs";
21
+ } from "./chunk-462MUII7.mjs";
21
22
  import {
22
23
  getFarmDocsAdapterConfigModule,
23
24
  isSecretDocsConfigKey
@@ -357,7 +358,7 @@ function getDocsLlmsOptions(context, request) {
357
358
  ...configured
358
359
  };
359
360
  }
360
- function getDocsDiscoveryOptions(context, request) {
361
+ function getDocsDiscoveryOptions(context, request, openApiDiscovery) {
361
362
  const origin = new URL(request.url).origin;
362
363
  return {
363
364
  origin,
@@ -384,7 +385,7 @@ function getDocsDiscoveryOptions(context, request) {
384
385
  llms: getDocsLlmsOptions(context, request),
385
386
  sitemap: context.docs.config.sitemap ?? true,
386
387
  robots: context.docs.config.robots ?? true,
387
- openapi: docsEngine().resolveApiReferenceOpenApiDiscovery(context.docs.config.apiReference),
388
+ openapi: openApiDiscovery(context.docs.config.apiReference),
388
389
  markdown: {
389
390
  acceptHeader: true,
390
391
  signatureAgentHeader: true
@@ -406,7 +407,7 @@ function renderLlmsTxt(context, request, full) {
406
407
  );
407
408
  return full ? generated.llmsFullTxt : generated.llmsTxt;
408
409
  }
409
- function renderSkillDocument(context, request) {
410
+ function renderSkillDocument(context, request, openApiDiscovery) {
410
411
  const farmAliases = [
411
412
  "## Farm API Route Aliases",
412
413
  "",
@@ -419,22 +420,24 @@ function renderSkillDocument(context, request) {
419
420
  "- Sitemap XML: /api/docs?format=sitemap-xml",
420
421
  "- Agent spec JSON: /api/docs/agent/spec"
421
422
  ].join("\n");
422
- return `${docsEngine().renderDocsSkillDocument(getDocsDiscoveryOptions(context, request)).trim()}
423
+ return `${docsEngine().renderDocsSkillDocument(getDocsDiscoveryOptions(context, request, openApiDiscovery)).trim()}
423
424
 
424
425
  ${farmAliases}
425
426
  `;
426
427
  }
427
- function renderAgentsDocument(context, request) {
428
- return `${docsEngine().renderDocsAgentsDocument(getDocsDiscoveryOptions(context, request)).trim()}
428
+ function renderAgentsDocument(context, request, openApiDiscovery) {
429
+ return `${docsEngine().renderDocsAgentsDocument(getDocsDiscoveryOptions(context, request, openApiDiscovery)).trim()}
429
430
  `;
430
431
  }
431
- function buildAgentSpec(context, request) {
432
+ function buildAgentSpec(context, request, openApiDiscovery) {
432
433
  const url = new URL(request.url);
433
434
  const origin = url.origin;
434
435
  const pages = discoverFarmDocsPages(context.contentDir, context.docs).filter(
435
436
  (page) => !context.isPathGuarded(page.href)
436
437
  );
437
- const spec = docsEngine().buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
438
+ const spec = docsEngine().buildDocsAgentDiscoverySpec(
439
+ getDocsDiscoveryOptions(context, request, openApiDiscovery)
440
+ );
438
441
  const title = getDocsTitle(context.docs);
439
442
  return {
440
443
  ...spec,
@@ -613,10 +616,18 @@ async function handleDocsAPIGet(request, context) {
613
616
  return json(buildPublicConfig(context));
614
617
  }
615
618
  if (format === "skill")
616
- return text(renderSkillDocument(context, request), "text/markdown; charset=utf-8");
619
+ return text(
620
+ renderSkillDocument(context, request, await loadFarmDocsOpenApiDiscovery()),
621
+ "text/markdown; charset=utf-8"
622
+ );
617
623
  if (format === "agents")
618
- return text(renderAgentsDocument(context, request), "text/markdown; charset=utf-8");
619
- if (format === "agent" || format === "agent-spec") return json(buildAgentSpec(context, request));
624
+ return text(
625
+ renderAgentsDocument(context, request, await loadFarmDocsOpenApiDiscovery()),
626
+ "text/markdown; charset=utf-8"
627
+ );
628
+ if (format === "agent" || format === "agent-spec") {
629
+ return json(buildAgentSpec(context, request, await loadFarmDocsOpenApiDiscovery()));
630
+ }
620
631
  if (format === "diagnostics") {
621
632
  return context.diagnostics ? json(buildDiagnostics(context)) : json({ error: "Docs diagnostics are only available in development" }, { status: 404 });
622
633
  }
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-423SSBYQ.mjs";
16
16
  import {
17
17
  FARM_VERSION
18
- } from "./chunk-RJUCNO7R.mjs";
18
+ } from "./chunk-JMOCMXTQ.mjs";
19
19
 
20
20
  // src/mobile/analyzer.ts
21
21
  import { createHash } from "crypto";
@@ -3,6 +3,9 @@
3
3
  var _chunkR5U7OIPIcjs = require('./chunk-R5U7OIPI.cjs');
4
4
 
5
5
 
6
+ var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
7
+
8
+
6
9
 
7
10
  var _chunkOWQV6MLMcjs = require('./chunk-OWQV6MLM.cjs');
8
11
 
@@ -57,7 +60,11 @@ function resolveFarmLocaleRequest(request, config, options = {}) {
57
60
  locale: detected.locale,
58
61
  source: detected.source,
59
62
  pathname: pathMatch.pathname,
60
- redirect: shouldRedirect ? `${_chunkOWQV6MLMcjs.localizeFarmPathname.call(void 0, pathMatch.pathname, detected.locale, config)}${url.search}${url.hash}` : void 0,
63
+ // Straight to the locale page's canonical URL, with the app's trailingSlash, not a second hop.
64
+ redirect: shouldRedirect ? `${_chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
65
+ _chunkOWQV6MLMcjs.localizeFarmPathname.call(void 0, pathMatch.pathname, detected.locale, config),
66
+ config.trailingSlash === true
67
+ )}${url.search}${url.hash}` : void 0,
61
68
  persist: detected.source !== "default"
62
69
  };
63
70
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkL6E4SHUBcjs = require('./chunk-L6E4SHUB.cjs');
3
+ var _chunkLGR7565Lcjs = require('./chunk-LGR7565L.cjs');
4
4
 
5
5
  // src/app-markdown.ts
6
6
  var _promises = require('fs/promises');
@@ -8,7 +8,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
8
8
  var _url = require('url');
9
9
  async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
10
10
  const source = await _promises.readFile.call(void 0, filePath, "utf8");
11
- return _chunkL6E4SHUBcjs.createFarmMarkdownRouteModule.call(void 0, {
11
+ return _chunkLGR7565Lcjs.createFarmMarkdownRouteModule.call(void 0, {
12
12
  source,
13
13
  filePath,
14
14
  components: options.components,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  FARM_DEFAULT_MCP_PATH,
3
3
  FARM_DEFAULT_MCP_TOOLS
4
- } from "./chunk-JMFTKNBA.mjs";
4
+ } from "./chunk-UVZMSRHF.mjs";
5
5
  import {
6
6
  normalizeFarmProductionSiteOrigin
7
- } from "./chunk-V25GSH43.mjs";
7
+ } from "./chunk-IXZSBO76.mjs";
8
8
  import {
9
9
  resolveFarmAppManifestConfig
10
10
  } from "./chunk-SQ5O7I3L.mjs";
11
11
  import {
12
12
  emitFarmAgentRead,
13
13
  getFarmMarkdownMirrorPath
14
- } from "./chunk-KPJYBSHL.mjs";
14
+ } from "./chunk-CPMME66W.mjs";
15
15
  import {
16
16
  readFarmEnvironmentValue
17
17
  } from "./chunk-WXFY5JIY.mjs";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-QDWMCFTH.mjs";
30
30
  import {
31
31
  FARM_VERSION
32
- } from "./chunk-RJUCNO7R.mjs";
32
+ } from "./chunk-JMOCMXTQ.mjs";
33
33
  import {
34
34
  applyFarmBasePath
35
35
  } from "./chunk-SF3JB56B.mjs";