@farm.js/core 0.1.72 → 0.1.74
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.
- package/dist/{agent-mcp-handler-VIT4GOSR.mjs → agent-mcp-handler-HX4F4VKN.mjs} +4 -4
- package/dist/{agent-mcp-handler-KE4J3W7S.cjs → agent-mcp-handler-NRIL4JBC.cjs} +5 -5
- package/dist/{agent-mcp.d-Cwff7lcA.d.mts → agent-mcp.d-BEhDfdWc.d.mts} +1 -1
- package/dist/{agent-mcp.d-BO3rZXEM.d.ts → agent-mcp.d-CX8_oOT_.d.ts} +1 -1
- package/dist/agent-runtime.cjs +4 -4
- package/dist/agent-runtime.d.mts +5 -5
- package/dist/agent-runtime.d.ts +5 -5
- package/dist/agent-runtime.mjs +3 -3
- package/dist/{analyzer-5Q75LTIL.mjs → analyzer-2K35LIQZ.mjs} +2 -2
- package/dist/analyzer-6EOYURMV.cjs +16 -0
- package/dist/api/client.d.mts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.native.d.mts +4 -4
- package/dist/api/client.native.d.ts +4 -4
- package/dist/api/node.cjs +9 -8
- package/dist/api/node.d.mts +7 -7
- package/dist/api/node.d.ts +7 -7
- package/dist/api/node.mjs +8 -7
- package/dist/api/route-manager.cjs +11 -9
- package/dist/api/route-manager.d.mts +10 -8
- package/dist/api/route-manager.d.ts +10 -8
- package/dist/api/route-manager.mjs +10 -8
- package/dist/api/runtime.cjs +8 -7
- package/dist/api/runtime.d.mts +6 -6
- package/dist/api/runtime.d.ts +6 -6
- package/dist/api/runtime.mjs +7 -6
- package/dist/{api-client.d-Bp35zMqR.d.mts → api-client.d-CyVmI4Di.d.mts} +2 -2
- package/dist/{api-client.d-CFI_xL0V.d.ts → api-client.d-DrTM7BdH.d.ts} +2 -2
- package/dist/api.cjs +13 -11
- package/dist/api.d.mts +10 -10
- package/dist/api.d.ts +10 -10
- package/dist/api.mjs +12 -10
- package/dist/{app-manifest.d-USD_IbFd.d.mts → app-manifest.d-BcXt2yCx.d.mts} +10 -1
- package/dist/{app-manifest.d-DwjGkYlP.d.ts → app-manifest.d-CVEx1CFB.d.ts} +10 -1
- package/dist/app-markdown.cjs +8 -4
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/app-markdown.mjs +7 -3
- package/dist/{app.d-DAmF2MAk.d.ts → app.d-B6i8CSrx.d.ts} +36 -4
- package/dist/{app.d-fW06_h8h.d.mts → app.d-DowzSmT5.d.mts} +36 -4
- package/dist/cache.cjs +2 -2
- package/dist/cache.d.mts +8 -0
- package/dist/cache.d.ts +8 -0
- package/dist/cache.mjs +1 -1
- package/dist/chunk-2DOI6HLJ.cjs +284 -0
- package/dist/chunk-2GQBBOFH.mjs +76 -0
- package/dist/{chunk-5LOARKDP.cjs → chunk-2TZ3F6TN.cjs} +29 -17
- package/dist/{chunk-IWCYRDRQ.cjs → chunk-35GBGSQZ.cjs} +3 -3
- package/dist/{chunk-GF22VGMS.cjs → chunk-3BUJIPKE.cjs} +2 -2
- package/dist/{chunk-Y5LEPEVH.mjs → chunk-3ODLJRA6.mjs} +1 -1
- package/dist/{chunk-DMAP4RND.cjs → chunk-3OMLZLDE.cjs} +54 -16
- package/dist/{chunk-VNBDN5W2.cjs → chunk-47ZDUDN5.cjs} +64 -27
- package/dist/{chunk-2W4GNXGX.cjs → chunk-4AB62NMW.cjs} +2 -2
- package/dist/{chunk-HDPT6OYE.cjs → chunk-4M5ESTJ2.cjs} +10 -2
- package/dist/{chunk-CBLRSZQL.cjs → chunk-56HHUSR5.cjs} +502 -430
- package/dist/chunk-5XD2ULJG.mjs +114 -0
- package/dist/{chunk-JX5VOLAV.cjs → chunk-65OS2TOT.cjs} +4 -4
- package/dist/{chunk-WIJF3PBM.mjs → chunk-6JEXH7N6.mjs} +1 -1
- package/dist/{chunk-TY5KCYDE.mjs → chunk-72NTEYCX.mjs} +10 -3
- package/dist/{chunk-5R4Q5FN7.cjs → chunk-737MIVX3.cjs} +52 -41
- package/dist/{chunk-5X6OHJEE.cjs → chunk-77SVUQM5.cjs} +74 -20
- package/dist/{chunk-CKQAQFF6.mjs → chunk-7RKHXF4P.mjs} +2 -2
- package/dist/{chunk-GJEC5S4V.mjs → chunk-7VCLTNED.mjs} +1 -1
- package/dist/{chunk-E3LE6EZH.cjs → chunk-ACAEFEOH.cjs} +38 -41
- package/dist/{chunk-REP6HWJN.mjs → chunk-AL6E63FZ.mjs} +2 -2
- package/dist/{chunk-DQ2DI3Y7.mjs → chunk-AO5IRA2N.mjs} +2 -2
- package/dist/{chunk-VAWDGGW3.mjs → chunk-AU5UPNOD.mjs} +26 -15
- package/dist/{chunk-DS7JGFW5.mjs → chunk-B3XY6FMC.mjs} +71 -17
- package/dist/{chunk-U7VH3Q5E.cjs → chunk-B5WZP3T3.cjs} +15 -2
- package/dist/{chunk-3JN5M3T5.mjs → chunk-BFOMCSZ2.mjs} +476 -138
- package/dist/{chunk-I4KPA2C6.mjs → chunk-BIX46FTI.mjs} +1 -1
- package/dist/{chunk-YZLEOMMA.mjs → chunk-BNXV3PRM.mjs} +4 -4
- package/dist/{chunk-3GNVIYPO.cjs → chunk-BSJMWCWM.cjs} +7 -7
- package/dist/{chunk-WVQNXXNE.cjs → chunk-BWFBTTJ5.cjs} +2 -2
- package/dist/{chunk-FEFCISOX.cjs → chunk-CEVXKJKF.cjs} +2 -2
- package/dist/{chunk-DGNMXL2O.mjs → chunk-CF77L6RL.mjs} +33 -36
- package/dist/{chunk-OB45EAQL.mjs → chunk-CXQZQK6R.mjs} +3 -2
- package/dist/{chunk-255J7K4X.mjs → chunk-D2IAYGYA.mjs} +1 -1
- package/dist/{chunk-OSEQL34Q.cjs → chunk-D4TYE6MY.cjs} +2 -2
- package/dist/{chunk-FSSONJRV.cjs → chunk-DM2YGTRH.cjs} +24 -17
- package/dist/{chunk-ICFPTHXM.mjs → chunk-DRBXYJZ6.mjs} +7 -3
- package/dist/{chunk-E3HDJCWF.mjs → chunk-DRHHTHA3.mjs} +1 -1
- package/dist/{chunk-YXIQYWOK.cjs → chunk-DTBRSRTR.cjs} +23 -5
- package/dist/{chunk-JZQS3ZOI.mjs → chunk-E4T7WJJN.mjs} +10 -2
- package/dist/{chunk-YAEN3L2F.cjs → chunk-EF5AP4CV.cjs} +21 -2
- package/dist/{chunk-SPP3EZTJ.cjs → chunk-EHJOSIXM.cjs} +137 -67
- package/dist/{chunk-JZBU7V4D.mjs → chunk-ELJQWUAR.mjs} +125 -55
- package/dist/{chunk-DMXMIE2C.cjs → chunk-ENYBDM4U.cjs} +2 -2
- package/dist/{chunk-ZFEJ2SF2.cjs → chunk-EWIEJQP6.cjs} +28 -28
- package/dist/{chunk-ZUVAGMQ5.cjs → chunk-F244KE2D.cjs} +7 -7
- package/dist/{chunk-WW3LRNQV.mjs → chunk-FCBUNILW.mjs} +1 -1
- package/dist/{chunk-645ENY7W.mjs → chunk-FEQ72ZHD.mjs} +16 -9
- package/dist/{chunk-ME7RVELR.mjs → chunk-FGXSWRWA.mjs} +20 -1
- package/dist/{chunk-2AFW7673.cjs → chunk-FNWL5DMG.cjs} +4 -3
- package/dist/{chunk-HLMUWKAP.cjs → chunk-FYV6DTAG.cjs} +826 -531
- package/dist/{chunk-7PPLTD3P.cjs → chunk-G7S6XG6X.cjs} +6 -6
- package/dist/{chunk-AQIO3RNL.mjs → chunk-GK2GBIXD.mjs} +3 -3
- package/dist/{chunk-IHTDLCDJ.cjs → chunk-GRHSQYD4.cjs} +17 -4
- package/dist/{chunk-W44X6IC2.cjs → chunk-HBLYSWIJ.cjs} +13 -9
- package/dist/chunk-HK4VJI27.cjs +76 -0
- package/dist/{chunk-EGIY4A7V.cjs → chunk-HKZVC5GP.cjs} +2 -2
- package/dist/{chunk-EYPSKXO4.mjs → chunk-HRQV5Q3J.mjs} +1 -1
- package/dist/{chunk-S7MWSFFP.cjs → chunk-IBEHVSU4.cjs} +2 -2
- package/dist/{chunk-77VNYVVX.mjs → chunk-IG4IQMIW.mjs} +1 -1
- package/dist/{chunk-N3XO5AL5.cjs → chunk-IJFNXP3D.cjs} +2 -2
- package/dist/{chunk-RFWWXEIF.mjs → chunk-IP2R2TAE.mjs} +1 -1
- package/dist/{chunk-FETMUBIA.mjs → chunk-IZ5WOTQP.mjs} +1 -1
- package/dist/{chunk-CSLHNBPS.cjs → chunk-J42QN7OC.cjs} +6 -6
- package/dist/{chunk-NDDRTFN4.mjs → chunk-J7EUGGTY.mjs} +2 -2
- package/dist/{chunk-5XFKWHZD.mjs → chunk-JI6N4W2I.mjs} +208 -136
- package/dist/{chunk-GJ7QVFAG.mjs → chunk-JOECBGY7.mjs} +1 -1
- package/dist/{chunk-CL52PD6D.cjs → chunk-JSUVQ5HG.cjs} +8 -8
- package/dist/{chunk-DZHTNSQ5.cjs → chunk-JWHRVBCZ.cjs} +14 -14
- package/dist/{chunk-OSMUE5ST.mjs → chunk-JZ43UD6S.mjs} +7 -7
- package/dist/{chunk-RLEALQEN.mjs → chunk-KIRIFO6T.mjs} +43 -5
- package/dist/{chunk-XGTFLG73.cjs → chunk-KMYOKQPP.cjs} +18 -11
- package/dist/{chunk-WX63N6C5.mjs → chunk-KNEYWPZV.mjs} +64 -27
- package/dist/{chunk-AYVGD3PK.mjs → chunk-KUMKBBYP.mjs} +1 -1
- package/dist/{chunk-VT25ERQK.mjs → chunk-KWUZJZ23.mjs} +21 -3
- package/dist/{chunk-NV26EGMC.mjs → chunk-LHFGTR7F.mjs} +2 -2
- package/dist/{chunk-4P5634G6.cjs → chunk-LIQJYEQP.cjs} +14 -9
- package/dist/chunk-LRPPXKCX.mjs +58 -0
- package/dist/chunk-LXTYJ2HW.mjs +139 -0
- package/dist/{chunk-O32QPFVV.cjs → chunk-MKQ27TGW.cjs} +5 -5
- package/dist/{chunk-KQAB5LML.mjs → chunk-MQ5HA7H2.mjs} +2 -2
- package/dist/{chunk-Z3GPAFIA.mjs → chunk-MUITBU5Z.mjs} +1 -1
- package/dist/chunk-NDOE76QC.cjs +58 -0
- package/dist/{chunk-EXN4DTVF.cjs → chunk-NET6PBUH.cjs} +2 -2
- package/dist/{chunk-YBY34UHB.mjs → chunk-NKETXVKP.mjs} +15 -2
- package/dist/chunk-NRWEY2CM.mjs +25 -0
- package/dist/chunk-NU5XLYRN.cjs +139 -0
- package/dist/{chunk-BE7AQXJB.cjs → chunk-NXGQIXR7.cjs} +507 -169
- package/dist/{chunk-C5AM2XDN.cjs → chunk-O2A6HE76.cjs} +4 -4
- package/dist/{chunk-OAEDVXVE.mjs → chunk-O6K4G7YA.mjs} +5 -2
- package/dist/{chunk-LXEJNWF5.mjs → chunk-OSKIG4OP.mjs} +2 -2
- package/dist/{chunk-3WG7GJQL.cjs → chunk-P3EZKU6L.cjs} +18 -18
- package/dist/{chunk-C2JOS77Z.cjs → chunk-PG6ZIHKE.cjs} +250 -51
- package/dist/{chunk-ET6WW3FY.cjs → chunk-Q3MVNRAO.cjs} +1305 -848
- package/dist/{chunk-AZ6IW6SF.mjs → chunk-Q4G52OSW.mjs} +1 -1
- package/dist/{chunk-TPYAYFMF.cjs → chunk-QL3YZTGZ.cjs} +2 -2
- package/dist/{chunk-JMFTKNBA.mjs → chunk-R4BWNP73.mjs} +2 -2
- package/dist/{chunk-J5ASGNKF.mjs → chunk-R6Q6VSGU.mjs} +24 -9
- package/dist/{chunk-B6RBJJ5G.mjs → chunk-RBRIKT6B.mjs} +15 -2
- package/dist/{chunk-C6CUUBY5.cjs → chunk-RHI67C2V.cjs} +5 -5
- package/dist/chunk-RK3YYUX6.cjs +114 -0
- package/dist/{chunk-Y2LU4LE5.mjs → chunk-ROPMQNCG.mjs} +2 -2
- package/dist/{chunk-QIXEU2WV.cjs → chunk-RQ4UZJPR.cjs} +3 -3
- package/dist/{chunk-ZDZUFD67.cjs → chunk-RSL3YFJG.cjs} +1 -1
- package/dist/{chunk-JWY66PID.cjs → chunk-S3D6SL2V.cjs} +9 -6
- package/dist/{chunk-4HGLJOXZ.cjs → chunk-TPDKFRQX.cjs} +11 -11
- package/dist/{chunk-E2V7RRFL.mjs → chunk-UHAARKF3.mjs} +2 -2
- package/dist/{chunk-QSTRBKHZ.mjs → chunk-UJWRXBVP.mjs} +2 -2
- package/dist/{chunk-7QCJDYZQ.cjs → chunk-V6T3UJAH.cjs} +7 -7
- package/dist/{chunk-AUAMXI6N.mjs → chunk-VFPFXMTF.mjs} +1 -1
- package/dist/{chunk-KPJYBSHL.mjs → chunk-VKLV7GF4.mjs} +221 -22
- package/dist/{chunk-TP4RAV7Y.cjs → chunk-VKRMO3EZ.cjs} +8 -8
- package/dist/chunk-VWIW47FW.cjs +25 -0
- package/dist/{chunk-L6E4SHUB.cjs → chunk-VZKCGHWC.cjs} +39 -24
- package/dist/{chunk-JWLRBDDC.cjs → chunk-WH3PBJS7.cjs} +2 -2
- package/dist/{chunk-BSXKZPFE.mjs → chunk-WS4SLJW5.mjs} +501 -206
- package/dist/{chunk-5OFNUETM.mjs → chunk-WTTJ2YS2.mjs} +9 -1
- package/dist/{chunk-RLFGKJQ6.mjs → chunk-X2KNHD4B.mjs} +14 -2
- package/dist/{chunk-5CFHQ7HM.mjs → chunk-XXKMAHYE.mjs} +1 -1
- package/dist/{chunk-MBCRWU3P.cjs → chunk-XZPI44Q7.cjs} +4 -4
- package/dist/{chunk-ACGBXN3U.cjs → chunk-Y4FEQBKY.cjs} +17 -9
- package/dist/{chunk-MWUDEYBI.mjs → chunk-YH33PZ3K.mjs} +1 -1
- package/dist/chunk-YQWRBBAA.mjs +284 -0
- package/dist/{chunk-QUYAGU65.mjs → chunk-YWDRWG4L.mjs} +1210 -753
- package/dist/{chunk-E46NXBNJ.mjs → chunk-ZD7JUTBY.mjs} +11 -6
- package/dist/{chunk-JDO346NV.mjs → chunk-ZLRWO5GK.mjs} +1 -1
- package/dist/{chunk-NAXKOTPP.cjs → chunk-ZRCGPSUM.cjs} +21 -21
- package/dist/{chunk-YCNHUIPR.cjs → chunk-ZZGANFQH.cjs} +10 -10
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-component.d-9J7CkTWW.d.ts → client-component.d-DYOwmq0c.d.ts} +80 -3
- package/dist/{client-component.d-ciHeCxr-.d.mts → client-component.d-edV76QvU.d.mts} +80 -3
- package/dist/{client-plugins.d-CUOhfapO.d.ts → client-plugins.d-BmJYW2FY.d.ts} +20 -7
- package/dist/{client-plugins.d-JnRz5a1o.d.mts → client-plugins.d-DwvqqGsU.d.mts} +20 -7
- package/dist/client-plugins.d.mts +5 -5
- package/dist/client-plugins.d.ts +5 -5
- package/dist/client.cjs +6 -5
- package/dist/client.d.mts +12 -12
- package/dist/client.d.ts +12 -12
- package/dist/client.mjs +5 -4
- package/dist/config.d.mts +5 -5
- package/dist/config.d.ts +5 -5
- package/dist/cron.cjs +6 -2
- package/dist/cron.d.mts +11 -2
- package/dist/cron.d.ts +11 -2
- package/dist/cron.mjs +7 -3
- package/dist/desktop.d.mts +6 -6
- package/dist/desktop.d.ts +6 -6
- package/dist/{devtools-7JPQMSTQ.mjs → devtools-WPX62NG2.mjs} +10 -9
- package/dist/{devtools-IZFUYWPG.cjs → devtools-YMDS7PUA.cjs} +12 -11
- package/dist/docs.cjs +14 -13
- package/dist/docs.d.mts +6 -6
- package/dist/docs.d.ts +6 -6
- package/dist/docs.mjs +13 -12
- package/dist/{endpoint.d-BkMSCRf6.d.mts → endpoint.d-BXbBpKoh.d.mts} +42 -1
- package/dist/{endpoint.d-BgHn0lhl.d.ts → endpoint.d-Dx_1k6Du.d.ts} +42 -1
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/headers.cjs +3 -3
- package/dist/{headers.d-CqpTL_fZ.d.ts → headers.d-BIbQyAxJ.d.ts} +1 -1
- package/dist/{headers.d-rbbTKGaN.d.mts → headers.d-BtNxFc2s.d.mts} +1 -1
- package/dist/headers.mjs +2 -2
- package/dist/index.cjs +73 -60
- package/dist/{index.d-CMKvzHLW.d.ts → index.d-CQ_wUzOV.d.ts} +1 -1
- package/dist/{index.d-D_B2D9Il.d.mts → index.d-CQdDRXd1.d.mts} +1 -1
- package/dist/index.d.mts +63 -29
- package/dist/index.d.ts +63 -29
- package/dist/index.mjs +69 -56
- package/dist/integrations/orm.d.mts +5 -5
- package/dist/integrations/orm.d.ts +5 -5
- package/dist/integrations.cjs +4 -4
- package/dist/integrations.d.mts +5 -5
- package/dist/integrations.d.ts +5 -5
- package/dist/integrations.mjs +3 -3
- package/dist/internal/app-markdown-runtime.cjs +7 -3
- package/dist/internal/app-markdown-runtime.d.mts +18 -7
- package/dist/internal/app-markdown-runtime.d.ts +18 -7
- package/dist/internal/app-markdown-runtime.mjs +6 -2
- package/dist/internal/build-runtime.cjs +42 -40
- package/dist/internal/build-runtime.d.mts +7 -7
- package/dist/internal/build-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.mjs +41 -39
- package/dist/internal/cli-runtime.cjs +21 -20
- package/dist/internal/cli-runtime.mjs +20 -19
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +6 -2
- package/dist/internal/client-runtime.d.mts +22 -10
- package/dist/internal/client-runtime.d.ts +22 -10
- package/dist/internal/client-runtime.mjs +5 -1
- package/dist/internal/compression-runtime.d.mts +5 -5
- package/dist/internal/compression-runtime.d.ts +5 -5
- package/dist/internal/config-runtime.cjs +12 -11
- package/dist/internal/config-runtime.d.mts +7 -7
- package/dist/internal/config-runtime.d.ts +7 -7
- package/dist/internal/config-runtime.mjs +11 -10
- package/dist/internal/form-actions.cjs +5 -4
- package/dist/internal/form-actions.d.mts +2 -2
- package/dist/internal/form-actions.d.ts +2 -2
- package/dist/internal/form-actions.mjs +4 -3
- package/dist/internal/infra-analytics-runtime.cjs +10 -10
- package/dist/internal/infra-analytics-runtime.mjs +8 -8
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +32 -22
- package/dist/internal/production-runtime.d.mts +65 -14
- package/dist/internal/production-runtime.d.ts +65 -14
- package/dist/internal/production-runtime.mjs +31 -21
- package/dist/internal/react-cache.cjs +3 -3
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +4 -4
- package/dist/internal/vercel-edge-middleware.mjs +3 -3
- package/dist/{lifecycle.d-keQs5Swc.d.mts → lifecycle.d-OtGWAvJT.d.mts} +4 -0
- package/dist/{lifecycle.d-keQs5Swc.d.ts → lifecycle.d-OtGWAvJT.d.ts} +4 -0
- package/dist/{manager-JIA66YJ2.mjs → manager-RHB2P35B.mjs} +4 -1
- package/dist/{manager-JOHU6BQI.cjs → manager-S77ZARTC.cjs} +5 -2
- package/dist/markdown.cjs +2 -2
- package/dist/markdown.d.mts +5 -5
- package/dist/markdown.d.ts +5 -5
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.cjs +6 -6
- package/dist/middleware.d.mts +5 -5
- package/dist/middleware.d.ts +5 -5
- package/dist/middleware.mjs +5 -5
- package/dist/{mount.d-ImEO7q8a.d.mts → mount.d-6bhpBQQB.d.mts} +1 -1
- package/dist/{mount.d-B0XMxDRh.d.ts → mount.d-C-u7rFkM.d.ts} +1 -1
- package/dist/{native-server-fn-handler-EP5AFJYE.mjs → native-server-fn-handler-I66X4E5S.mjs} +6 -5
- package/dist/{native-server-fn-handler-QRTXGZA4.cjs → native-server-fn-handler-W4FSD76W.cjs} +7 -6
- package/dist/{native-tree-L2IIEBXH.mjs → native-tree-3X23BT3N.mjs} +2 -2
- package/dist/{native-tree-GF4BH33L.cjs → native-tree-TAPKR7QJ.cjs} +3 -3
- package/dist/{navigation-delegate.d-83Q7ksf7.d.mts → navigation-delegate.d-nx6gtsY4.d.mts} +1 -1
- package/dist/{navigation-delegate.d-RRx1CSlb.d.ts → navigation-delegate.d-xsG4T1x-.d.ts} +1 -1
- package/dist/navigation.cjs +4 -4
- package/dist/navigation.d.mts +8 -8
- package/dist/navigation.d.ts +8 -8
- package/dist/navigation.mjs +3 -3
- package/dist/{nitro-2LMOMIST.cjs → nitro-SSFTPZMW.cjs} +4 -4
- package/dist/{nitro-72TFIGGO.mjs → nitro-XTQ2HKDL.mjs} +1 -1
- package/dist/{observability.d-B2363jB6.d.ts → observability.d-DdJRiaIX.d.mts} +27 -3
- package/dist/{observability.d-B2363jB6.d.mts → observability.d-DdJRiaIX.d.ts} +27 -3
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/plugin.cjs +36 -33
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +35 -32
- package/dist/query/client.cjs +5 -5
- package/dist/query/client.mjs +1 -1
- package/dist/{render-plan.d-wP8nTeRV.d.mts → render-plan.d-B5y3h97B.d.mts} +1 -1
- package/dist/{render-plan.d-Ds2sXJ5m.d.ts → render-plan.d-gW0fwKz2.d.ts} +1 -1
- package/dist/renderer-client.cjs +4 -4
- package/dist/renderer-client.d.mts +8 -8
- package/dist/renderer-client.d.ts +8 -8
- package/dist/renderer-client.mjs +1 -1
- package/dist/request.cjs +2 -2
- package/dist/{request.d-zpSn6pu_.d.ts → request.d-B0ugAadD.d.ts} +9 -2
- package/dist/{request.d-F3h7K37m.d.mts → request.d-DLq33nYo.d.mts} +9 -2
- package/dist/request.d.mts +6 -6
- package/dist/request.d.ts +6 -6
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-Mw0ZKG2e.d.mts → route-rendering.d-DSeIV7yV.d.mts} +1 -1
- package/dist/{route-rendering.d-BL0_AdKj.d.ts → route-rendering.d-ytaqDQD6.d.ts} +1 -1
- package/dist/{route.d-DrXkpvcg.d.mts → route.d-Cd4Fi6BA.d.ts} +3 -1
- package/dist/{route.d-hs-_cyHn.d.ts → route.d-ShmtqqVQ.d.mts} +3 -1
- package/dist/{router.d-BwXigemZ.d.ts → router.d-BaEAEGPg.d.ts} +1 -1
- package/dist/{router.d-NGVsU11T.d.mts → router.d-Chd5cpe3.d.mts} +1 -1
- package/dist/routes.cjs +5 -3
- package/dist/routes.d.mts +5 -5
- package/dist/routes.d.ts +5 -5
- package/dist/routes.mjs +4 -2
- package/dist/{rsc-pipeline-DHYZLWSF.mjs → rsc-pipeline-DPMYONEV.mjs} +12 -11
- package/dist/{rsc-pipeline-BNXYMG4G.cjs → rsc-pipeline-XIUUMMG5.cjs} +13 -12
- package/dist/{runtime-IWOT6ZVC.cjs → runtime-WD77S3C5.cjs} +25 -25
- package/dist/{runtime-XPYKUNL3.mjs → runtime-XIUJZTZ3.mjs} +16 -16
- package/dist/{runtime.d-BA3MzhXz.d.mts → runtime.d-DpCs0eAO.d.mts} +3 -3
- package/dist/{runtime.d-OBIZWpx1.d.ts → runtime.d-h2USyQsz.d.ts} +3 -3
- package/dist/server-action-security.cjs +5 -3
- package/dist/server-action-security.d.mts +11 -3
- package/dist/server-action-security.d.ts +11 -3
- package/dist/server-action-security.mjs +4 -2
- package/dist/server-fn-client.d.mts +3 -3
- package/dist/server-fn-client.d.ts +3 -3
- package/dist/server-fn.cjs +6 -5
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-fn.mjs +5 -4
- package/dist/server-plugins.cjs +4 -4
- package/dist/server-plugins.d.mts +54 -10
- package/dist/server-plugins.d.ts +54 -10
- package/dist/server-plugins.mjs +3 -3
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query.cjs +7 -6
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server-query.mjs +6 -5
- package/dist/server.cjs +65 -68
- package/dist/server.d.mts +15 -15
- package/dist/server.d.ts +15 -15
- package/dist/server.mjs +44 -47
- package/dist/{spa-router.d-BG2XzE5p.d.mts → spa-router.d-DCQVtEaE.d.mts} +11 -5
- package/dist/{spa-router.d-DrYT944-.d.ts → spa-router.d-DpdJHs1q.d.ts} +11 -5
- package/dist/testing.cjs +16 -14
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.mjs +12 -10
- package/dist/theme/server.cjs +3 -3
- package/dist/theme/server.mjs +2 -2
- package/dist/{utils.d-C1k9BJeD.d.mts → utils.d-DKDZtAY5.d.mts} +1 -1
- package/dist/{utils.d-DcF4wxey.d.ts → utils.d-DmicwMvS.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +38 -33
- package/dist/vite.d.mts +24 -10
- package/dist/vite.d.ts +24 -10
- package/dist/vite.mjs +37 -32
- package/package.json +1 -1
- package/dist/analyzer-UJG4MIZW.cjs +0 -16
- package/dist/chunk-6I4BFRE7.cjs +0 -51
- package/dist/chunk-EIVGPQN5.mjs +0 -51
- package/dist/chunk-V3UOEWCB.cjs +0 -46
- package/dist/chunk-VE3FWJBO.mjs +0 -46
- /package/dist/{chunk-QEJWNXRI.cjs → chunk-EMRYJG4U.cjs} +0 -0
- /package/dist/{chunk-TXE4SAMV.mjs → chunk-H2ZJ35NW.mjs} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { aR as FarmConfig, P as ParsedRoute, bt as ResolvedFarmRouteRuntimeConfig, bu as ApplicationMetadataRouteKind, i as RouteModule, b4 as LayoutModule, bg as SSGCollectionResult, G as FarmRedirectStatus, t as FarmRequest, u as FarmResponse, bv as ResolvedFarmAPIConfig, bw as FarmDocsResolvedConfig, aQ as FarmMarkdownResolvedConfig, h as FarmMdxResolvedConfig, aA as ResolvedFarmDevtoolsConfig, bx as ResolvedFarmDevIndicatorsConfig, by as ResolvedFarmAuthConfig, bz as ResolvedFarmPerformanceConfig, bA as ResolvedFarmSecurityConfig } from './client-plugins.d-
|
|
1
|
+
import { aR as FarmConfig, P as ParsedRoute, bt as ResolvedFarmRouteRuntimeConfig, bu as ApplicationMetadataRouteKind, i as RouteModule, b4 as LayoutModule, bg as SSGCollectionResult, G as FarmRedirectStatus, t as FarmRequest, u as FarmResponse, bv as ResolvedFarmAPIConfig, bw as FarmDocsResolvedConfig, aQ as FarmMarkdownResolvedConfig, h as FarmMdxResolvedConfig, aA as ResolvedFarmDevtoolsConfig, bx as ResolvedFarmDevIndicatorsConfig, by as ResolvedFarmAuthConfig, bz as ResolvedFarmPerformanceConfig, bA as ResolvedFarmSecurityConfig } from './client-plugins.d-DwvqqGsU.mjs';
|
|
2
2
|
import { FarmWorkflowsResolvedConfig } from './workflows.mjs';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.mjs';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.mjs';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.mjs';
|
|
6
|
-
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-
|
|
6
|
+
import { I as IsolatedClientBoundaryReference, F as FarmSourceSnapshotStore, C as ClientModuleHydrationPlan, P as ProgrammaticClientRoutes } from './client-component.d-edV76QvU.mjs';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-
|
|
8
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-BEhDfdWc.mjs';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
|
|
10
10
|
import { FarmRenderer, FarmServerRendererRuntime } from './renderer.mjs';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan.d-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan.d-B5y3h97B.mjs';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types.d-euATAbE4.mjs';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime.d-CTAXWZby.mjs';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types.d-DQnyD3VD.mjs';
|
|
@@ -160,6 +160,7 @@ declare class RouteManager {
|
|
|
160
160
|
private clientManifestCache?;
|
|
161
161
|
private reportedIslandsErrors;
|
|
162
162
|
private ownerPlans;
|
|
163
|
+
private planStamps;
|
|
163
164
|
private sourceChangeTracking;
|
|
164
165
|
private linkedSources;
|
|
165
166
|
private sourceSnapshot?;
|
|
@@ -261,6 +262,17 @@ declare class RouteManager {
|
|
|
261
262
|
* every plan recomputes every module.
|
|
262
263
|
*/
|
|
263
264
|
trackSourceChanges(): void;
|
|
265
|
+
/**
|
|
266
|
+
* @internal A production build edits no source while it runs, so what the plan reads, parses and
|
|
267
|
+
* resolves as the app initializes stays valid for the build's later analyses of the same modules:
|
|
268
|
+
* the route tables' plans and the bundles' package import rewrites (takeBuildSourceSnapshot).
|
|
269
|
+
*/
|
|
270
|
+
keepBuildSourceSnapshot(): void;
|
|
271
|
+
/**
|
|
272
|
+
* @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
|
|
273
|
+
* its bundles are written; later plans start without one. Undefined on the dev server.
|
|
274
|
+
*/
|
|
275
|
+
takeBuildSourceSnapshot(): FarmSourceSnapshotStore | undefined;
|
|
264
276
|
/**
|
|
265
277
|
* @internal A watched file changed. An edit to a script narrows the next replan to the route
|
|
266
278
|
* modules that read it; a script added or removed (where an import may now resolve), or a
|
|
@@ -279,6 +291,14 @@ declare class RouteManager {
|
|
|
279
291
|
* Callers get a copy, since the route budget rewrites a plan's fields in place.
|
|
280
292
|
*/
|
|
281
293
|
private planRouteModule;
|
|
294
|
+
/**
|
|
295
|
+
* @internal The plans of the pages and layouts the last client manifest planned, by
|
|
296
|
+
* getClientModuleHydrationPlanKey, so a production build plans each route module once. A plan
|
|
297
|
+
* that read a source file changed since then is left out, as is every plan of the dev server,
|
|
298
|
+
* which replans after edits. Installed packages are not compared: they do not change during a
|
|
299
|
+
* build.
|
|
300
|
+
*/
|
|
301
|
+
getRouteModuleHydrationPlans(): Map<string, ClientModuleHydrationPlan>;
|
|
282
302
|
/**
|
|
283
303
|
* The path the watcher reports for a file a plan read: itself, or the real path of a workspace
|
|
284
304
|
* package's source read through its `node_modules` link. Null for an installed package's file.
|
|
@@ -442,6 +462,12 @@ declare class ServerRenderer {
|
|
|
442
462
|
private devGlobalStylesheetAssets;
|
|
443
463
|
private collectDevStyleHrefs;
|
|
444
464
|
private collectDevStyleLinks;
|
|
465
|
+
/**
|
|
466
|
+
* The client manifest a development document inlines: the entries its page reads before the
|
|
467
|
+
* first navigation. Inlining every route made each document grow with the app (about 650 KB at
|
|
468
|
+
* 1,000 routes); the client imports the whole manifest only when a navigation needs it.
|
|
469
|
+
*/
|
|
470
|
+
private createDevBootClientManifest;
|
|
445
471
|
/**
|
|
446
472
|
* A layout's boundary. Islands mode keys it (the pattern with its params, as the production
|
|
447
473
|
* server does), so a navigation can name the layouts the browser shows; a layout the browser
|
|
@@ -501,6 +527,12 @@ declare class ServerRenderer {
|
|
|
501
527
|
*/
|
|
502
528
|
private serveSSGPage;
|
|
503
529
|
renderPage(req: FarmRequest, res: FarmResponse): Promise<void>;
|
|
530
|
+
/**
|
|
531
|
+
* The Request a page, its layouts, and its server functions read. Its signal aborts when the
|
|
532
|
+
* client goes away before the response finishes, as in production, so rendering that observes
|
|
533
|
+
* it can stop.
|
|
534
|
+
*/
|
|
535
|
+
private createPageRequest;
|
|
504
536
|
private renderPageInContext;
|
|
505
537
|
private wrapWithIntegrationProviders;
|
|
506
538
|
private resolveRouteMetadata;
|
package/dist/cache.cjs
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunk3OMLZLDEcjs = require('./chunk-3OMLZLDE.cjs');
|
|
20
20
|
require('./chunk-EVIWKPJV.cjs');
|
|
21
21
|
require('./chunk-AOKXITZ6.cjs');
|
|
22
22
|
|
|
@@ -49,4 +49,4 @@ require('./chunk-BTZ5O6VM.cjs');
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
exports.FarmDataCache =
|
|
52
|
+
exports.FarmDataCache = _chunk3OMLZLDEcjs.FarmDataCache; exports.PPR_SHELL_ADAPTER_TTL_SECONDS = _chunk3OMLZLDEcjs.PPR_SHELL_ADAPTER_TTL_SECONDS; exports.applyFarmCacheInvalidationTargets = _chunk3OMLZLDEcjs.applyFarmCacheInvalidationTargets; exports.applyFarmCacheInvalidations = _chunkUZCMMJJTcjs.applyFarmCacheInvalidations; exports.configureFarmCache = _chunk3OMLZLDEcjs.configureFarmCache; exports.createFarmCacheInvalidationStream = _chunk3OMLZLDEcjs.createFarmCacheInvalidationStream; exports.createFarmCacheKey = _chunkDXUXQP2Tcjs.createFarmCacheKey; exports.createPathCacheTag = _chunk3OMLZLDEcjs.createPathCacheTag; exports.createRouteDataCacheKey = _chunkDXUXQP2Tcjs.createRouteDataCacheKey; exports.createRouteDataCacheTag = _chunk3OMLZLDEcjs.createRouteDataCacheTag; exports.defineCacheKey = _chunk3OMLZLDEcjs.defineCacheKey; exports.getFarmDataCache = _chunk3OMLZLDEcjs.getFarmDataCache; exports.invalidate = _chunk3OMLZLDEcjs.invalidate; exports.invalidateRouteData = _chunk3OMLZLDEcjs.invalidateRouteData; exports.normalizeRevalidatePath = _chunk3OMLZLDEcjs.normalizeRevalidatePath; exports.revalidatePath = _chunk3OMLZLDEcjs.revalidatePath; exports.revalidateTag = _chunk3OMLZLDEcjs.revalidateTag; exports.storageCacheAdapter = _chunk3OMLZLDEcjs.storageCacheAdapter; exports.unstable_cache = _chunk3OMLZLDEcjs.unstable_cache; exports.updateTag = _chunk3OMLZLDEcjs.updateTag;
|
package/dist/cache.d.mts
CHANGED
|
@@ -152,6 +152,8 @@ interface FarmCacheStorage {
|
|
|
152
152
|
ttl?: number;
|
|
153
153
|
}): Promise<unknown>;
|
|
154
154
|
removeItem(key: string): Promise<unknown>;
|
|
155
|
+
/** Keys under `base`, as unstorage lists them; `clear` removes them one by one. */
|
|
156
|
+
getKeys?(base?: string): Promise<string[]>;
|
|
155
157
|
clear?(base?: string): Promise<unknown>;
|
|
156
158
|
}
|
|
157
159
|
interface StorageFarmCacheAdapterOptions {
|
|
@@ -253,6 +255,12 @@ declare class FarmDataCache {
|
|
|
253
255
|
private pruneInvalidatedTagVersions;
|
|
254
256
|
private createAdapterKey;
|
|
255
257
|
private createAdapterTag;
|
|
258
|
+
/**
|
|
259
|
+
* Bump the shared versions of these tags, so an entry captured with an older version is stale
|
|
260
|
+
* on every server. An adapter without `invalidateTags` keeps each tag's version as an entry of
|
|
261
|
+
* its own, through `get` and `set`.
|
|
262
|
+
*/
|
|
263
|
+
private invalidateAdapterTags;
|
|
256
264
|
private getAdapterTagVersions;
|
|
257
265
|
private isAdapterEntryStale;
|
|
258
266
|
}
|
package/dist/cache.d.ts
CHANGED
|
@@ -152,6 +152,8 @@ interface FarmCacheStorage {
|
|
|
152
152
|
ttl?: number;
|
|
153
153
|
}): Promise<unknown>;
|
|
154
154
|
removeItem(key: string): Promise<unknown>;
|
|
155
|
+
/** Keys under `base`, as unstorage lists them; `clear` removes them one by one. */
|
|
156
|
+
getKeys?(base?: string): Promise<string[]>;
|
|
155
157
|
clear?(base?: string): Promise<unknown>;
|
|
156
158
|
}
|
|
157
159
|
interface StorageFarmCacheAdapterOptions {
|
|
@@ -253,6 +255,12 @@ declare class FarmDataCache {
|
|
|
253
255
|
private pruneInvalidatedTagVersions;
|
|
254
256
|
private createAdapterKey;
|
|
255
257
|
private createAdapterTag;
|
|
258
|
+
/**
|
|
259
|
+
* Bump the shared versions of these tags, so an entry captured with an older version is stale
|
|
260
|
+
* on every server. An adapter without `invalidateTags` keeps each tag's version as an entry of
|
|
261
|
+
* its own, through `get` and `set`.
|
|
262
|
+
*/
|
|
263
|
+
private invalidateAdapterTags;
|
|
256
264
|
private getAdapterTagVersions;
|
|
257
265
|
private isAdapterEntryStale;
|
|
258
266
|
}
|
package/dist/cache.mjs
CHANGED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
|
+
|
|
3
|
+
var _chunkLRB5OVRTcjs = require('./chunk-LRB5OVRT.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
11
|
+
|
|
12
|
+
// src/registered-mcp.ts
|
|
13
|
+
var TOOL_NAME = /^[a-zA-Z0-9_.:/-]{1,128}$/;
|
|
14
|
+
var MAX_REQUEST_BYTES = 1024 * 1024;
|
|
15
|
+
var MAX_RESPONSE_BYTES = 4 * 1024 * 1024;
|
|
16
|
+
var MAX_CALLS = 32;
|
|
17
|
+
var MAX_TOOLS = 500;
|
|
18
|
+
var MAX_PAGES = 10;
|
|
19
|
+
var LIST_TIMEOUT_MS = 5e3;
|
|
20
|
+
var MAX_SCHEMA_BYTES = 64 * 1024;
|
|
21
|
+
var MAX_SCHEMA_DEPTH = 32;
|
|
22
|
+
var MANIFEST_PATH = /^(?=.{1,256}$)(?:\/[a-zA-Z0-9_.:[\]()*-]+)+$/;
|
|
23
|
+
var isObject = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
24
|
+
var isRequestId = (value) => typeof value === "string" || typeof value === "number";
|
|
25
|
+
function servedAt(pathname, basePath) {
|
|
26
|
+
const path = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, basePath);
|
|
27
|
+
const normalized = path.length > 1 ? path.replace(/\/+$/, "") : path;
|
|
28
|
+
const servers = _chunkLRB5OVRTcjs._listFarmRegisteredMCPServers.call(void 0, ).filter(
|
|
29
|
+
(server) => server.path !== void 0
|
|
30
|
+
);
|
|
31
|
+
return _nullishCoalesce(servers.find((server) => server.path === normalized), () => ( (servers.length === 1 ? servers[0] : void 0)));
|
|
32
|
+
}
|
|
33
|
+
async function readText(body, limit) {
|
|
34
|
+
const reader = body.getReader();
|
|
35
|
+
const decoder = new TextDecoder();
|
|
36
|
+
let text = "";
|
|
37
|
+
let size = 0;
|
|
38
|
+
try {
|
|
39
|
+
for (; ; ) {
|
|
40
|
+
const { done, value } = await reader.read();
|
|
41
|
+
if (done) return text + decoder.decode();
|
|
42
|
+
size += value.byteLength;
|
|
43
|
+
if (size > limit) throw new RangeError("The body is larger than Farm reads.");
|
|
44
|
+
text += decoder.decode(value, { stream: true });
|
|
45
|
+
}
|
|
46
|
+
} finally {
|
|
47
|
+
reader.cancel().catch(() => {
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function parseMessages(text, eventStream) {
|
|
52
|
+
const parse = (json) => {
|
|
53
|
+
try {
|
|
54
|
+
const value = JSON.parse(json);
|
|
55
|
+
return Array.isArray(value) ? value : [value];
|
|
56
|
+
} catch (e) {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
if (!eventStream) return parse(text);
|
|
61
|
+
return text.split(/\r?\n\r?\n/).flatMap((event) => {
|
|
62
|
+
const data = event.split(/\r?\n/).filter((line) => line.startsWith("data:")).map((line) => line.slice(line.startsWith("data: ") ? 6 : 5));
|
|
63
|
+
return data.length ? parse(data.join("\n")) : [];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
var isEventStream = (response) => _nullishCoalesce(_optionalChain([response, 'access', _ => _.headers, 'access', _2 => _2.get, 'call', _3 => _3("content-type"), 'optionalAccess', _4 => _4.toLowerCase, 'call', _5 => _5(), 'access', _6 => _6.includes, 'call', _7 => _7("text/event-stream")]), () => ( false));
|
|
67
|
+
async function _readFarmRegisteredMCPCalls(request, basePath) {
|
|
68
|
+
if (request.method !== "POST" || !request.body) return void 0;
|
|
69
|
+
const server = servedAt(new URL(request.url).pathname, basePath);
|
|
70
|
+
if (!server) return void 0;
|
|
71
|
+
if (!_optionalChain([request, 'access', _8 => _8.headers, 'access', _9 => _9.get, 'call', _10 => _10("content-type"), 'optionalAccess', _11 => _11.toLowerCase, 'call', _12 => _12(), 'access', _13 => _13.includes, 'call', _14 => _14("json")])) return void 0;
|
|
72
|
+
if (Number(request.headers.get("content-length")) > MAX_REQUEST_BYTES) return void 0;
|
|
73
|
+
const startedAt = performance.now();
|
|
74
|
+
let messages;
|
|
75
|
+
try {
|
|
76
|
+
messages = parseMessages(await readText(request.clone().body, MAX_REQUEST_BYTES), false);
|
|
77
|
+
} catch (e2) {
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
const calls = messages.slice(0, MAX_CALLS).flatMap((message) => {
|
|
81
|
+
if (!isObject(message) || message.method !== "tools/call" || !isRequestId(message.id)) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
const tool = isObject(message.params) ? message.params.name : void 0;
|
|
85
|
+
return typeof tool === "string" && TOOL_NAME.test(tool) ? [{ id: message.id, tool }] : [];
|
|
86
|
+
});
|
|
87
|
+
return calls.length ? { server, calls, startedAt } : void 0;
|
|
88
|
+
}
|
|
89
|
+
function _observeFarmRegisteredMCPResponse(response, observed, waitUntil) {
|
|
90
|
+
if (!observed || !response.ok || !response.body) return response;
|
|
91
|
+
const eventStream = isEventStream(response);
|
|
92
|
+
if (!eventStream && !_optionalChain([response, 'access', _15 => _15.headers, 'access', _16 => _16.get, 'call', _17 => _17("content-type"), 'optionalAccess', _18 => _18.toLowerCase, 'call', _19 => _19(), 'access', _20 => _20.includes, 'call', _21 => _21("json")])) {
|
|
93
|
+
return response;
|
|
94
|
+
}
|
|
95
|
+
const [sent, read] = response.body.tee();
|
|
96
|
+
const done = reportOutcomes(read, eventStream, observed);
|
|
97
|
+
_optionalChain([waitUntil, 'optionalCall', _22 => _22(done)]);
|
|
98
|
+
return new Response(sent, {
|
|
99
|
+
status: response.status,
|
|
100
|
+
statusText: response.statusText,
|
|
101
|
+
headers: response.headers
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
async function reportOutcomes(body, eventStream, { server, calls, startedAt }) {
|
|
105
|
+
const pending = new Map(calls.map((call) => [call.id, call.tool]));
|
|
106
|
+
const answer = (message) => {
|
|
107
|
+
if (!isObject(message) || !isRequestId(message.id) || !isObject(message.result)) return;
|
|
108
|
+
const tool = pending.get(message.id);
|
|
109
|
+
if (tool === void 0) return;
|
|
110
|
+
pending.delete(message.id);
|
|
111
|
+
const outcome = message.result.isError === true ? "error" : "success";
|
|
112
|
+
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
113
|
+
type: "mcp.tool.complete",
|
|
114
|
+
level: outcome === "error" ? "error" : "info",
|
|
115
|
+
route: server.path,
|
|
116
|
+
server: server.name,
|
|
117
|
+
tool,
|
|
118
|
+
outcome,
|
|
119
|
+
durationMs: Math.max(0, performance.now() - startedAt)
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
const reader = body.getReader();
|
|
123
|
+
const decoder = new TextDecoder();
|
|
124
|
+
let buffered = "";
|
|
125
|
+
let size = 0;
|
|
126
|
+
try {
|
|
127
|
+
while (pending.size) {
|
|
128
|
+
const { done, value } = await reader.read();
|
|
129
|
+
if (done) break;
|
|
130
|
+
size += value.byteLength;
|
|
131
|
+
if (size > MAX_RESPONSE_BYTES) return;
|
|
132
|
+
buffered += decoder.decode(value, { stream: true });
|
|
133
|
+
if (!eventStream) continue;
|
|
134
|
+
buffered = buffered.replace(/\r\n/g, "\n");
|
|
135
|
+
const end = buffered.lastIndexOf("\n\n");
|
|
136
|
+
if (end === -1) continue;
|
|
137
|
+
for (const message of parseMessages(buffered.slice(0, end), true)) answer(message);
|
|
138
|
+
buffered = buffered.slice(end + 2);
|
|
139
|
+
}
|
|
140
|
+
buffered += decoder.decode();
|
|
141
|
+
for (const message of parseMessages(buffered, eventStream)) answer(message);
|
|
142
|
+
} catch (e3) {
|
|
143
|
+
} finally {
|
|
144
|
+
reader.cancel().catch(() => {
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
var singleLine = (value, max) => typeof value === "string" && value.length <= max && // oxlint-disable-next-line no-control-regex -- refuses control characters.
|
|
149
|
+
!/[\u0000-\u001f\u007f]/.test(value);
|
|
150
|
+
var paragraph = (value, max) => typeof value === "string" && value.length <= max && // oxlint-disable-next-line no-control-regex -- refuses control characters but line breaks.
|
|
151
|
+
!/[\u0000-\u0008\u000b-\u001f\u007f]/.test(value);
|
|
152
|
+
function boundedSchema(value) {
|
|
153
|
+
if (!isObject(value)) return void 0;
|
|
154
|
+
const depth = (node, level) => level <= MAX_SCHEMA_DEPTH && (!node || typeof node !== "object" || Object.values(node).every((child) => depth(child, level + 1)));
|
|
155
|
+
if (!depth(value, 0)) return void 0;
|
|
156
|
+
return new TextEncoder().encode(JSON.stringify(value)).byteLength <= MAX_SCHEMA_BYTES ? value : void 0;
|
|
157
|
+
}
|
|
158
|
+
function manifestTool(input) {
|
|
159
|
+
if (!isObject(input) || typeof input.name !== "string" || !TOOL_NAME.test(input.name)) {
|
|
160
|
+
return void 0;
|
|
161
|
+
}
|
|
162
|
+
const annotations = isObject(input.annotations) ? input.annotations : {};
|
|
163
|
+
const title = _nullishCoalesce(input.title, () => ( annotations.title));
|
|
164
|
+
const hints = Object.fromEntries(
|
|
165
|
+
["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"].filter((hint) => typeof annotations[hint] === "boolean").map((hint) => [hint, annotations[hint]])
|
|
166
|
+
);
|
|
167
|
+
const inputSchema = boundedSchema(input.inputSchema);
|
|
168
|
+
const outputSchema = boundedSchema(input.outputSchema);
|
|
169
|
+
return {
|
|
170
|
+
name: input.name,
|
|
171
|
+
...singleLine(title, 200) ? { title } : {},
|
|
172
|
+
...paragraph(input.description, 2e3) ? { description: input.description } : {},
|
|
173
|
+
source: "defineTool",
|
|
174
|
+
...hints,
|
|
175
|
+
...inputSchema ? { inputSchema } : {},
|
|
176
|
+
...outputSchema ? { outputSchema } : {}
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
async function listTools(handle, url, signal) {
|
|
180
|
+
const tools = [];
|
|
181
|
+
const names = /* @__PURE__ */ new Set();
|
|
182
|
+
let cursor;
|
|
183
|
+
for (let page = 0; page < MAX_PAGES; page++) {
|
|
184
|
+
const response = await handle(
|
|
185
|
+
new Request(url, {
|
|
186
|
+
method: "POST",
|
|
187
|
+
headers: {
|
|
188
|
+
accept: "application/json, text/event-stream",
|
|
189
|
+
"content-type": "application/json"
|
|
190
|
+
},
|
|
191
|
+
body: JSON.stringify({
|
|
192
|
+
jsonrpc: "2.0",
|
|
193
|
+
id: page + 1,
|
|
194
|
+
method: "tools/list",
|
|
195
|
+
params: cursor ? { cursor } : {}
|
|
196
|
+
}),
|
|
197
|
+
signal
|
|
198
|
+
})
|
|
199
|
+
);
|
|
200
|
+
if (!response) return void 0;
|
|
201
|
+
if (response.status === 401 || response.status === 403) {
|
|
202
|
+
await _optionalChain([response, 'access', _23 => _23.body, 'optionalAccess', _24 => _24.cancel, 'call', _25 => _25(), 'access', _26 => _26.catch, 'call', _27 => _27(() => {
|
|
203
|
+
})]);
|
|
204
|
+
return page === 0 ? { authorization: "required" } : void 0;
|
|
205
|
+
}
|
|
206
|
+
if (!response.ok || !response.body) {
|
|
207
|
+
await _optionalChain([response, 'access', _28 => _28.body, 'optionalAccess', _29 => _29.cancel, 'call', _30 => _30(), 'access', _31 => _31.catch, 'call', _32 => _32(() => {
|
|
208
|
+
})]);
|
|
209
|
+
return void 0;
|
|
210
|
+
}
|
|
211
|
+
const answer = parseMessages(
|
|
212
|
+
await readText(response.body, MAX_RESPONSE_BYTES),
|
|
213
|
+
isEventStream(response)
|
|
214
|
+
).find((message) => isObject(message) && message.id === page + 1);
|
|
215
|
+
const result = isObject(answer) && isObject(answer.result) ? answer.result : void 0;
|
|
216
|
+
if (!result || !Array.isArray(result.tools)) return void 0;
|
|
217
|
+
for (const tool of result.tools.map(manifestTool)) {
|
|
218
|
+
if (!tool || names.has(tool.name) || tools.length >= MAX_TOOLS) continue;
|
|
219
|
+
names.add(tool.name);
|
|
220
|
+
tools.push(tool);
|
|
221
|
+
}
|
|
222
|
+
cursor = typeof result.nextCursor === "string" && result.nextCursor ? result.nextCursor : void 0;
|
|
223
|
+
if (!cursor || tools.length >= MAX_TOOLS) break;
|
|
224
|
+
}
|
|
225
|
+
return { authorization: "none", tools };
|
|
226
|
+
}
|
|
227
|
+
var LISTINGS = /* @__PURE__ */ new WeakMap();
|
|
228
|
+
async function _listFarmRegisteredMCPServerTools(handle, request, options) {
|
|
229
|
+
const servers = _chunkLRB5OVRTcjs._listFarmRegisteredMCPServers.call(void 0, ).filter(
|
|
230
|
+
(server) => server.path !== void 0 && MANIFEST_PATH.test(server.path) && singleLine(server.name, 128) && singleLine(server.version, 64)
|
|
231
|
+
);
|
|
232
|
+
const listings = await Promise.all(
|
|
233
|
+
servers.map((server) => {
|
|
234
|
+
if (_optionalChain([options, 'access', _33 => _33.guardCoversPath, 'optionalCall', _34 => _34(server.path)])) {
|
|
235
|
+
return Promise.resolve({ authorization: "required" });
|
|
236
|
+
}
|
|
237
|
+
const cached = options.cache ? LISTINGS.get(server) : void 0;
|
|
238
|
+
if (cached) return cached;
|
|
239
|
+
const controller = new AbortController();
|
|
240
|
+
let timer;
|
|
241
|
+
const listing = Promise.race([
|
|
242
|
+
listTools(
|
|
243
|
+
handle,
|
|
244
|
+
new URL(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, server.path, options.basePath), request.url),
|
|
245
|
+
controller.signal
|
|
246
|
+
),
|
|
247
|
+
new Promise((resolve) => {
|
|
248
|
+
timer = setTimeout(() => {
|
|
249
|
+
controller.abort();
|
|
250
|
+
resolve(void 0);
|
|
251
|
+
}, LIST_TIMEOUT_MS);
|
|
252
|
+
})
|
|
253
|
+
]).catch(() => void 0).finally(() => clearTimeout(timer));
|
|
254
|
+
if (options.cache) {
|
|
255
|
+
LISTINGS.set(server, listing);
|
|
256
|
+
void listing.then((value) => {
|
|
257
|
+
if (!value && LISTINGS.get(server) === listing) LISTINGS.delete(server);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
return listing;
|
|
261
|
+
})
|
|
262
|
+
);
|
|
263
|
+
return servers.flatMap((server, index) => {
|
|
264
|
+
const listing = listings[index];
|
|
265
|
+
if (!listing) return [];
|
|
266
|
+
return [
|
|
267
|
+
{
|
|
268
|
+
name: server.name,
|
|
269
|
+
version: server.version,
|
|
270
|
+
path: server.path,
|
|
271
|
+
authorization: listing.authorization,
|
|
272
|
+
resources: [],
|
|
273
|
+
prompts: [],
|
|
274
|
+
tools: listing.authorization === "none" ? listing.tools : []
|
|
275
|
+
}
|
|
276
|
+
];
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
exports._readFarmRegisteredMCPCalls = _readFarmRegisteredMCPCalls; exports._observeFarmRegisteredMCPResponse = _observeFarmRegisteredMCPResponse; exports._listFarmRegisteredMCPServerTools = _listFarmRegisteredMCPServerTools;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// src/zod-schema.ts
|
|
2
|
+
var zodTypeNameKinds = {
|
|
3
|
+
ZodArray: "array",
|
|
4
|
+
ZodBoolean: "boolean",
|
|
5
|
+
ZodDefault: "default",
|
|
6
|
+
ZodEffects: "effects",
|
|
7
|
+
ZodEnum: "enum",
|
|
8
|
+
ZodLiteral: "literal",
|
|
9
|
+
ZodNullable: "nullable",
|
|
10
|
+
ZodNumber: "number",
|
|
11
|
+
ZodObject: "object",
|
|
12
|
+
ZodOptional: "optional",
|
|
13
|
+
ZodPipeline: "pipe",
|
|
14
|
+
ZodRecord: "record",
|
|
15
|
+
ZodString: "string",
|
|
16
|
+
ZodTuple: "tuple",
|
|
17
|
+
ZodUnion: "union"
|
|
18
|
+
};
|
|
19
|
+
function getZodKind(schema) {
|
|
20
|
+
if (!schema || typeof schema !== "object") return void 0;
|
|
21
|
+
const definition = schema._def;
|
|
22
|
+
if (!definition || typeof definition !== "object") return void 0;
|
|
23
|
+
if (typeof definition.type === "string") return definition.type;
|
|
24
|
+
return typeof definition.typeName === "string" ? zodTypeNameKinds[definition.typeName] : void 0;
|
|
25
|
+
}
|
|
26
|
+
function getZodObjectShape(schema) {
|
|
27
|
+
if (getZodKind(schema) !== "object") return void 0;
|
|
28
|
+
const candidate = schema.shape ?? schema._def?.shape;
|
|
29
|
+
const shape = typeof candidate === "function" ? candidate() : candidate;
|
|
30
|
+
return shape && typeof shape === "object" ? shape : void 0;
|
|
31
|
+
}
|
|
32
|
+
function getZodTransformInput(schema) {
|
|
33
|
+
const kind = getZodKind(schema);
|
|
34
|
+
const definition = schema?._def;
|
|
35
|
+
if (kind === "effects") return definition.schema;
|
|
36
|
+
if (kind !== "pipe") return void 0;
|
|
37
|
+
return getZodKind(definition.in) === "transform" ? definition.out : definition.in;
|
|
38
|
+
}
|
|
39
|
+
function unwrapZodTransforms(schema) {
|
|
40
|
+
let current = schema;
|
|
41
|
+
for (let input = getZodTransformInput(current); input; input = getZodTransformInput(current)) {
|
|
42
|
+
current = input;
|
|
43
|
+
}
|
|
44
|
+
return current;
|
|
45
|
+
}
|
|
46
|
+
var OPTIONALITY_WRAPPERS = /* @__PURE__ */ new Set([
|
|
47
|
+
"optional",
|
|
48
|
+
"nullable",
|
|
49
|
+
"default",
|
|
50
|
+
"prefault",
|
|
51
|
+
"catch",
|
|
52
|
+
"readonly"
|
|
53
|
+
]);
|
|
54
|
+
function getZodArrayFieldKeys(schema) {
|
|
55
|
+
const shape = getZodObjectShape(unwrapZodTransforms(schema));
|
|
56
|
+
if (!shape) return [];
|
|
57
|
+
const keys = [];
|
|
58
|
+
for (const [key, field] of Object.entries(shape)) {
|
|
59
|
+
let current = unwrapZodTransforms(field);
|
|
60
|
+
for (let kind = getZodKind(current); kind && OPTIONALITY_WRAPPERS.has(kind); kind = getZodKind(current)) {
|
|
61
|
+
const inner = current._def?.innerType;
|
|
62
|
+
if (!inner) break;
|
|
63
|
+
current = unwrapZodTransforms(inner);
|
|
64
|
+
}
|
|
65
|
+
if (getZodKind(current) === "array") keys.push(key);
|
|
66
|
+
}
|
|
67
|
+
return keys;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export {
|
|
71
|
+
getZodKind,
|
|
72
|
+
getZodObjectShape,
|
|
73
|
+
getZodTransformInput,
|
|
74
|
+
unwrapZodTransforms,
|
|
75
|
+
getZodArrayFieldKeys
|
|
76
|
+
};
|