@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
@@ -8,7 +8,7 @@ var _chunkGVYZCJZHcjs = require('./chunk-GVYZCJZH.cjs');
8
8
 
9
9
 
10
10
 
11
- var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
11
+ var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
12
12
 
13
13
 
14
14
 
@@ -18,7 +18,7 @@ var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
18
18
  var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
19
19
 
20
20
 
21
- var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
21
+ var _chunkHGB4PM2Ccjs = require('./chunk-HGB4PM2C.cjs');
22
22
 
23
23
 
24
24
  var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
@@ -974,7 +974,7 @@ function toFarmDocsPublicSitemapConfig(sitemap, basePath) {
974
974
  };
975
975
  }
976
976
  function buildFarmDocsSitemapManifest(pages, docs, origin, basePath) {
977
- return _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsSitemapManifest({
977
+ return _chunkNDOE76QCcjs.docsEngine.call(void 0, ).buildDocsSitemapManifest({
978
978
  pages: pages.map((page) => ({
979
979
  ...toFarmDocsMarkdownPage(page, basePath),
980
980
  sourcePath: page.sourcePath
@@ -985,7 +985,7 @@ function buildFarmDocsSitemapManifest(pages, docs, origin, basePath) {
985
985
  });
986
986
  }
987
987
  function renderFarmDocsRobotsTxt(docs, origin, basePath) {
988
- return _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsRobotsTxt({
988
+ return _chunkNDOE76QCcjs.docsEngine.call(void 0, ).renderDocsRobotsTxt({
989
989
  entry: getFarmDocsPublicEntry(docs, basePath),
990
990
  sitemap: toFarmDocsPublicSitemapConfig(_nullishCoalesce(docs.config.sitemap, () => ( true)), basePath),
991
991
  robots: _nullishCoalesce(docs.config.robots, () => ( true)),
@@ -1182,9 +1182,9 @@ function createFarmDocsPublicResponse(contentDir, docs, request, isPathGuarded,
1182
1182
  "Content-Type": contentType,
1183
1183
  "Cache-Control": "public, max-age=60"
1184
1184
  });
1185
- const llmsFormat = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).resolveDocsLlmsTxtFormat(url);
1185
+ const llmsFormat = _chunkNDOE76QCcjs.docsEngine.call(void 0, ).resolveDocsLlmsTxtFormat(url);
1186
1186
  if (llmsFormat) {
1187
- const generated = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsLlmsTxt(
1187
+ const generated = _chunkNDOE76QCcjs.docsEngine.call(void 0, ).renderDocsLlmsTxt(
1188
1188
  getPages().map(toDocsLlmsPage),
1189
1189
  getDocsLlmsOptions(docs, request, basePath)
1190
1190
  );
@@ -1193,10 +1193,10 @@ function createFarmDocsPublicResponse(contentDir, docs, request, isPathGuarded,
1193
1193
  headers: textHeaders("text/plain; charset=utf-8")
1194
1194
  });
1195
1195
  }
1196
- const sitemapFormat = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).resolveDocsSitemapRequest(url, _nullishCoalesce(docs.config.sitemap, () => ( true)));
1196
+ const sitemapFormat = _chunkNDOE76QCcjs.docsEngine.call(void 0, ).resolveDocsSitemapRequest(url, _nullishCoalesce(docs.config.sitemap, () => ( true)));
1197
1197
  if (sitemapFormat === "xml") {
1198
1198
  return new Response(
1199
- _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsSitemapXml(sitemapManifest(), {
1199
+ _chunkNDOE76QCcjs.docsEngine.call(void 0, ).renderDocsSitemapXml(sitemapManifest(), {
1200
1200
  baseUrl: url.origin,
1201
1201
  includeLastmod: true
1202
1202
  }),
@@ -1208,7 +1208,7 @@ function createFarmDocsPublicResponse(contentDir, docs, request, isPathGuarded,
1208
1208
  }
1209
1209
  if (sitemapFormat === "markdown") {
1210
1210
  return new Response(
1211
- _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsSitemapMarkdown(sitemapManifest(), {
1211
+ _chunkNDOE76QCcjs.docsEngine.call(void 0, ).renderDocsSitemapMarkdown(sitemapManifest(), {
1212
1212
  includeDescriptions: true
1213
1213
  }),
1214
1214
  {
@@ -1217,14 +1217,14 @@ function createFarmDocsPublicResponse(contentDir, docs, request, isPathGuarded,
1217
1217
  }
1218
1218
  );
1219
1219
  }
1220
- if (_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).resolveDocsRobotsRequest(url, _nullishCoalesce(docs.config.robots, () => ( true)))) {
1220
+ if (_chunkNDOE76QCcjs.docsEngine.call(void 0, ).resolveDocsRobotsRequest(url, _nullishCoalesce(docs.config.robots, () => ( true)))) {
1221
1221
  return new Response(renderFarmDocsRobotsTxt(docs, url.origin, basePath), {
1222
1222
  status: 200,
1223
1223
  headers: textHeaders("text/plain; charset=utf-8")
1224
1224
  });
1225
1225
  }
1226
- if (_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).isDocsAgentDiscoveryRequest(url)) {
1227
- const spec = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(
1226
+ if (_chunkNDOE76QCcjs.docsEngine.call(void 0, ).isDocsAgentDiscoveryRequest(url)) {
1227
+ const spec = _chunkNDOE76QCcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(
1228
1228
  getDocsDiscoveryOptions(docs, request, basePath)
1229
1229
  );
1230
1230
  const title = getDocsTitle(docs);
@@ -1245,9 +1245,9 @@ function createFarmDocsPublicResponse(contentDir, docs, request, isPathGuarded,
1245
1245
  }
1246
1246
  );
1247
1247
  }
1248
- if (_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).isDocsAgentsRequest(url)) {
1248
+ if (_chunkNDOE76QCcjs.docsEngine.call(void 0, ).isDocsAgentsRequest(url)) {
1249
1249
  return new Response(
1250
- `${_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsAgentsDocument(getDocsDiscoveryOptions(docs, request, basePath)).trim()}
1250
+ `${_chunkNDOE76QCcjs.docsEngine.call(void 0, ).renderDocsAgentsDocument(getDocsDiscoveryOptions(docs, request, basePath)).trim()}
1251
1251
  `,
1252
1252
  {
1253
1253
  status: 200,
@@ -1255,9 +1255,9 @@ function createFarmDocsPublicResponse(contentDir, docs, request, isPathGuarded,
1255
1255
  }
1256
1256
  );
1257
1257
  }
1258
- if (_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).isDocsSkillRequest(url)) {
1258
+ if (_chunkNDOE76QCcjs.docsEngine.call(void 0, ).isDocsSkillRequest(url)) {
1259
1259
  return new Response(
1260
- `${_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsSkillDocument(getDocsDiscoveryOptions(docs, request, basePath)).trim()}
1260
+ `${_chunkNDOE76QCcjs.docsEngine.call(void 0, ).renderDocsSkillDocument(getDocsDiscoveryOptions(docs, request, basePath)).trim()}
1261
1261
  `,
1262
1262
  {
1263
1263
  status: 200,
@@ -1283,11 +1283,11 @@ function shouldReturnMarkdown(request) {
1283
1283
  if (url.pathname.endsWith(".md")) return true;
1284
1284
  const accept = request.headers.get("accept");
1285
1285
  const markdown = Math.max(
1286
- _chunkC2JOS77Zcjs.farmAcceptQuality.call(void 0, accept, "text/markdown"),
1287
- _chunkC2JOS77Zcjs.farmAcceptQuality.call(void 0, accept, "text/plain")
1286
+ _chunkHGB4PM2Ccjs.farmAcceptQuality.call(void 0, accept, "text/markdown"),
1287
+ _chunkHGB4PM2Ccjs.farmAcceptQuality.call(void 0, accept, "text/plain")
1288
1288
  );
1289
1289
  if (markdown <= 0) return false;
1290
- return markdown >= _chunkC2JOS77Zcjs.farmAcceptQuality.call(void 0, accept, "text/html", { wildcards: true });
1290
+ return markdown >= _chunkHGB4PM2Ccjs.farmAcceptQuality.call(void 0, accept, "text/html", { wildcards: true });
1291
1291
  }
1292
1292
  function escapeAttribute(value) {
1293
1293
  return escapeHtml(value).replace(/'/g, "&#39;");
@@ -1980,7 +1980,7 @@ function createFarmDocsHandler(docs, options) {
1980
1980
  if (!_optionalChain([docs, 'optionalAccess', _82 => _82.enabled]) || incomingRequest.method !== "GET" && incomingRequest.method !== "HEAD") {
1981
1981
  return null;
1982
1982
  }
1983
- await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
1983
+ await _chunkNDOE76QCcjs.loadFarmDocsEngine.call(void 0, );
1984
1984
  const request = toFarmDocsRouteRequest(incomingRequest, basePath);
1985
1985
  const requestUrl = new URL(request.url);
1986
1986
  if (request !== incomingRequest && (requestUrl.pathname === "/api/docs" || requestUrl.pathname.startsWith("/api/docs/"))) {
@@ -2043,7 +2043,7 @@ function createFarmDocsHandler(docs, options) {
2043
2043
  return omitFarmDocsHeadBody(
2044
2044
  request,
2045
2045
  new Response(
2046
- _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(toFarmDocsMarkdownPage(page, basePath), {
2046
+ _chunkNDOE76QCcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(toFarmDocsMarkdownPage(page, basePath), {
2047
2047
  origin,
2048
2048
  llms: _nullishCoalesce(docs.config.llmsTxt, () => ( true)),
2049
2049
  sitemap: toFarmDocsPublicSitemapConfig(docs.config.sitemap, basePath)
@@ -15,34 +15,160 @@ var _chunkA25FXJ7Dcjs = require('./chunk-A25FXJ7D.cjs');
15
15
  var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
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 = (_nullishCoalesce(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((_nullishCoalesce(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 = (_nullishCoalesce(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(_nullishCoalesce(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 = _nullishCoalesce(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 _nullishCoalesce(_optionalChain([BROWSERS, 'access', _2 => _2.find, 'call', _3 => _3(([pattern]) => pattern.test(userAgent)), 'optionalAccess', _4 => _4[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;
@@ -72,7 +198,7 @@ function parseMarkdownHeadingsFromLines(lines) {
72
198
  const headings = [];
73
199
  const used = /* @__PURE__ */ new Map();
74
200
  let index = 0;
75
- if (_optionalChain([lines, 'access', _2 => _2[0], 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) === "---") {
201
+ if (_optionalChain([lines, 'access', _5 => _5[0], 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) === "---") {
76
202
  const close = lines.findIndex((line, lineIndex) => lineIndex > 0 && line.trim() === "---");
77
203
  if (close > 0) index = close + 1;
78
204
  }
@@ -286,7 +412,7 @@ Continue: ${next} (about ${remaining} more tokens)
286
412
  function readOpenFences(lines) {
287
413
  const open = [];
288
414
  let fence;
289
- let frontMatter = _optionalChain([lines, 'access', _5 => _5[0], 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) === "---";
415
+ let frontMatter = _optionalChain([lines, 'access', _8 => _8[0], 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) === "---";
290
416
  for (let index = 0; index < lines.length; index++) {
291
417
  open.push(frontMatter && index > 0 ? { opener: "", closer: "" } : fence);
292
418
  const line = lines[index];
@@ -415,7 +541,7 @@ function resolveMarkdownConfig(config) {
415
541
  }
416
542
  function resolveMarkdownMirrorTarget(config, pathname, options = {}) {
417
543
  const hasMarkdownExtension = pathname.toLowerCase().endsWith(".md");
418
- if (!_optionalChain([config, 'optionalAccess', _8 => _8.enabled]) || !hasMarkdownExtension && !requestAcceptsMarkdown(options.accept)) {
544
+ if (!_optionalChain([config, 'optionalAccess', _11 => _11.enabled]) || !hasMarkdownExtension && !requestAcceptsMarkdown(options.accept)) {
419
545
  return null;
420
546
  }
421
547
  const targetPathname = _resolveFarmMarkdownIndexAlias(
@@ -424,7 +550,7 @@ function resolveMarkdownMirrorTarget(config, pathname, options = {}) {
424
550
  ),
425
551
  options.routePathname
426
552
  );
427
- const routePathname = _nullishCoalesce(_optionalChain([options, 'access', _9 => _9.routePathname, 'optionalCall', _10 => _10(targetPathname)]), () => ( targetPathname));
553
+ const routePathname = _nullishCoalesce(_optionalChain([options, 'access', _12 => _12.routePathname, 'optionalCall', _13 => _13(targetPathname)]), () => ( targetPathname));
428
554
  const route = findExposedMarkdownRoute(config, routePathname);
429
555
  if (!route && config.expose !== true) {
430
556
  return null;
@@ -439,7 +565,7 @@ async function createMarkdownMirrorResponse(options) {
439
565
  if (options.request.method !== "GET" && options.request.method !== "HEAD") {
440
566
  return null;
441
567
  }
442
- const requestUrl = _optionalChain([options, 'access', _11 => _11.requestUrl, 'optionalAccess', _12 => _12.href]) === options.request.url ? options.requestUrl : new URL(options.request.url);
568
+ const requestUrl = _optionalChain([options, 'access', _14 => _14.requestUrl, 'optionalAccess', _15 => _15.href]) === options.request.url ? options.requestUrl : new URL(options.request.url);
443
569
  const hasMarkdownExtension = requestUrl.pathname.toLowerCase().endsWith(".md");
444
570
  const target = resolveMarkdownMirrorTarget(options.config, requestUrl.pathname, {
445
571
  accept: options.request.headers.get("accept"),
@@ -481,7 +607,7 @@ async function createMarkdownMirrorResponse(options) {
481
607
  options.request.method === "HEAD"
482
608
  );
483
609
  if (accessResponse || options.request.method === "HEAD") {
484
- void _optionalChain([pageResponse, 'access', _13 => _13.body, 'optionalAccess', _14 => _14.cancel, 'call', _15 => _15(), 'access', _16 => _16.catch, 'call', _17 => _17(() => {
610
+ void _optionalChain([pageResponse, 'access', _16 => _16.body, 'optionalAccess', _17 => _17.cancel, 'call', _18 => _18(), 'access', _19 => _19.catch, 'call', _20 => _20(() => {
485
611
  })]);
486
612
  return _nullishCoalesce(accessResponse, () => ( new Response(null, {
487
613
  status: pageResponse.status,
@@ -496,7 +622,7 @@ async function createMarkdownMirrorResponse(options) {
496
622
  const region = pageResponse.status < 400 && /<form\b/i.test(html) ? readHtmlContentRegion(html) : void 0;
497
623
  const actions = region === void 0 ? [] : extractPageActionsFromRegion(region, pageUrl);
498
624
  for (const form of actions) {
499
- if (!_optionalChain([form, 'access', _18 => _18.action, 'optionalAccess', _19 => _19.startsWith, 'call', _20 => _20("/")])) continue;
625
+ if (!_optionalChain([form, 'access', _21 => _21.action, 'optionalAccess', _22 => _22.startsWith, 'call', _23 => _23("/")])) continue;
500
626
  const pathname = new URL(form.action, pageUrl.origin).pathname;
501
627
  const tool = _nullishCoalesce(_chunkLRB5OVRTcjs._findFarmMCPEndpointTool.call(void 0, form.method, pathname, options.apiServerBasePath), () => ( _chunkLRB5OVRTcjs._findFarmMCPEndpointTool.call(void 0, form.method, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname), options.apiServerBasePath)));
502
628
  if (tool) form.tool = tool;
@@ -504,8 +630,8 @@ async function createMarkdownMirrorResponse(options) {
504
630
  const markdown = pageResponse.status < 400 && requestUrl.searchParams.has("actions") ? "" : convertHtmlToMarkdown(
505
631
  html,
506
632
  {
507
- title: _optionalChain([target, 'access', _21 => _21.route, 'optionalAccess', _22 => _22.title]),
508
- includeMetadata: _nullishCoalesce(_optionalChain([options, 'access', _23 => _23.config, 'optionalAccess', _24 => _24.includeMetadata]), () => ( true)),
633
+ title: _optionalChain([target, 'access', _24 => _24.route, 'optionalAccess', _25 => _25.title]),
634
+ includeMetadata: _nullishCoalesce(_optionalChain([options, 'access', _26 => _26.config, 'optionalAccess', _27 => _27.includeMetadata]), () => ( true)),
509
635
  sourcePath: target.pathname,
510
636
  actionsPath: actions.length > 0 ? `${markdownPath}?actions` : void 0
511
637
  },
@@ -519,12 +645,12 @@ async function createMarkdownMirrorResponse(options) {
519
645
  if (!hasMarkdownExtension) {
520
646
  headersOut.set("Vary", "Accept");
521
647
  }
522
- for (const token of _nullishCoalesce(_optionalChain([pageResponse, 'access', _25 => _25.headers, 'access', _26 => _26.get, 'call', _27 => _27("vary"), 'optionalAccess', _28 => _28.split, 'call', _29 => _29(",")]), () => ( []))) {
648
+ for (const token of _nullishCoalesce(_optionalChain([pageResponse, 'access', _28 => _28.headers, 'access', _29 => _29.get, 'call', _30 => _30("vary"), 'optionalAccess', _31 => _31.split, 'call', _32 => _32(",")]), () => ( []))) {
523
649
  const name = token.trim();
524
650
  if (name && name.toLowerCase() !== "accept") appendHeaderToken(headersOut, "Vary", name);
525
651
  }
526
652
  const pageCacheControl = pageResponse.headers.get("cache-control");
527
- const cache = _nullishCoalesce(_nullishCoalesce(_optionalChain([target, 'access', _30 => _30.route, 'optionalAccess', _31 => _31.cache]), () => ( _optionalChain([options, 'access', _32 => _32.config, 'optionalAccess', _33 => _33.cache]))), () => ( false));
653
+ const cache = _nullishCoalesce(_nullishCoalesce(_optionalChain([target, 'access', _33 => _33.route, 'optionalAccess', _34 => _34.cache]), () => ( _optionalChain([options, 'access', _35 => _35.config, 'optionalAccess', _36 => _36.cache]))), () => ( false));
528
654
  headersOut.set(
529
655
  "Cache-Control",
530
656
  pageCacheControl && isPrivateCacheControl(pageCacheControl) ? pageCacheControl : _chunkNLBHLPEOcjs.withoutFarmDeploymentCookie.call(void 0, headers.get("cookie")) || headers.has("authorization") ? "private, no-store" : createMarkdownCacheHeader(cache)
@@ -533,7 +659,7 @@ async function createMarkdownMirrorResponse(options) {
533
659
  if (pageResponse.status >= 400) {
534
660
  preserveMarkdownResponseControlHeaders(pageResponse.headers, headersOut);
535
661
  }
536
- const robots = [pageResponse.headers.get("x-robots-tag"), readHtmlMetaContent(html, "robots")].filter((value) => Boolean(_optionalChain([value, 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]))).join(", ");
662
+ const robots = [pageResponse.headers.get("x-robots-tag"), readHtmlMetaContent(html, "robots")].filter((value) => Boolean(_optionalChain([value, 'optionalAccess', _37 => _37.trim, 'call', _38 => _38()]))).join(", ");
537
663
  if (robots) headersOut.set("X-Robots-Tag", robots);
538
664
  const canonical = readHtmlCanonicalHref(html);
539
665
  if (canonical) {
@@ -858,7 +984,7 @@ function getFarmMarkdownAlternatePath(config, pathname, options = {}) {
858
984
  return target ? target.markdownPath : null;
859
985
  }
860
986
  function isFarmMarkdownMirrorExposed(config, pathname) {
861
- if (!_optionalChain([config, 'optionalAccess', _36 => _36.enabled])) return false;
987
+ if (!_optionalChain([config, 'optionalAccess', _39 => _39.enabled])) return false;
862
988
  return config.expose === true || findExposedMarkdownRoute(config, pathname) !== null;
863
989
  }
864
990
  function matchesFarmMarkdownRoutePattern(pattern, pathname) {
@@ -944,7 +1070,7 @@ function extractHtmlBody(html) {
944
1070
  const body = rootMatch ? rootMatch[1] : bodyMatch ? bodyMatch[1] : html;
945
1071
  const main = extractFirstElementContent(body, ["main"]);
946
1072
  if (main !== void 0) return main;
947
- const articles = _nullishCoalesce(_optionalChain([body, 'access', _37 => _37.match, 'call', _38 => _38(/<article\b/gi), 'optionalAccess', _39 => _39.length]), () => ( 0));
1073
+ const articles = _nullishCoalesce(_optionalChain([body, 'access', _40 => _40.match, 'call', _41 => _41(/<article\b/gi), 'optionalAccess', _42 => _42.length]), () => ( 0));
948
1074
  return articles === 1 ? _nullishCoalesce(extractFirstElementContent(body, ["article"]), () => ( body)) : body;
949
1075
  }
950
1076
  function extractFirstElementContent(html, tagNames) {
@@ -958,7 +1084,7 @@ function extractFirstElementContent(html, tagNames) {
958
1084
  }
959
1085
  function readHtmlMetaContent(html, name) {
960
1086
  for (const match of html.matchAll(/<meta\b([^>]*)>/gi)) {
961
- if (_optionalChain([readHtmlAttribute, 'call', _40 => _40(match[1], "name"), 'optionalAccess', _41 => _41.toLowerCase, 'call', _42 => _42()]) === name) {
1087
+ if (_optionalChain([readHtmlAttribute, 'call', _43 => _43(match[1], "name"), 'optionalAccess', _44 => _44.toLowerCase, 'call', _45 => _45()]) === name) {
962
1088
  return readHtmlAttribute(match[1], "content");
963
1089
  }
964
1090
  }
@@ -966,8 +1092,8 @@ function readHtmlMetaContent(html, name) {
966
1092
  }
967
1093
  function readHtmlCanonicalHref(html) {
968
1094
  for (const match of html.matchAll(/<link\b([^>]*)>/gi)) {
969
- const rel = _optionalChain([readHtmlAttribute, 'call', _43 => _43(match[1], "rel"), 'optionalAccess', _44 => _44.toLowerCase, 'call', _45 => _45(), 'access', _46 => _46.split, 'call', _47 => _47(/\s+/)]);
970
- if (_optionalChain([rel, 'optionalAccess', _48 => _48.includes, 'call', _49 => _49("canonical")])) return readHtmlAttribute(match[1], "href");
1095
+ const rel = _optionalChain([readHtmlAttribute, 'call', _46 => _46(match[1], "rel"), 'optionalAccess', _47 => _47.toLowerCase, 'call', _48 => _48(), 'access', _49 => _49.split, 'call', _50 => _50(/\s+/)]);
1096
+ if (_optionalChain([rel, 'optionalAccess', _51 => _51.includes, 'call', _52 => _52("canonical")])) return readHtmlAttribute(match[1], "href");
971
1097
  }
972
1098
  return void 0;
973
1099
  }
@@ -994,7 +1120,7 @@ function extractPageActionsFromRegion(region, pageUrl) {
994
1120
  return actions;
995
1121
  }
996
1122
  function readPageForm(attributes, content, pageUrl, labelsFor) {
997
- const method = _optionalChain([readDecodedAttribute, 'call', _50 => _50(attributes, "method"), 'optionalAccess', _51 => _51.trim, 'call', _52 => _52(), 'access', _53 => _53.toLowerCase, 'call', _54 => _54()]);
1123
+ const method = _optionalChain([readDecodedAttribute, 'call', _53 => _53(attributes, "method"), 'optionalAccess', _54 => _54.trim, 'call', _55 => _55(), 'access', _56 => _56.toLowerCase, 'call', _57 => _57()]);
998
1124
  if (method === "dialog") return void 0;
999
1125
  const target = resolveFormTarget(readDecodedAttribute(attributes, "action"), pageUrl);
1000
1126
  const form = {
@@ -1004,11 +1130,11 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
1004
1130
  submit: []
1005
1131
  };
1006
1132
  const name = _nullishCoalesce(_nullishCoalesce(readDecodedAttribute(attributes, "aria-label"), () => ( readDecodedAttribute(attributes, "name"))), () => ( readDecodedAttribute(attributes, "id")));
1007
- if (_optionalChain([name, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()])) form.name = name.trim();
1133
+ if (_optionalChain([name, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59()])) form.name = name.trim();
1008
1134
  if (target) form.action = target;
1009
1135
  else form.requiresJavaScript = true;
1010
1136
  if (form.method === "POST") {
1011
- const enctype = _optionalChain([readDecodedAttribute, 'call', _57 => _57(attributes, "enctype"), 'optionalAccess', _58 => _58.trim, 'call', _59 => _59(), 'access', _60 => _60.toLowerCase, 'call', _61 => _61()]);
1137
+ const enctype = _optionalChain([readDecodedAttribute, 'call', _60 => _60(attributes, "enctype"), 'optionalAccess', _61 => _61.trim, 'call', _62 => _62(), 'access', _63 => _63.toLowerCase, 'call', _64 => _64()]);
1012
1138
  form.enctype = enctype && FORM_ENCTYPES.has(enctype) ? enctype : "application/x-www-form-urlencoded";
1013
1139
  }
1014
1140
  const wrappingLabels = [...content.matchAll(/<label\b[^>]*>([\s\S]*?)<\/label>/gi)].map(
@@ -1019,13 +1145,13 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
1019
1145
  })
1020
1146
  );
1021
1147
  const labelOf = (controlAttributes, index) => {
1022
- const aria = _optionalChain([readDecodedAttribute, 'call', _62 => _62(controlAttributes, "aria-label"), 'optionalAccess', _63 => _63.trim, 'call', _64 => _64()]);
1148
+ const aria = _optionalChain([readDecodedAttribute, 'call', _65 => _65(controlAttributes, "aria-label"), 'optionalAccess', _66 => _66.trim, 'call', _67 => _67()]);
1023
1149
  if (aria) return aria;
1024
1150
  const id = readDecodedAttribute(controlAttributes, "id");
1025
1151
  const forLabel = id ? labelsFor.get(id) : void 0;
1026
1152
  if (forLabel) return forLabel;
1027
1153
  const wrapping = wrappingLabels.find((label) => label.start < index && index < label.end);
1028
- return _optionalChain([wrapping, 'optionalAccess', _65 => _65.text]) || void 0;
1154
+ return _optionalChain([wrapping, 'optionalAccess', _68 => _68.text]) || void 0;
1029
1155
  };
1030
1156
  const groups = /* @__PURE__ */ new Map();
1031
1157
  const controls = /<(input)\b([^>]*)>|<(select|textarea|button)\b([^>]*)>([\s\S]*?)<\/\3>/gi;
@@ -1036,7 +1162,7 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
1036
1162
  if (hasHtmlAttribute(controlAttributes, "disabled")) continue;
1037
1163
  const label = labelOf(controlAttributes, match.index);
1038
1164
  const fieldName = readDecodedAttribute(controlAttributes, "name");
1039
- const typeAttribute = _optionalChain([readDecodedAttribute, 'call', _66 => _66(controlAttributes, "type"), 'optionalAccess', _67 => _67.trim, 'call', _68 => _68(), 'access', _69 => _69.toLowerCase, 'call', _70 => _70()]);
1165
+ const typeAttribute = _optionalChain([readDecodedAttribute, 'call', _69 => _69(controlAttributes, "type"), 'optionalAccess', _70 => _70.trim, 'call', _71 => _71(), 'access', _72 => _72.toLowerCase, 'call', _73 => _73()]);
1040
1166
  const type = tag === "input" ? _nullishCoalesce(typeAttribute, () => ( "text")) : tag === "button" ? _nullishCoalesce(typeAttribute, () => ( "submit")) : tag;
1041
1167
  if (tag === "button" && !["button", "reset"].includes(type) || tag === "input" && (type === "submit" || type === "image")) {
1042
1168
  const submit = {
@@ -1050,7 +1176,7 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
1050
1176
  const resolved = resolveFormTarget(formAction, pageUrl);
1051
1177
  if (resolved) submit.action = resolved;
1052
1178
  }
1053
- const formMethod = _optionalChain([readDecodedAttribute, 'call', _71 => _71(controlAttributes, "formmethod"), 'optionalAccess', _72 => _72.toLowerCase, 'call', _73 => _73()]);
1179
+ const formMethod = _optionalChain([readDecodedAttribute, 'call', _74 => _74(controlAttributes, "formmethod"), 'optionalAccess', _75 => _75.toLowerCase, 'call', _76 => _76()]);
1054
1180
  if (formMethod === "get" || formMethod === "post") submit.method = formMethod.toUpperCase();
1055
1181
  form.submit.push(submit);
1056
1182
  continue;
@@ -1128,7 +1254,7 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
1128
1254
  function resolveFormTarget(action, pageUrl) {
1129
1255
  let target;
1130
1256
  try {
1131
- target = new URL(_optionalChain([action, 'optionalAccess', _74 => _74.trim, 'call', _75 => _75()]) || pageUrl.href, pageUrl);
1257
+ target = new URL(_optionalChain([action, 'optionalAccess', _77 => _77.trim, 'call', _78 => _78()]) || pageUrl.href, pageUrl);
1132
1258
  } catch (e5) {
1133
1259
  return void 0;
1134
1260
  }
@@ -1155,7 +1281,7 @@ function readHtmlAttribute(attributes, name) {
1155
1281
  }
1156
1282
  function readCodeLanguage(attributesList) {
1157
1283
  for (const attributes of attributesList) {
1158
- const language = _nullishCoalesce(_nullishCoalesce(readHtmlAttribute(attributes, "data-language"), () => ( readHtmlAttribute(attributes, "data-lang"))), () => ( _optionalChain([readHtmlAttribute, 'call', _76 => _76(attributes, "class"), 'optionalAccess', _77 => _77.match, 'call', _78 => _78(/(?:^|\s)lang(?:uage)?-(\S+)/), 'optionalAccess', _79 => _79[1]])));
1284
+ const language = _nullishCoalesce(_nullishCoalesce(readHtmlAttribute(attributes, "data-language"), () => ( readHtmlAttribute(attributes, "data-lang"))), () => ( _optionalChain([readHtmlAttribute, 'call', _79 => _79(attributes, "class"), 'optionalAccess', _80 => _80.match, 'call', _81 => _81(/(?:^|\s)lang(?:uage)?-(\S+)/), 'optionalAccess', _82 => _82[1]])));
1159
1285
  if (language && /^[\w#+.-]+$/.test(language)) return language;
1160
1286
  }
1161
1287
  return void 0;
@@ -1263,7 +1389,7 @@ function matchClosingTags(html) {
1263
1389
  while (match = tags.exec(html)) {
1264
1390
  const name = match[2].toLowerCase();
1265
1391
  if (match[1]) {
1266
- const start = _optionalChain([open, 'access', _80 => _80.get, 'call', _81 => _81(name), 'optionalAccess', _82 => _82.pop, 'call', _83 => _83()]);
1392
+ const start = _optionalChain([open, 'access', _83 => _83.get, 'call', _84 => _84(name), 'optionalAccess', _85 => _85.pop, 'call', _86 => _86()]);
1267
1393
  if (start !== void 0) closes.set(start, match.index + match[0].length);
1268
1394
  } else if (!VOID_TAGS.has(name) && !isSelfClosingTag(match[0])) {
1269
1395
  let starts = open.get(name);
@@ -1296,7 +1422,7 @@ function resolveStreamedBoundaries(html, { boundaries, placeholders }) {
1296
1422
  let cursor = 0;
1297
1423
  let match;
1298
1424
  while (match = openingTag.exec(html)) {
1299
- const id = _optionalChain([/\sid="([^"]*)"/, 'access', _84 => _84.exec, 'call', _85 => _85(match[2]), 'optionalAccess', _86 => _86[1]]);
1425
+ const id = _optionalChain([/\sid="([^"]*)"/, 'access', _87 => _87.exec, 'call', _88 => _88(match[2]), 'optionalAccess', _89 => _89[1]]);
1300
1426
  if (!id || !wanted.has(id) || segments.has(id)) continue;
1301
1427
  const close = closingTags.get(match.index);
1302
1428
  if (close === void 0) continue;
@@ -1393,4 +1519,5 @@ function decodeHtml(input) {
1393
1519
 
1394
1520
 
1395
1521
 
1396
- exports.classifyFarmAgent = classifyFarmAgent; exports.FARM_INTERNAL_READ_HEADER = FARM_INTERNAL_READ_HEADER; exports.emitFarmAgentRead = emitFarmAgentRead; exports.createFarmMarkdownViewResponse = createFarmMarkdownViewResponse; exports.FARM_MARKDOWN_CONTENT_TYPE = FARM_MARKDOWN_CONTENT_TYPE; exports.FARM_MARKDOWN_PAGE_CHECK_HEADER = FARM_MARKDOWN_PAGE_CHECK_HEADER; exports._getFarmMarkdownPageCheckToken = _getFarmMarkdownPageCheckToken; exports._isFarmMarkdownPageCheck = _isFarmMarkdownPageCheck; exports.farmRequestWantsMarkdown = farmRequestWantsMarkdown; exports.createFarmMarkdownErrorBody = createFarmMarkdownErrorBody; exports.resolveMarkdownConfig = resolveMarkdownConfig; exports.resolveMarkdownMirrorTarget = resolveMarkdownMirrorTarget; exports.createMarkdownMirrorResponse = createMarkdownMirrorResponse; exports.applyMarkdownNegotiationHeaders = applyMarkdownNegotiationHeaders; exports.htmlToMarkdown = htmlToMarkdown; exports._resolveFarmMarkdownIndexAlias = _resolveFarmMarkdownIndexAlias; exports._getFarmMarkdownPath = _getFarmMarkdownPath; exports.farmAcceptQuality = farmAcceptQuality; exports.requestAcceptsMarkdown = requestAcceptsMarkdown; exports.getFarmMarkdownMirrorPath = getFarmMarkdownMirrorPath; exports.getFarmMarkdownAlternatePath = getFarmMarkdownAlternatePath; exports.isFarmMarkdownMirrorExposed = isFarmMarkdownMirrorExposed; exports.matchesFarmMarkdownRoutePattern = matchesFarmMarkdownRoutePattern; exports._readFarmRenderedHtml = _readFarmRenderedHtml; exports.extractFarmPageActions = extractFarmPageActions;
1522
+
1523
+ exports.classifyFarmAgent = classifyFarmAgent; exports.classifyFarmClient = classifyFarmClient; exports.FARM_INTERNAL_READ_HEADER = FARM_INTERNAL_READ_HEADER; exports.emitFarmAgentRead = emitFarmAgentRead; exports.createFarmMarkdownViewResponse = createFarmMarkdownViewResponse; exports.FARM_MARKDOWN_CONTENT_TYPE = FARM_MARKDOWN_CONTENT_TYPE; exports.FARM_MARKDOWN_PAGE_CHECK_HEADER = FARM_MARKDOWN_PAGE_CHECK_HEADER; exports._getFarmMarkdownPageCheckToken = _getFarmMarkdownPageCheckToken; exports._isFarmMarkdownPageCheck = _isFarmMarkdownPageCheck; exports.farmRequestWantsMarkdown = farmRequestWantsMarkdown; exports.createFarmMarkdownErrorBody = createFarmMarkdownErrorBody; exports.resolveMarkdownConfig = resolveMarkdownConfig; exports.resolveMarkdownMirrorTarget = resolveMarkdownMirrorTarget; exports.createMarkdownMirrorResponse = createMarkdownMirrorResponse; exports.applyMarkdownNegotiationHeaders = applyMarkdownNegotiationHeaders; exports.htmlToMarkdown = htmlToMarkdown; exports._resolveFarmMarkdownIndexAlias = _resolveFarmMarkdownIndexAlias; exports._getFarmMarkdownPath = _getFarmMarkdownPath; exports.farmAcceptQuality = farmAcceptQuality; exports.requestAcceptsMarkdown = requestAcceptsMarkdown; exports.getFarmMarkdownMirrorPath = getFarmMarkdownMirrorPath; exports.getFarmMarkdownAlternatePath = getFarmMarkdownAlternatePath; exports.isFarmMarkdownMirrorExposed = isFarmMarkdownMirrorExposed; exports.matchesFarmMarkdownRoutePattern = matchesFarmMarkdownRoutePattern; exports._readFarmRenderedHtml = _readFarmRenderedHtml; exports.extractFarmPageActions = extractFarmPageActions;