@farm.js/core 0.1.35 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{metadata-WGpBYcGn.d.mts → agent-mcp-BVExL8rZ.d.mts} +45 -2
- package/dist/agent-mcp-handler-LPJ2CADR.mjs +19 -0
- package/dist/agent-mcp-handler-SJAHFSPI.cjs +19 -0
- package/dist/{metadata-BnLDsUOS.d.ts → agent-mcp-luzfXK-P.d.ts} +45 -2
- package/dist/agent-runtime.cjs +5 -3
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +4 -2
- package/dist/api/route-manager.cjs +6 -6
- package/dist/api/route-manager.d.mts +10 -4
- package/dist/api/route-manager.d.ts +10 -4
- package/dist/api/route-manager.mjs +5 -5
- package/dist/api/runtime.cjs +4 -4
- package/dist/api/runtime.d.mts +4 -62
- package/dist/api/runtime.d.ts +4 -62
- package/dist/api/runtime.mjs +3 -3
- package/dist/api.cjs +8 -8
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +7 -7
- package/dist/{app-D_j9AAVL.d.mts → app-BukwkFIu.d.mts} +17 -3
- package/dist/{app-BXB3JZYc.d.ts → app-Yfa2dsFy.d.ts} +17 -3
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/app-markdown.mjs +3 -3
- package/dist/{chunk-4KU5Q7C2.mjs → chunk-276VJSM6.mjs} +221 -48
- package/dist/{chunk-PFQKNERH.cjs → chunk-2YTDKNH3.cjs} +364 -197
- package/dist/{chunk-UAORZ7QA.mjs → chunk-35GKZR22.mjs} +2 -2
- package/dist/{chunk-QAU5JD57.mjs → chunk-35WV46VL.mjs} +203 -36
- package/dist/{chunk-EFCQPQMG.cjs → chunk-42NHY7HW.cjs} +54 -4
- package/dist/{chunk-SOMHP6GF.mjs → chunk-4E5AEDKY.mjs} +2 -2
- package/dist/{chunk-UJD4PHYB.mjs → chunk-4E5WBPEG.mjs} +72 -354
- package/dist/{chunk-2G2NNLE2.mjs → chunk-4GLOOWKE.mjs} +4 -4
- package/dist/{chunk-62XKI4Z3.cjs → chunk-4NU4GGTC.cjs} +2 -2
- package/dist/{chunk-4JHOT46A.mjs → chunk-4WCZJQUO.mjs} +54 -4
- package/dist/chunk-4WQ6PGSJ.cjs +367 -0
- package/dist/{chunk-SMHH4VDG.mjs → chunk-4WVJLURN.mjs} +1 -1
- package/dist/chunk-6SJ2KJTA.mjs +314 -0
- package/dist/{chunk-IPXLADVO.cjs → chunk-ADEA7PN3.cjs} +122 -61
- package/dist/{chunk-CP6X4AEU.mjs → chunk-AJQTP4OO.mjs} +1 -1
- package/dist/{chunk-4MMGO7YW.cjs → chunk-AO6RYU5N.cjs} +31 -28
- package/dist/{chunk-GFHLGIYC.cjs → chunk-BO36SELV.cjs} +6 -6
- package/dist/{chunk-6TJOML4E.mjs → chunk-BPOF5U4N.mjs} +4 -4
- package/dist/{chunk-JHWOVJ3M.mjs → chunk-BUGNQIHC.mjs} +5 -0
- package/dist/{chunk-FTFYRMQQ.cjs → chunk-CBJJH36A.cjs} +50 -25
- package/dist/{chunk-7GLPRTTF.cjs → chunk-CGBDNNSM.cjs} +2 -2
- package/dist/chunk-CI6E3UOH.cjs +314 -0
- package/dist/{chunk-X6W5FFH6.cjs → chunk-D2BB47NB.cjs} +8 -8
- package/dist/chunk-DTSROJ5J.mjs +367 -0
- package/dist/{chunk-YC6V7PWE.cjs → chunk-DZ5ZVB2K.cjs} +1 -1
- package/dist/{chunk-DBNKI4NF.cjs → chunk-ECKF2BAM.cjs} +6 -2
- package/dist/{chunk-Q3VLETLE.mjs → chunk-EWET4D2Y.mjs} +1 -1
- package/dist/{chunk-HUMR6LSU.mjs → chunk-F5QO4FNE.mjs} +1 -1
- package/dist/{chunk-XBML5KMG.cjs → chunk-FO427P6I.cjs} +22 -12
- package/dist/{chunk-SAZVVAJH.mjs → chunk-GQRWBCWK.mjs} +8 -5
- package/dist/{chunk-F6Z3Y5KL.mjs → chunk-HOXTWRGB.mjs} +1 -1
- package/dist/{chunk-3BHT4WMP.cjs → chunk-JNUWCDTF.cjs} +6 -6
- package/dist/{chunk-73MC7ZL6.cjs → chunk-JZVADIOD.cjs} +2 -2
- package/dist/{chunk-OMVAU7NT.cjs → chunk-KIIMAWOJ.cjs} +11 -1
- package/dist/{chunk-43FMW62B.mjs → chunk-KMTGADN3.mjs} +28 -0
- package/dist/{chunk-6ETPZTJI.mjs → chunk-LSZAVSGY.mjs} +116 -55
- package/dist/{chunk-HMIJDL7S.mjs → chunk-MKYBIIAQ.mjs} +30 -5
- package/dist/{chunk-RU3M2FIK.cjs → chunk-MRMI32SN.cjs} +87 -369
- package/dist/{chunk-7L5V3KQO.cjs → chunk-N2NAS2AM.cjs} +2 -2
- package/dist/{chunk-ICUQICNC.cjs → chunk-NMHWYWDR.cjs} +654 -481
- package/dist/{chunk-G5RT7EXW.mjs → chunk-O6I6VWKK.mjs} +20 -5
- package/dist/{chunk-PDOCJ6RY.mjs → chunk-O6WAEAX3.mjs} +1 -1
- package/dist/{chunk-6DU6UFUE.mjs → chunk-OHLSEQ57.mjs} +16 -8
- package/dist/{chunk-3PXS2MHU.mjs → chunk-OO7GXVSR.mjs} +1 -1
- package/dist/chunk-PTZ2TVNE.cjs +178 -0
- package/dist/{chunk-6WCPV6G2.mjs → chunk-Q2KB32T4.mjs} +1 -1
- package/dist/{chunk-XCACDAZZ.cjs → chunk-S6VYG6XU.cjs} +23 -8
- package/dist/{chunk-VFQT3LAO.cjs → chunk-SDOTRX3V.cjs} +5 -5
- package/dist/{chunk-BMWDEBXO.cjs → chunk-SHLXACIO.cjs} +31 -3
- package/dist/{chunk-22LTEMGQ.mjs → chunk-T4OGRVNS.mjs} +13 -3
- package/dist/{chunk-ZXGAFZDO.cjs → chunk-T5OJPTVN.cjs} +2 -2
- package/dist/{chunk-VZJR7UTG.cjs → chunk-TE2G5ION.cjs} +2 -2
- package/dist/chunk-UH6QN5NL.mjs +178 -0
- package/dist/{chunk-F7JZENPF.cjs → chunk-UVW64BCB.cjs} +38 -30
- package/dist/{chunk-OKZUAXHF.mjs → chunk-VILIPRS6.mjs} +1 -1
- package/dist/{chunk-3UH7MRCP.cjs → chunk-VQLJWDVW.cjs} +13 -13
- package/dist/{chunk-VPTDD5XF.cjs → chunk-WBKEZXWE.cjs} +5 -0
- package/dist/{chunk-EJQT6KZN.cjs → chunk-WC5UV2HQ.cjs} +2 -2
- package/dist/{chunk-YULD7ICZ.mjs → chunk-WZ77PUAM.mjs} +1 -1
- package/dist/{chunk-C35ZBVRD.mjs → chunk-YWMZUGIS.mjs} +6 -2
- package/dist/{chunk-Y7RKTKYI.mjs → chunk-ZMMBIVQM.mjs} +10 -0
- package/dist/{chunk-ULAWS2PA.cjs → chunk-ZWM5KGAA.cjs} +6 -6
- package/dist/{client-plugins-CvIslxWi.d.mts → client-plugins-C3mK9Pol.d.mts} +98 -5
- package/dist/{client-plugins-HIyulDym.d.ts → client-plugins-r1mOtSC1.d.ts} +98 -5
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-EE5RIBTH.mjs → devtools-ERIKFEXX.mjs} +9 -8
- package/dist/{devtools-EAUY43BS.cjs → devtools-JZJJY5CK.cjs} +10 -9
- package/dist/docs.cjs +12 -11
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +11 -10
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/index.cjs +39 -35
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.mjs +38 -34
- package/dist/integrations.cjs +7 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +6 -2
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +27 -25
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +26 -24
- package/dist/internal/cli-runtime.cjs +14 -13
- package/dist/internal/cli-runtime.mjs +13 -12
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +10 -9
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +9 -8
- package/dist/internal/isolated-boundary.cjs +2 -2
- package/dist/internal/isolated-boundary.d.mts +0 -1
- package/dist/internal/isolated-boundary.d.ts +0 -1
- package/dist/internal/isolated-boundary.mjs +1 -1
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +23 -9
- package/dist/internal/production-runtime.d.mts +67 -27
- package/dist/internal/production-runtime.d.ts +67 -27
- package/dist/internal/production-runtime.mjs +26 -12
- package/dist/{layers-BRQF5ETU.mjs → layers-UTB43B7A.mjs} +1 -1
- package/dist/layers-VUWIOFEO.cjs +18 -0
- package/dist/markdown.cjs +1 -1
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.cjs +6 -6
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/middleware.mjs +5 -5
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/{nitro-OVPLKPE2.cjs → nitro-7F65EZZS.cjs} +3 -3
- package/dist/{nitro-MXRDCXWZ.mjs → nitro-MPZJGPXK.mjs} +2 -2
- package/dist/plugin.cjs +23 -21
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +22 -20
- package/dist/{production-runtime-0sRnuYc-.d.mts → production-runtime-CCeVZXst.d.mts} +1 -1
- package/dist/{production-runtime-Crq6CJ-2.d.ts → production-runtime-DPnsggY3.d.ts} +1 -1
- package/dist/{render-plan-gs9GGPzw.d.mts → render-plan-BuGaPFe6.d.mts} +1 -1
- package/dist/{render-plan-8ozZh2Qv.d.ts → render-plan-Cw4f5E_R.d.ts} +1 -1
- package/dist/renderer/react/server.cjs +3 -3
- package/dist/renderer/react/server.mjs +1 -1
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/{request-B5G8rLBH.d.ts → request-Bkg-hERy.d.ts} +1 -1
- package/dist/{request-fkhiynXe.d.mts → request-CsGARcAw.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-lS5nUMua.d.ts → route-rendering-BUZMH_64.d.ts} +1 -1
- package/dist/{route-rendering-CLnS7AZj.d.mts → route-rendering-f11yh5dp.d.mts} +1 -1
- package/dist/{router-4iuiYnOW.d.ts → router-B8CR9GbD.d.ts} +1 -1
- package/dist/{router-ifU8Dui1.d.mts → router-Cp6yRE8A.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/runtime-CAEv36S_.d.mts +69 -0
- package/dist/runtime-CQVsT330.d.ts +69 -0
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn.cjs +4 -4
- package/dist/server-fn.mjs +3 -3
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-query.cjs +5 -5
- package/dist/server-query.mjs +4 -4
- package/dist/server.cjs +42 -40
- package/dist/server.d.mts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.mjs +25 -23
- package/dist/{spa-router-DaJk5Re4.d.ts → spa-router-BuciWGCZ.d.ts} +2 -2
- package/dist/{spa-router-Bq7VCOwx.d.mts → spa-router-DwbqGkGj.d.mts} +2 -2
- package/dist/testing.cjs +8 -8
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +6 -6
- package/dist/{utils-XJn0c9bj.d.mts → utils-B9V0S_yL.d.mts} +1 -1
- package/dist/{utils-BXLmFsVR.d.ts → utils-CaoWKtYM.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +23 -21
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +22 -20
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +1 -1
- package/dist/layers-4PNE2HOY.cjs +0 -18
- package/dist/{chunk-2F2ER724.cjs → chunk-BPMATOP2.cjs} +2 -2
- package/dist/{chunk-IHNMMXHV.mjs → chunk-OTC5BDGO.mjs} +3 -3
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkECKF2BAMcjs = require('../chunk-ECKF2BAM.cjs');
|
|
8
8
|
require('../chunk-WWFTAUFG.cjs');
|
|
9
9
|
require('../chunk-S3JO3N4H.cjs');
|
|
10
10
|
|
|
@@ -13,4 +13,4 @@ require('../chunk-S3JO3N4H.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.createFarmIsolatedClientBoundary =
|
|
16
|
+
exports.createFarmIsolatedClientBoundary = _chunkECKF2BAMcjs.createFarmIsolatedClientBoundary; exports.createFarmIsolatedHydrationRuntime = _chunkECKF2BAMcjs.createFarmIsolatedHydrationRuntime; exports.createFarmServerPageBoundary = _chunkECKF2BAMcjs.createFarmServerPageBoundary; exports.isolateFarmServerPageGraph = _chunkECKF2BAMcjs.isolateFarmServerPageGraph; exports.wrapFarmIsolatedClientGraph = _chunkECKF2BAMcjs.wrapFarmIsolatedClientGraph;
|
|
@@ -9,7 +9,6 @@ declare function wrapFarmIsolatedClientGraph(ReactRuntime: typeof React__default
|
|
|
9
9
|
* their own, not part of the layout's React tree.
|
|
10
10
|
*/
|
|
11
11
|
declare function isolateFarmServerPageGraph(ReactRuntime: typeof React__default, element: React__default.ReactNode): React__default.ReactElement;
|
|
12
|
-
/** @internal Generated by Farm's experimental isolated-hydration transform. */
|
|
13
12
|
declare function createFarmIsolatedClientBoundary(ReactRuntime: typeof React__default, Component: React__default.ComponentType<any>, moduleReference: string, exportName: string, islandStrategy: FarmIslandStrategy): React__default.ComponentType<any>;
|
|
14
13
|
type FarmIsolatedRoot = {
|
|
15
14
|
render(element: React__default.ReactNode): void;
|
|
@@ -9,7 +9,6 @@ declare function wrapFarmIsolatedClientGraph(ReactRuntime: typeof React__default
|
|
|
9
9
|
* their own, not part of the layout's React tree.
|
|
10
10
|
*/
|
|
11
11
|
declare function isolateFarmServerPageGraph(ReactRuntime: typeof React__default, element: React__default.ReactNode): React__default.ReactElement;
|
|
12
|
-
/** @internal Generated by Farm's experimental isolated-hydration transform. */
|
|
13
12
|
declare function createFarmIsolatedClientBoundary(ReactRuntime: typeof React__default, Component: React__default.ComponentType<any>, moduleReference: string, exportName: string, islandStrategy: FarmIslandStrategy): React__default.ComponentType<any>;
|
|
14
13
|
type FarmIsolatedRoot = {
|
|
15
14
|
render(element: React__default.ReactNode): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkWC5UV2HQcjs = require('../chunk-WC5UV2HQ.cjs');
|
|
4
4
|
require('../chunk-LYLEZIG3.cjs');
|
|
5
5
|
require('../chunk-TKJZFIML.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-KIIMAWOJ.cjs');
|
|
7
7
|
require('../chunk-NO3WWW3N.cjs');
|
|
8
8
|
require('../chunk-S3JO3N4H.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createFarmMetadataImageResponse =
|
|
11
|
+
exports.createFarmMetadataImageResponse = _chunkWC5UV2HQcjs.createFarmMetadataImageResponse;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createFarmMetadataImageResponse
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-AJQTP4OO.mjs";
|
|
4
4
|
import "../chunk-YOZYCI6Z.mjs";
|
|
5
5
|
import "../chunk-5WI2S4CO.mjs";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-ZMMBIVQM.mjs";
|
|
7
7
|
import "../chunk-55YI3RRB.mjs";
|
|
8
8
|
import "../chunk-LPEX4YW6.mjs";
|
|
9
9
|
export {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkCXP5U3RWcjs = require('../chunk-CXP5U3RW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkDZ5ZVB2Kcjs = require('../chunk-DZ5ZVB2K.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkS3JO3N4Hcjs = require('../chunk-S3JO3N4H.cjs');
|
|
@@ -59,7 +59,7 @@ function createFarmProductionSiteReporter(options) {
|
|
|
59
59
|
schemaVersion: FARM_PRODUCTION_SITE_TELEMETRY_SCHEMA_VERSION,
|
|
60
60
|
eventType: FARM_PRODUCTION_SITE_ATTESTATION_EVENT_TYPE,
|
|
61
61
|
packageName: FARM_PRODUCTION_SITE_TELEMETRY_PACKAGE_NAME,
|
|
62
|
-
packageVersion: sanitizeDetail(
|
|
62
|
+
packageVersion: sanitizeDetail(_chunkDZ5ZVB2Kcjs.FARM_VERSION, "unknown"),
|
|
63
63
|
renderer: sanitizeDetail(options.renderer, "custom"),
|
|
64
64
|
deployTarget: sanitizeDetail(options.deployTarget, "custom")
|
|
65
65
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await 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
2
|
|
|
3
|
+
var _chunkCI6E3UOHcjs = require('../chunk-CI6E3UOH.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
var _chunkXD32KALFcjs = require('../chunk-XD32KALF.cjs');
|
|
4
7
|
|
|
5
8
|
|
|
6
9
|
|
|
7
|
-
var
|
|
10
|
+
var _chunkBPMATOP2cjs = require('../chunk-BPMATOP2.cjs');
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
|
|
@@ -32,7 +35,11 @@ var _chunkPCOTGFSMcjs = require('../chunk-PCOTGFSM.cjs');
|
|
|
32
35
|
|
|
33
36
|
|
|
34
37
|
|
|
35
|
-
var
|
|
38
|
+
var _chunkADEA7PN3cjs = require('../chunk-ADEA7PN3.cjs');
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var _chunkPTZ2TVNEcjs = require('../chunk-PTZ2TVNE.cjs');
|
|
36
43
|
|
|
37
44
|
|
|
38
45
|
var _chunkSYQ3MOWWcjs = require('../chunk-SYQ3MOWW.cjs');
|
|
@@ -54,12 +61,15 @@ var _chunkKXWRO25Scjs = require('../chunk-KXWRO25S.cjs');
|
|
|
54
61
|
|
|
55
62
|
|
|
56
63
|
|
|
64
|
+
var _chunkMRMI32SNcjs = require('../chunk-MRMI32SN.cjs');
|
|
65
|
+
|
|
66
|
+
|
|
57
67
|
|
|
58
68
|
|
|
59
69
|
|
|
60
70
|
|
|
61
71
|
|
|
62
|
-
var
|
|
72
|
+
var _chunk4WQ6PGSJcjs = require('../chunk-4WQ6PGSJ.cjs');
|
|
63
73
|
require('../chunk-EUV4YR3V.cjs');
|
|
64
74
|
require('../chunk-J63ZH5OQ.cjs');
|
|
65
75
|
|
|
@@ -99,7 +109,7 @@ var _chunkYWN746UScjs = require('../chunk-YWN746US.cjs');
|
|
|
99
109
|
|
|
100
110
|
|
|
101
111
|
|
|
102
|
-
var
|
|
112
|
+
var _chunkKIIMAWOJcjs = require('../chunk-KIIMAWOJ.cjs');
|
|
103
113
|
|
|
104
114
|
|
|
105
115
|
var _chunkHLJ6MBUZcjs = require('../chunk-HLJ6MBUZ.cjs');
|
|
@@ -110,13 +120,13 @@ var _chunk5QIKR7RRcjs = require('../chunk-5QIKR7RR.cjs');
|
|
|
110
120
|
|
|
111
121
|
|
|
112
122
|
var _chunkQNPEUFHQcjs = require('../chunk-QNPEUFHQ.cjs');
|
|
113
|
-
require('../chunk-KNBBQHO2.cjs');
|
|
114
123
|
|
|
115
124
|
|
|
116
125
|
|
|
117
126
|
|
|
118
127
|
var _chunkE3UK5IIBcjs = require('../chunk-E3UK5IIB.cjs');
|
|
119
|
-
require('../chunk-
|
|
128
|
+
require('../chunk-KNBBQHO2.cjs');
|
|
129
|
+
require('../chunk-DZ5ZVB2K.cjs');
|
|
120
130
|
|
|
121
131
|
|
|
122
132
|
|
|
@@ -191,7 +201,7 @@ function createFarmLayoutSelector(layouts, resolveRouteDirectory) {
|
|
|
191
201
|
return {
|
|
192
202
|
layout,
|
|
193
203
|
segments: segments.length === 0 ? null : segments,
|
|
194
|
-
groupScope:
|
|
204
|
+
groupScope: _chunkADEA7PN3cjs.getRouteGroupScope.call(void 0, layout.pattern)
|
|
195
205
|
};
|
|
196
206
|
});
|
|
197
207
|
return (pathname, routeDirectory) => {
|
|
@@ -205,7 +215,7 @@ function createFarmLayoutSelector(layouts, resolveRouteDirectory) {
|
|
|
205
215
|
}
|
|
206
216
|
if (groupScope !== null) {
|
|
207
217
|
if (directory === void 0) directory = _nullishCoalesce(_optionalChain([resolveRouteDirectory, 'optionalCall', _ => _(pathname)]), () => ( null));
|
|
208
|
-
if (!
|
|
218
|
+
if (!_chunkADEA7PN3cjs.isInRouteGroupScope.call(void 0, directory, groupScope)) continue;
|
|
209
219
|
}
|
|
210
220
|
applicable.push(layout);
|
|
211
221
|
}
|
|
@@ -615,4 +625,8 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, appendFarmLinkHeader, "appendFarmLinkHeade
|
|
|
615
625
|
|
|
616
626
|
|
|
617
627
|
|
|
618
|
-
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
exports._getRequestReadCount = _chunkUXFQ3UDAcjs._getRequestReadCount; exports._isFarmOwnedResponse = _chunkFJ3M4CUXcjs._isFarmOwnedResponse; exports._markFarmOwnedResponse = _chunkFJ3M4CUXcjs._markFarmOwnedResponse; exports._runWithAPIRequestRuntime = _chunk4PPEPOZZcjs._runWithAPIRequestRuntime; exports._runWithAfterRequest = _chunkMQ3H6LT5cjs._runWithAfterRequest; exports._runWithCurrentRequest = _chunkUXFQ3UDAcjs._runWithCurrentRequest; exports._runWithMiddlewareContext = _chunk3BU22U3Mcjs._runWithMiddlewareContext; exports._runWithMiddlewareData = _chunk3BU22U3Mcjs._runWithMiddlewareData; exports._setDefaultFarmThemeConfig = _chunkKXWRO25Scjs._setDefaultFarmThemeConfig; exports._withFarmResponseHeaders = _chunkFJ3M4CUXcjs._withFarmResponseHeaders; exports.addMetadataImageReference = _chunkEK4QAEFZcjs.addMetadataImageReference; exports.addMetadataMarkdownAlternate = _chunkEK4QAEFZcjs.addMetadataMarkdownAlternate; exports.appendFarmLinkHeader = appendFarmLinkHeader; exports.appendFarmRedirectQuery = _chunkYX3DBN4Mcjs.appendFarmRedirectQuery; exports.applyFarmBasePath = _chunkI57LW5VZcjs.applyFarmBasePath; exports.applyFarmCspNonceToResponse = _chunkMRMI32SNcjs.applyFarmCspNonceToResponse; exports.applyFarmPreviewRobotsTag = _chunkMRMI32SNcjs.applyFarmPreviewRobotsTag; exports.applyFarmThemeDocument = _chunkADEA7PN3cjs.applyFarmThemeDocument; exports.applyProductionMiddlewareHeaders = _chunkBPMATOP2cjs.applyProductionMiddlewareHeaders; exports.bufferFarmRequestBody = _chunkKIIMAWOJcjs.bufferFarmRequestBody; exports.cloneFarmRequestWithContext = _chunkKIIMAWOJcjs.cloneFarmRequestWithContext; exports.collectFarmDefaultMCPPages = _chunkPTZ2TVNEcjs.collectFarmDefaultMCPPages; exports.collectFarmLlmsTxtPages = _chunk4WQ6PGSJcjs.collectFarmLlmsTxtPages; exports.compareRouteSpecificity = _chunkNO3WWW3Ncjs.compareRouteSpecificity; exports.configureFarmCache = _chunkYWN746UScjs.configureFarmCache; exports.configureFarmObservability = _chunkE3UK5IIBcjs.configureFarmObservability; exports.createDefaultErrorMarkup = _chunkADEA7PN3cjs.createDefaultErrorMarkup; exports.createFarmAgentRobots = _chunkMRMI32SNcjs.createFarmAgentRobots; exports.createFarmAiCatalogResponse = _chunkADEA7PN3cjs.createFarmAiCatalogResponse; exports.createFarmApiCatalogResponse = _chunkADEA7PN3cjs.createFarmApiCatalogResponse; exports.createFarmAppManifestResponse = _chunkADEA7PN3cjs.createFarmAppManifestResponse; exports.createFarmCacheKey = _chunkNYJMY3JAcjs.createFarmCacheKey; exports.createFarmDefaultLlmsTxt = _chunk4WQ6PGSJcjs.createFarmDefaultLlmsTxt; exports.createFarmDefaultSitemap = _chunkMRMI32SNcjs.createFarmDefaultSitemap; exports.createFarmInstrumentationLifecycle = _chunk2SJ4RQ6Pcjs.createFarmInstrumentationLifecycle; exports.createFarmLayoutSelector = createFarmLayoutSelector; exports.createFarmLegacyRequest = createFarmLegacyRequest; exports.createFarmLlmsFullRenderer = _chunk4WQ6PGSJcjs.createFarmLlmsFullRenderer; exports.createFarmLlmsMarkdownReader = _chunk4WQ6PGSJcjs.createFarmLlmsMarkdownReader; exports.createFarmLocaleCookie = _chunkQCVE2OCIcjs.createFarmLocaleCookie; exports.createFarmMetadataRouteResponse = _chunkADEA7PN3cjs.createFarmMetadataRouteResponse; exports.createFarmNodeRequestAbortSignal = _chunkKIIMAWOJcjs.createFarmNodeRequestAbortSignal; exports.createFarmProductionLifecycle = createFarmProductionLifecycle; exports.createFarmRequestBodyErrorResponse = _chunkKIIMAWOJcjs.createFarmRequestBodyErrorResponse; exports.createFarmThemeDocumentParts = _chunkADEA7PN3cjs.createFarmThemeDocumentParts; exports.createLateNotFoundRecovery = _chunkADEA7PN3cjs.createLateNotFoundRecovery; exports.createLateRedirectRecovery = _chunkADEA7PN3cjs.createLateRedirectRecovery; exports.createProductionMiddlewareRunner = _chunkBPMATOP2cjs.createProductionMiddlewareRunner; exports.emitFarmEvent = _chunkE3UK5IIBcjs.emitFarmEvent; exports.ensureFarmDocumentMeta = _chunkADEA7PN3cjs.ensureFarmDocumentMeta; exports.farmSecretsMatch = _chunkJDNHKPTDcjs.farmSecretsMatch; exports.generateNativeMCPPluginSource = _chunkXD32KALFcjs.generateNativeMCPPluginSource; exports.getCurrentRequest = _chunkUXFQ3UDAcjs.getCurrentRequest; exports.getDefaultErrorStatusText = _chunkADEA7PN3cjs.getDefaultErrorStatusText; exports.getFarmDataCache = _chunkYWN746UScjs.getFarmDataCache; exports.getFarmLocaleVaryHeaders = _chunkQCVE2OCIcjs.getFarmLocaleVaryHeaders; exports.getFarmRedirectError = _chunkOX6O6WVAcjs.getFarmRedirectError; exports.getRoutePatternSpecificity = _chunkNO3WWW3Ncjs.getRoutePatternSpecificity; exports.getTheme = _chunkKXWRO25Scjs.getTheme; exports.handleFarmDefaultMCPRequest = _chunkCI6E3UOHcjs.handleFarmDefaultMCPRequest; exports.isFarmNotFoundError = _chunkOX6O6WVAcjs.isFarmNotFoundError; exports.isFarmRedirectError = _chunkOX6O6WVAcjs.isFarmRedirectError; exports.isInFarmRouteGroupScope = _chunkADEA7PN3cjs.isInRouteGroupScope; exports.listFarmMCPLlmsTxtLinks = _chunkADEA7PN3cjs.listFarmMCPLlmsTxtLinks; exports.localizeFarmHref = _chunkBIDYX3SLcjs.localizeFarmHref; exports.localizeFarmPathname = _chunkBIDYX3SLcjs.localizeFarmPathname; exports.manageFarmDocumentPreloads = _chunkMRMI32SNcjs.manageFarmDocumentPreloads; exports.manageFarmHtmlPreloads = _chunkMRMI32SNcjs.manageFarmHtmlPreloads; exports.manageFarmLinkHeaderPreloads = _chunkMRMI32SNcjs.manageFarmLinkHeaderPreloads; exports.matchFarmPageRoute = _chunk5QIKR7RRcjs.matchRoute; exports.matchesFarmIfNoneMatch = _chunkKIIMAWOJcjs.matchesFarmIfNoneMatch; exports.mergeMetadata = _chunkEK4QAEFZcjs.mergeMetadata; exports.mergeModuleViewport = _chunkEK4QAEFZcjs.mergeModuleViewport; exports.mergeRouteRenderingDirectiveConfig = _chunkSYQ3MOWWcjs.mergeRouteRenderingDirectiveConfig; exports.normalizeRevalidatePath = _chunkYWN746UScjs.normalizeRevalidatePath; exports.parseRoutePath = _chunk5QIKR7RRcjs.parseRoutePath; exports.readFarmRequestBody = _chunkKIIMAWOJcjs.readFarmRequestBody; exports.readNodeRequestBody = _chunkKIIMAWOJcjs.readNodeRequestBody; exports.registerFarmMCPServer = _chunk75RZHGLScjs.registerFarmMCPServer; exports.renderFarmLegacyErrorHtml = renderFarmLegacyErrorHtml; exports.renderFarmLegacyHtml = renderFarmLegacyHtml; exports.renderFarmLlmsFullTxt = _chunk4WQ6PGSJcjs.renderFarmLlmsFullTxt; exports.renderFarmLocaleAlternateLinks = _chunkADEA7PN3cjs.renderFarmLocaleAlternateLinks; exports.renderMetadataHead = _chunkEK4QAEFZcjs.renderMetadataHead; exports.renderViewportHead = _chunkEK4QAEFZcjs.renderViewportHead; exports.reportFarmPreloadWarnings = _chunkMRMI32SNcjs.reportFarmPreloadWarnings; exports.resolveDefaultErrorStatus = _chunkADEA7PN3cjs.resolveDefaultErrorStatus; exports.resolveFarmDefaultMCPServer = _chunkPTZ2TVNEcjs.resolveFarmDefaultMCPServer; exports.resolveFarmI18nConfig = _chunkHLJ6MBUZcjs.resolveFarmI18nConfig; exports.resolveFarmInstrumentationRuntime = _chunk2SJ4RQ6Pcjs.resolveFarmInstrumentationRuntime; exports.resolveFarmLlmsTxtConfig = _chunk4WQ6PGSJcjs.resolveFarmLlmsTxtConfig; exports.resolveFarmNotFoundMetadata = _chunkEK4QAEFZcjs.resolveFarmNotFoundMetadata; exports.resolveFarmPreviewDeployment = _chunkCXP5U3RWcjs.resolveFarmPreviewDeployment; exports.resolveFarmRouteContext = _chunk6QQDAAAZcjs.resolveFarmRouteContext; exports.resolveFarmSecurityConfig = _chunkMRMI32SNcjs.resolveFarmSecurityConfig; exports.resolveFarmServerConfig = _chunkKIIMAWOJcjs.resolveFarmServerConfig; exports.resolveFarmTrailingSlashRedirect = _chunkOYEUREB6cjs.resolveFarmTrailingSlashRedirect; exports.resolveFarmWebRequestOrigin = _chunkUXFQ3UDAcjs.resolveFarmWebRequestOrigin; exports.runWithFarmRequestSpan = _chunkE3UK5IIBcjs.runWithFarmRequestSpan; exports.searchParamsToObject = _chunkQNPEUFHQcjs.searchParamsToObject; exports.serializeFarmInlineValue = serializeFarmInlineValue; exports.setFarmBasePath = _chunkI57LW5VZcjs.setFarmBasePath; exports.setFarmTrailingSlashPreference = _chunkOYEUREB6cjs.setFarmTrailingSlashPreference; exports.stripFarmBasePath = _chunkI57LW5VZcjs.stripFarmBasePath; exports.stripFarmLocaleFromPathname = _chunkBIDYX3SLcjs.stripFarmLocaleFromPathname; exports.withFarmRouteContext = _chunk6QQDAAAZcjs.withFarmRouteContext;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
export { _runWithAfterRequest } from '../after.mjs';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-
|
|
2
|
+
import { aJ as FarmMCPCatalogDetails, fN as APIRequestRuntime, bT as ResolvedFarmMCPConfig, aE as FarmMCPServerRegistration, fO as FarmLlmsTxtLink, I as FarmConfig, _ as FarmContextFactoryInput } from '../client-plugins-C3mK9Pol.mjs';
|
|
3
|
+
export { fY as FarmLlmsTxtUserConfig, fZ as ResolvedFarmLlmsTxtConfig, g2 as applyFarmCspNonceToResponse, fS as collectFarmLlmsTxtPages, fQ as createFarmAgentRobots, fT as createFarmDefaultLlmsTxt, fR as createFarmDefaultSitemap, fW as createFarmLlmsFullRenderer, fU as createFarmLlmsMarkdownReader, fP as createFarmMetadataRouteResponse, g as getFarmRedirectError, i as isFarmNotFoundError, b as isFarmRedirectError, f_ as manageFarmDocumentPreloads, f$ as manageFarmHtmlPreloads, g0 as manageFarmLinkHeaderPreloads, aI as registerFarmMCPServer, fV as renderFarmLlmsFullTxt, g1 as reportFarmPreloadWarnings, fX as resolveFarmLlmsTxtConfig, g3 as resolveFarmSecurityConfig } from '../client-plugins-C3mK9Pol.mjs';
|
|
4
|
+
export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-f11yh5dp.mjs';
|
|
5
5
|
import { R as ResolvedFarmServerConfig } from '../workflows-jZ4BcdoZ.mjs';
|
|
6
6
|
export { a as FarmServerConfig, y as bufferFarmRequestBody, z as cloneFarmRequestWithContext, A as createFarmNodeRequestAbortSignal, B as createFarmRequestBodyErrorResponse, C as matchesFarmIfNoneMatch, E as readFarmRequestBody, G as readNodeRequestBody, H as resolveFarmServerConfig } from '../workflows-jZ4BcdoZ.mjs';
|
|
7
|
-
export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-
|
|
7
|
+
export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-CsGARcAw.mjs';
|
|
8
8
|
export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.mjs';
|
|
9
9
|
import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-CnH8DOqo.mjs';
|
|
10
10
|
export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-khasx3fU.mjs';
|
|
11
11
|
import { F as FarmLocalePathConfig } from '../index-BJJfLxJo.mjs';
|
|
12
12
|
export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-BJJfLxJo.mjs';
|
|
13
|
-
|
|
14
|
-
export {
|
|
13
|
+
import { F as FarmDefaultMCPPage } from '../agent-mcp-BVExL8rZ.mjs';
|
|
14
|
+
export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, g as collectFarmDefaultMCPPages, m as mergeMetadata, d as mergeModuleViewport, r as renderMetadataHead, e as renderViewportHead, h as resolveFarmDefaultMCPServer, f as resolveFarmNotFoundMetadata } from '../agent-mcp-BVExL8rZ.mjs';
|
|
15
|
+
export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner } from '../production-runtime-CCeVZXst.mjs';
|
|
15
16
|
export { L as configureFarmObservability, P as emitFarmEvent, Q as runWithFarmRequestSpan } from '../observability-CoXunYhS.mjs';
|
|
16
17
|
export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.mjs';
|
|
17
18
|
export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.mjs';
|
|
18
19
|
import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.mjs';
|
|
19
20
|
export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.mjs';
|
|
20
|
-
export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-
|
|
21
|
+
export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-B9V0S_yL.mjs';
|
|
21
22
|
import 'node:http';
|
|
22
23
|
import '../lifecycle-DK06VuKP.mjs';
|
|
23
24
|
import '../integration-api-0y4FXJpC.mjs';
|
|
@@ -61,18 +62,6 @@ interface FarmAppManifestWebMCPTool {
|
|
|
61
62
|
inputSchemaSource: "literal" | "computed" | "none";
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
/**
|
|
65
|
-
* `/.well-known/farmjs`: one document describing a Farm app, so tools can discover it
|
|
66
|
-
* instead of each rebuilding the picture: Farm's version, renderer and packages, the app's
|
|
67
|
-
* MCP servers with every tool (however it was defined) and its schemas, their resources and
|
|
68
|
-
* prompts, its WebMCP browser tools, its integrations, its agent surfaces and its plugins.
|
|
69
|
-
* Never environment values, settings or secrets.
|
|
70
|
-
*
|
|
71
|
-
* Development serves it to anyone on the dev server. Production answers only a request
|
|
72
|
-
* signed for the app's Farm Infra key, so the public never reads the app's internals; any
|
|
73
|
-
* other request gets a 404. Kept free of Node built-ins: Web Crypto only.
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
65
|
type FarmAppManifestToolSource = "endpoint" | "defineTool" | "serverFunction";
|
|
77
66
|
interface FarmAppManifestTool {
|
|
78
67
|
name: string;
|
|
@@ -80,7 +69,7 @@ interface FarmAppManifestTool {
|
|
|
80
69
|
description?: string;
|
|
81
70
|
/** How the app defined it: an API endpoint, `defineTool`, or a server function. */
|
|
82
71
|
source: FarmAppManifestToolSource;
|
|
83
|
-
/** The endpoint's method and route, for `source: "endpoint"`. */
|
|
72
|
+
/** The endpoint's method and route, for `source: "endpoint"`. Only in Farm Infra's view. */
|
|
84
73
|
method?: string;
|
|
85
74
|
path?: string;
|
|
86
75
|
readOnlyHint?: boolean;
|
|
@@ -107,6 +96,11 @@ interface FarmAppManifest {
|
|
|
107
96
|
name: string;
|
|
108
97
|
version: string;
|
|
109
98
|
path: string;
|
|
99
|
+
/**
|
|
100
|
+
* `"required"` when the server runs `authorize`: an anonymous client lists nothing,
|
|
101
|
+
* so the public view leaves `tools`, `resources` and `prompts` empty.
|
|
102
|
+
*/
|
|
103
|
+
authorization: "none" | "required";
|
|
110
104
|
tools: FarmAppManifestTool[];
|
|
111
105
|
resources: NonNullable<ServerDetails["resources"]>;
|
|
112
106
|
prompts: NonNullable<ServerDetails["prompts"]>;
|
|
@@ -141,18 +135,30 @@ interface FarmAppManifestInput {
|
|
|
141
135
|
integrations: FarmAppManifest["integrations"];
|
|
142
136
|
agent: FarmAppManifest["agent"];
|
|
143
137
|
plugins: string[];
|
|
144
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* `analytics: false` turns off Farm Infra's signed view: the app talks to no Farm Infra.
|
|
140
|
+
* The public manifest is still served; `agent.manifest: false` turns that off.
|
|
141
|
+
*/
|
|
145
142
|
analytics: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* The default read-only MCP server (`agent.mcp`) while the app would serve it. Set by the
|
|
145
|
+
* server at runtime, not serialized: it answers only while no other MCP server is listed.
|
|
146
|
+
*/
|
|
147
|
+
defaultMCP?: () => {
|
|
148
|
+
name: string;
|
|
149
|
+
version: string;
|
|
150
|
+
path: string;
|
|
151
|
+
} | undefined;
|
|
146
152
|
}
|
|
147
153
|
type Env = Record<string, string | undefined>;
|
|
148
154
|
/**
|
|
149
|
-
* Answers `/.well-known/farmjs
|
|
150
|
-
*
|
|
155
|
+
* Answers `/.well-known/farmjs.json` for anyone. A request Farm Infra signed for the app's
|
|
156
|
+
* `FARMJS_API_KEY` gets the full view, unless `analytics` is off; any other read gets the
|
|
157
|
+
* public one.
|
|
151
158
|
*/
|
|
152
|
-
declare function createFarmAppManifestResponse(request: Request, input: FarmAppManifestInput, options
|
|
153
|
-
development: boolean;
|
|
159
|
+
declare function createFarmAppManifestResponse(request: Request, input: FarmAppManifestInput, options?: {
|
|
154
160
|
env?: Env;
|
|
155
|
-
}): Promise<Response
|
|
161
|
+
}): Promise<Response>;
|
|
156
162
|
|
|
157
163
|
/**
|
|
158
164
|
* Compare a caller-supplied secret against the configured one without leaking
|
|
@@ -306,11 +312,45 @@ declare function _isFarmOwnedResponse(response: Response): boolean;
|
|
|
306
312
|
*/
|
|
307
313
|
declare function _withFarmResponseHeaders(response: Response, edit: (headers: Headers) => void): Response;
|
|
308
314
|
|
|
315
|
+
/**
|
|
316
|
+
* The protocol side of the default MCP server (`agent.mcp`, see `agent-mcp.ts`): stateless
|
|
317
|
+
* Streamable HTTP with JSON responses, and three read-only tools over the app's public pages.
|
|
318
|
+
* A small JSON-RPC implementation rather than the MCP SDK, so apps that never receive an
|
|
319
|
+
* MCP request carry no SDK.
|
|
320
|
+
*
|
|
321
|
+
* Kept free of Node built-ins: the production server runs on edge runtimes too.
|
|
322
|
+
*/
|
|
323
|
+
|
|
324
|
+
interface FarmDefaultMCPContext {
|
|
325
|
+
server: {
|
|
326
|
+
name: string;
|
|
327
|
+
version: string;
|
|
328
|
+
title?: string;
|
|
329
|
+
};
|
|
330
|
+
/** The app's public pages for this request's origin. */
|
|
331
|
+
listPages: () => FarmDefaultMCPPage[] | Promise<FarmDefaultMCPPage[]>;
|
|
332
|
+
/** Reads a Markdown URL anonymously; null when the page does not answer with Markdown. */
|
|
333
|
+
readMarkdown: (url: string) => Promise<string | null>;
|
|
334
|
+
basePath?: string;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Answers one request to the default MCP endpoint: stateless Streamable HTTP, JSON
|
|
338
|
+
* responses, no sessions, and no server-initiated stream (GET answers 405).
|
|
339
|
+
*/
|
|
340
|
+
declare function handleFarmDefaultMCPRequest(request: Request, context: FarmDefaultMCPContext): Promise<Response>;
|
|
341
|
+
|
|
309
342
|
interface FarmAiCatalogInput {
|
|
310
343
|
/** The app's basePath; the catalog lives beneath it, like the API catalog. */
|
|
311
344
|
basePath?: string;
|
|
312
345
|
/** The app's public API path, which maps to Farm's canonical `/api`. */
|
|
313
346
|
apiServerBasePath?: string;
|
|
347
|
+
/**
|
|
348
|
+
* The default read-only server (`agent.mcp`), when this app would serve it. It is
|
|
349
|
+
* listed only while no other MCP server is, the same rule that decides whether it answers.
|
|
350
|
+
*/
|
|
351
|
+
defaultMCP?: () => (FarmMCPServerRegistration & {
|
|
352
|
+
path: `/${string}`;
|
|
353
|
+
}) | undefined;
|
|
314
354
|
}
|
|
315
355
|
/**
|
|
316
356
|
* The llms.txt links for the app's MCP servers: each endpoint, then the catalog
|
|
@@ -424,4 +464,4 @@ declare function appendFarmRedirectQuery(destination: string, search: string): s
|
|
|
424
464
|
|
|
425
465
|
declare function appendFarmLinkHeader(headers: Headers, value: string): void;
|
|
426
466
|
|
|
427
|
-
export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
|
|
467
|
+
export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, handleFarmDefaultMCPRequest, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
export { _runWithAfterRequest } from '../after.js';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-
|
|
2
|
+
import { aJ as FarmMCPCatalogDetails, fN as APIRequestRuntime, bT as ResolvedFarmMCPConfig, aE as FarmMCPServerRegistration, fO as FarmLlmsTxtLink, I as FarmConfig, _ as FarmContextFactoryInput } from '../client-plugins-r1mOtSC1.js';
|
|
3
|
+
export { fY as FarmLlmsTxtUserConfig, fZ as ResolvedFarmLlmsTxtConfig, g2 as applyFarmCspNonceToResponse, fS as collectFarmLlmsTxtPages, fQ as createFarmAgentRobots, fT as createFarmDefaultLlmsTxt, fR as createFarmDefaultSitemap, fW as createFarmLlmsFullRenderer, fU as createFarmLlmsMarkdownReader, fP as createFarmMetadataRouteResponse, g as getFarmRedirectError, i as isFarmNotFoundError, b as isFarmRedirectError, f_ as manageFarmDocumentPreloads, f$ as manageFarmHtmlPreloads, g0 as manageFarmLinkHeaderPreloads, aI as registerFarmMCPServer, fV as renderFarmLlmsFullTxt, g1 as reportFarmPreloadWarnings, fX as resolveFarmLlmsTxtConfig, g3 as resolveFarmSecurityConfig } from '../client-plugins-r1mOtSC1.js';
|
|
4
|
+
export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-BUZMH_64.js';
|
|
5
5
|
import { R as ResolvedFarmServerConfig } from '../workflows-jZ4BcdoZ.js';
|
|
6
6
|
export { a as FarmServerConfig, y as bufferFarmRequestBody, z as cloneFarmRequestWithContext, A as createFarmNodeRequestAbortSignal, B as createFarmRequestBodyErrorResponse, C as matchesFarmIfNoneMatch, E as readFarmRequestBody, G as readNodeRequestBody, H as resolveFarmServerConfig } from '../workflows-jZ4BcdoZ.js';
|
|
7
|
-
export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-
|
|
7
|
+
export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-Bkg-hERy.js';
|
|
8
8
|
export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.js';
|
|
9
9
|
import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-CnH8DOqo.js';
|
|
10
10
|
export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-DadfRL6F.js';
|
|
11
11
|
import { F as FarmLocalePathConfig } from '../index-CwoOP-MW.js';
|
|
12
12
|
export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-CwoOP-MW.js';
|
|
13
|
-
|
|
14
|
-
export {
|
|
13
|
+
import { F as FarmDefaultMCPPage } from '../agent-mcp-luzfXK-P.js';
|
|
14
|
+
export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, g as collectFarmDefaultMCPPages, m as mergeMetadata, d as mergeModuleViewport, r as renderMetadataHead, e as renderViewportHead, h as resolveFarmDefaultMCPServer, f as resolveFarmNotFoundMetadata } from '../agent-mcp-luzfXK-P.js';
|
|
15
|
+
export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner } from '../production-runtime-DPnsggY3.js';
|
|
15
16
|
export { L as configureFarmObservability, P as emitFarmEvent, Q as runWithFarmRequestSpan } from '../observability-CoXunYhS.js';
|
|
16
17
|
export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.js';
|
|
17
18
|
export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.js';
|
|
18
19
|
import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.js';
|
|
19
20
|
export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.js';
|
|
20
|
-
export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-
|
|
21
|
+
export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-CaoWKtYM.js';
|
|
21
22
|
import 'node:http';
|
|
22
23
|
import '../lifecycle-DK06VuKP.js';
|
|
23
24
|
import '../integration-api-BPJo5oXb.js';
|
|
@@ -61,18 +62,6 @@ interface FarmAppManifestWebMCPTool {
|
|
|
61
62
|
inputSchemaSource: "literal" | "computed" | "none";
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
/**
|
|
65
|
-
* `/.well-known/farmjs`: one document describing a Farm app, so tools can discover it
|
|
66
|
-
* instead of each rebuilding the picture: Farm's version, renderer and packages, the app's
|
|
67
|
-
* MCP servers with every tool (however it was defined) and its schemas, their resources and
|
|
68
|
-
* prompts, its WebMCP browser tools, its integrations, its agent surfaces and its plugins.
|
|
69
|
-
* Never environment values, settings or secrets.
|
|
70
|
-
*
|
|
71
|
-
* Development serves it to anyone on the dev server. Production answers only a request
|
|
72
|
-
* signed for the app's Farm Infra key, so the public never reads the app's internals; any
|
|
73
|
-
* other request gets a 404. Kept free of Node built-ins: Web Crypto only.
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
65
|
type FarmAppManifestToolSource = "endpoint" | "defineTool" | "serverFunction";
|
|
77
66
|
interface FarmAppManifestTool {
|
|
78
67
|
name: string;
|
|
@@ -80,7 +69,7 @@ interface FarmAppManifestTool {
|
|
|
80
69
|
description?: string;
|
|
81
70
|
/** How the app defined it: an API endpoint, `defineTool`, or a server function. */
|
|
82
71
|
source: FarmAppManifestToolSource;
|
|
83
|
-
/** The endpoint's method and route, for `source: "endpoint"`. */
|
|
72
|
+
/** The endpoint's method and route, for `source: "endpoint"`. Only in Farm Infra's view. */
|
|
84
73
|
method?: string;
|
|
85
74
|
path?: string;
|
|
86
75
|
readOnlyHint?: boolean;
|
|
@@ -107,6 +96,11 @@ interface FarmAppManifest {
|
|
|
107
96
|
name: string;
|
|
108
97
|
version: string;
|
|
109
98
|
path: string;
|
|
99
|
+
/**
|
|
100
|
+
* `"required"` when the server runs `authorize`: an anonymous client lists nothing,
|
|
101
|
+
* so the public view leaves `tools`, `resources` and `prompts` empty.
|
|
102
|
+
*/
|
|
103
|
+
authorization: "none" | "required";
|
|
110
104
|
tools: FarmAppManifestTool[];
|
|
111
105
|
resources: NonNullable<ServerDetails["resources"]>;
|
|
112
106
|
prompts: NonNullable<ServerDetails["prompts"]>;
|
|
@@ -141,18 +135,30 @@ interface FarmAppManifestInput {
|
|
|
141
135
|
integrations: FarmAppManifest["integrations"];
|
|
142
136
|
agent: FarmAppManifest["agent"];
|
|
143
137
|
plugins: string[];
|
|
144
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* `analytics: false` turns off Farm Infra's signed view: the app talks to no Farm Infra.
|
|
140
|
+
* The public manifest is still served; `agent.manifest: false` turns that off.
|
|
141
|
+
*/
|
|
145
142
|
analytics: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* The default read-only MCP server (`agent.mcp`) while the app would serve it. Set by the
|
|
145
|
+
* server at runtime, not serialized: it answers only while no other MCP server is listed.
|
|
146
|
+
*/
|
|
147
|
+
defaultMCP?: () => {
|
|
148
|
+
name: string;
|
|
149
|
+
version: string;
|
|
150
|
+
path: string;
|
|
151
|
+
} | undefined;
|
|
146
152
|
}
|
|
147
153
|
type Env = Record<string, string | undefined>;
|
|
148
154
|
/**
|
|
149
|
-
* Answers `/.well-known/farmjs
|
|
150
|
-
*
|
|
155
|
+
* Answers `/.well-known/farmjs.json` for anyone. A request Farm Infra signed for the app's
|
|
156
|
+
* `FARMJS_API_KEY` gets the full view, unless `analytics` is off; any other read gets the
|
|
157
|
+
* public one.
|
|
151
158
|
*/
|
|
152
|
-
declare function createFarmAppManifestResponse(request: Request, input: FarmAppManifestInput, options
|
|
153
|
-
development: boolean;
|
|
159
|
+
declare function createFarmAppManifestResponse(request: Request, input: FarmAppManifestInput, options?: {
|
|
154
160
|
env?: Env;
|
|
155
|
-
}): Promise<Response
|
|
161
|
+
}): Promise<Response>;
|
|
156
162
|
|
|
157
163
|
/**
|
|
158
164
|
* Compare a caller-supplied secret against the configured one without leaking
|
|
@@ -306,11 +312,45 @@ declare function _isFarmOwnedResponse(response: Response): boolean;
|
|
|
306
312
|
*/
|
|
307
313
|
declare function _withFarmResponseHeaders(response: Response, edit: (headers: Headers) => void): Response;
|
|
308
314
|
|
|
315
|
+
/**
|
|
316
|
+
* The protocol side of the default MCP server (`agent.mcp`, see `agent-mcp.ts`): stateless
|
|
317
|
+
* Streamable HTTP with JSON responses, and three read-only tools over the app's public pages.
|
|
318
|
+
* A small JSON-RPC implementation rather than the MCP SDK, so apps that never receive an
|
|
319
|
+
* MCP request carry no SDK.
|
|
320
|
+
*
|
|
321
|
+
* Kept free of Node built-ins: the production server runs on edge runtimes too.
|
|
322
|
+
*/
|
|
323
|
+
|
|
324
|
+
interface FarmDefaultMCPContext {
|
|
325
|
+
server: {
|
|
326
|
+
name: string;
|
|
327
|
+
version: string;
|
|
328
|
+
title?: string;
|
|
329
|
+
};
|
|
330
|
+
/** The app's public pages for this request's origin. */
|
|
331
|
+
listPages: () => FarmDefaultMCPPage[] | Promise<FarmDefaultMCPPage[]>;
|
|
332
|
+
/** Reads a Markdown URL anonymously; null when the page does not answer with Markdown. */
|
|
333
|
+
readMarkdown: (url: string) => Promise<string | null>;
|
|
334
|
+
basePath?: string;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Answers one request to the default MCP endpoint: stateless Streamable HTTP, JSON
|
|
338
|
+
* responses, no sessions, and no server-initiated stream (GET answers 405).
|
|
339
|
+
*/
|
|
340
|
+
declare function handleFarmDefaultMCPRequest(request: Request, context: FarmDefaultMCPContext): Promise<Response>;
|
|
341
|
+
|
|
309
342
|
interface FarmAiCatalogInput {
|
|
310
343
|
/** The app's basePath; the catalog lives beneath it, like the API catalog. */
|
|
311
344
|
basePath?: string;
|
|
312
345
|
/** The app's public API path, which maps to Farm's canonical `/api`. */
|
|
313
346
|
apiServerBasePath?: string;
|
|
347
|
+
/**
|
|
348
|
+
* The default read-only server (`agent.mcp`), when this app would serve it. It is
|
|
349
|
+
* listed only while no other MCP server is, the same rule that decides whether it answers.
|
|
350
|
+
*/
|
|
351
|
+
defaultMCP?: () => (FarmMCPServerRegistration & {
|
|
352
|
+
path: `/${string}`;
|
|
353
|
+
}) | undefined;
|
|
314
354
|
}
|
|
315
355
|
/**
|
|
316
356
|
* The llms.txt links for the app's MCP servers: each endpoint, then the catalog
|
|
@@ -424,4 +464,4 @@ declare function appendFarmRedirectQuery(destination: string, search: string): s
|
|
|
424
464
|
|
|
425
465
|
declare function appendFarmLinkHeader(headers: Headers, value: string): void;
|
|
426
466
|
|
|
427
|
-
export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
|
|
467
|
+
export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, handleFarmDefaultMCPRequest, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
|