@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Metadata,
|
|
1
|
+
import { M as Metadata, aD as FarmAgentJsonLd, aE as FarmMCPServerRegistration, aF as FarmMarkdownResolvedConfig } from './client-plugins-C3mK9Pol.mjs';
|
|
2
2
|
|
|
3
3
|
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
4
|
interface FarmMetadataImageReference {
|
|
@@ -63,4 +63,47 @@ interface RenderMetadataHeadOptions {
|
|
|
63
63
|
}
|
|
64
64
|
declare function renderMetadataHead(metadata: MetadataRecord | undefined, options?: RenderMetadataHeadOptions): RenderedMetadataHead;
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
interface FarmDefaultMCPPage {
|
|
67
|
+
/** The page's route path, such as `/about`. */
|
|
68
|
+
path: string;
|
|
69
|
+
title: string;
|
|
70
|
+
/** The page's absolute URL. */
|
|
71
|
+
url: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
/** The absolute URL of the page's Markdown mirror, which `read_page` reads. */
|
|
74
|
+
markdownUrl: string;
|
|
75
|
+
}
|
|
76
|
+
interface FarmDefaultMCPPageSource {
|
|
77
|
+
pattern: string;
|
|
78
|
+
/** The page module, for its `metadata` and whether a route `guard` gates it. */
|
|
79
|
+
module?: unknown;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The pages the default server lists and reads: static pages with a Markdown mirror,
|
|
83
|
+
* leaving out pages whose metadata says noindex and pages behind a route `guard`, as the
|
|
84
|
+
* generated sitemap does.
|
|
85
|
+
*/
|
|
86
|
+
declare function collectFarmDefaultMCPPages(sources: Iterable<FarmDefaultMCPPageSource>, options: {
|
|
87
|
+
origin: string;
|
|
88
|
+
basePath?: string;
|
|
89
|
+
markdown?: FarmMarkdownResolvedConfig;
|
|
90
|
+
}): FarmDefaultMCPPage[];
|
|
91
|
+
/**
|
|
92
|
+
* The default server's identity, from the app's package.json when it has one. The AI
|
|
93
|
+
* catalog namespaces a plain name by the request's host, as it does for every server.
|
|
94
|
+
*/
|
|
95
|
+
declare function createFarmDefaultMCPServer(app: {
|
|
96
|
+
name?: unknown;
|
|
97
|
+
version?: unknown;
|
|
98
|
+
} | undefined, farmVersion: string): FarmMCPServerRegistration & {
|
|
99
|
+
path: `/${string}`;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* The default server, or undefined once any other MCP server is published or registered:
|
|
103
|
+
* `@farm.js/mcp` publishes its catalog and the docs engine registers its endpoint when the
|
|
104
|
+
* server starts. Serving and listing both ask here, so the AI catalog never names a server
|
|
105
|
+
* that does not answer.
|
|
106
|
+
*/
|
|
107
|
+
declare function resolveFarmDefaultMCPServer<T>(server: T | undefined | null): T | undefined;
|
|
108
|
+
|
|
109
|
+
export { type FarmDefaultMCPPage as F, type MetadataImageKind as M, addMetadataImageReference as a, addMetadataMarkdownAlternate as b, createFarmDefaultMCPServer as c, mergeModuleViewport as d, renderViewportHead as e, resolveFarmNotFoundMetadata as f, collectFarmDefaultMCPPages as g, resolveFarmDefaultMCPServer as h, mergeMetadata as m, renderMetadataHead as r };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
handleFarmDefaultMCPRequest
|
|
3
|
+
} from "./chunk-6SJ2KJTA.mjs";
|
|
4
|
+
import "./chunk-UH6QN5NL.mjs";
|
|
5
|
+
import "./chunk-DTSROJ5J.mjs";
|
|
6
|
+
import "./chunk-WWIKMBRN.mjs";
|
|
7
|
+
import "./chunk-MVL2RAJW.mjs";
|
|
8
|
+
import "./chunk-ZLAT2CWY.mjs";
|
|
9
|
+
import "./chunk-FUZEBRP3.mjs";
|
|
10
|
+
import "./chunk-BTHHUD7Q.mjs";
|
|
11
|
+
import "./chunk-O7BH5O46.mjs";
|
|
12
|
+
import "./chunk-7LTCDQRS.mjs";
|
|
13
|
+
import "./chunk-Z3HATSKO.mjs";
|
|
14
|
+
import "./chunk-4RB44K6Z.mjs";
|
|
15
|
+
import "./chunk-55YI3RRB.mjs";
|
|
16
|
+
import "./chunk-LPEX4YW6.mjs";
|
|
17
|
+
export {
|
|
18
|
+
handleFarmDefaultMCPRequest
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkCI6E3UOHcjs = require('./chunk-CI6E3UOH.cjs');
|
|
4
|
+
require('./chunk-PTZ2TVNE.cjs');
|
|
5
|
+
require('./chunk-4WQ6PGSJ.cjs');
|
|
6
|
+
require('./chunk-EUV4YR3V.cjs');
|
|
7
|
+
require('./chunk-J63ZH5OQ.cjs');
|
|
8
|
+
require('./chunk-75RZHGLS.cjs');
|
|
9
|
+
require('./chunk-E3UK5IIB.cjs');
|
|
10
|
+
require('./chunk-KNBBQHO2.cjs');
|
|
11
|
+
require('./chunk-G7HXGLEC.cjs');
|
|
12
|
+
require('./chunk-S3A45T7F.cjs');
|
|
13
|
+
require('./chunk-FJ3M4CUX.cjs');
|
|
14
|
+
require('./chunk-I57LW5VZ.cjs');
|
|
15
|
+
require('./chunk-NO3WWW3N.cjs');
|
|
16
|
+
require('./chunk-S3JO3N4H.cjs');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.handleFarmDefaultMCPRequest = _chunkCI6E3UOHcjs.handleFarmDefaultMCPRequest;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Metadata,
|
|
1
|
+
import { M as Metadata, aD as FarmAgentJsonLd, aE as FarmMCPServerRegistration, aF as FarmMarkdownResolvedConfig } from './client-plugins-r1mOtSC1.js';
|
|
2
2
|
|
|
3
3
|
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
4
|
interface FarmMetadataImageReference {
|
|
@@ -63,4 +63,47 @@ interface RenderMetadataHeadOptions {
|
|
|
63
63
|
}
|
|
64
64
|
declare function renderMetadataHead(metadata: MetadataRecord | undefined, options?: RenderMetadataHeadOptions): RenderedMetadataHead;
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
interface FarmDefaultMCPPage {
|
|
67
|
+
/** The page's route path, such as `/about`. */
|
|
68
|
+
path: string;
|
|
69
|
+
title: string;
|
|
70
|
+
/** The page's absolute URL. */
|
|
71
|
+
url: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
/** The absolute URL of the page's Markdown mirror, which `read_page` reads. */
|
|
74
|
+
markdownUrl: string;
|
|
75
|
+
}
|
|
76
|
+
interface FarmDefaultMCPPageSource {
|
|
77
|
+
pattern: string;
|
|
78
|
+
/** The page module, for its `metadata` and whether a route `guard` gates it. */
|
|
79
|
+
module?: unknown;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The pages the default server lists and reads: static pages with a Markdown mirror,
|
|
83
|
+
* leaving out pages whose metadata says noindex and pages behind a route `guard`, as the
|
|
84
|
+
* generated sitemap does.
|
|
85
|
+
*/
|
|
86
|
+
declare function collectFarmDefaultMCPPages(sources: Iterable<FarmDefaultMCPPageSource>, options: {
|
|
87
|
+
origin: string;
|
|
88
|
+
basePath?: string;
|
|
89
|
+
markdown?: FarmMarkdownResolvedConfig;
|
|
90
|
+
}): FarmDefaultMCPPage[];
|
|
91
|
+
/**
|
|
92
|
+
* The default server's identity, from the app's package.json when it has one. The AI
|
|
93
|
+
* catalog namespaces a plain name by the request's host, as it does for every server.
|
|
94
|
+
*/
|
|
95
|
+
declare function createFarmDefaultMCPServer(app: {
|
|
96
|
+
name?: unknown;
|
|
97
|
+
version?: unknown;
|
|
98
|
+
} | undefined, farmVersion: string): FarmMCPServerRegistration & {
|
|
99
|
+
path: `/${string}`;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* The default server, or undefined once any other MCP server is published or registered:
|
|
103
|
+
* `@farm.js/mcp` publishes its catalog and the docs engine registers its endpoint when the
|
|
104
|
+
* server starts. Serving and listing both ask here, so the AI catalog never names a server
|
|
105
|
+
* that does not answer.
|
|
106
|
+
*/
|
|
107
|
+
declare function resolveFarmDefaultMCPServer<T>(server: T | undefined | null): T | undefined;
|
|
108
|
+
|
|
109
|
+
export { type FarmDefaultMCPPage as F, type MetadataImageKind as M, addMetadataImageReference as a, addMetadataMarkdownAlternate as b, createFarmDefaultMCPServer as c, mergeModuleViewport as d, renderViewportHead as e, resolveFarmNotFoundMetadata as f, collectFarmDefaultMCPPages as g, resolveFarmDefaultMCPServer as h, mergeMetadata as m, renderMetadataHead as r };
|
package/dist/agent-runtime.cjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCBJJH36Acjs = require('./chunk-CBJJH36A.cjs');
|
|
4
4
|
require('./chunk-G643DQCH.cjs');
|
|
5
5
|
require('./chunk-Z2HLU4IX.cjs');
|
|
6
6
|
require('./chunk-LSKZMJMP.cjs');
|
|
7
7
|
require('./chunk-SVRTJOUF.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-KIIMAWOJ.cjs');
|
|
9
9
|
require('./chunk-UQZ4AYTH.cjs');
|
|
10
|
+
require('./chunk-KNBBQHO2.cjs');
|
|
10
11
|
require('./chunk-NZKJGRB3.cjs');
|
|
12
|
+
require('./chunk-S3A45T7F.cjs');
|
|
11
13
|
require('./chunk-DVM4FKZL.cjs');
|
|
12
14
|
require('./chunk-US2QVW3E.cjs');
|
|
13
15
|
require('./chunk-BIDYX3SL.cjs');
|
|
@@ -94,7 +96,7 @@ function createAgentRuntimeIntegration(options) {
|
|
|
94
96
|
});
|
|
95
97
|
}
|
|
96
98
|
};
|
|
97
|
-
return
|
|
99
|
+
return _chunkCBJJH36Acjs.defineIntegration.call(void 0, {
|
|
98
100
|
category: "agent",
|
|
99
101
|
type: provider,
|
|
100
102
|
serverRuntime: options.serverRuntime,
|
package/dist/agent-runtime.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import {
|
|
2
|
+
import { G as BundleResultPayload, a as FarmPlugin, H as FarmIntegration } from './client-plugins-C3mK9Pol.mjs';
|
|
3
3
|
import './lifecycle-DK06VuKP.mjs';
|
|
4
4
|
import './integration-api-0y4FXJpC.mjs';
|
|
5
5
|
import './endpoint-CCHFqyTE.mjs';
|
package/dist/agent-runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import {
|
|
2
|
+
import { G as BundleResultPayload, a as FarmPlugin, H as FarmIntegration } from './client-plugins-r1mOtSC1.js';
|
|
3
3
|
import './lifecycle-DK06VuKP.js';
|
|
4
4
|
import './integration-api-BPJo5oXb.js';
|
|
5
5
|
import './endpoint-CA-TNX60.js';
|
package/dist/agent-runtime.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineIntegration
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MKYBIIAQ.mjs";
|
|
4
4
|
import "./chunk-44SYJEG3.mjs";
|
|
5
5
|
import "./chunk-JG6DJF5A.mjs";
|
|
6
6
|
import "./chunk-FZ6YYU2W.mjs";
|
|
7
7
|
import "./chunk-FP2INE7H.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-ZMMBIVQM.mjs";
|
|
9
9
|
import "./chunk-Z2RZJZIZ.mjs";
|
|
10
|
+
import "./chunk-BTHHUD7Q.mjs";
|
|
10
11
|
import "./chunk-JPLUGGRV.mjs";
|
|
12
|
+
import "./chunk-7LTCDQRS.mjs";
|
|
11
13
|
import "./chunk-SAXPH6G5.mjs";
|
|
12
14
|
import "./chunk-CQ6OSQ3K.mjs";
|
|
13
15
|
import "./chunk-L3KT7IXV.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkFO427P6Icjs = require('../chunk-FO427P6I.cjs');
|
|
5
5
|
require('../chunk-SJNMVDDF.cjs');
|
|
6
6
|
require('../chunk-2CQ74SP6.cjs');
|
|
7
7
|
require('../chunk-XJXBIP67.cjs');
|
|
@@ -14,7 +14,7 @@ require('../chunk-LYLEZIG3.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkS6VYG6XUcjs = require('../chunk-S6VYG6XU.cjs');
|
|
18
18
|
require('../chunk-IWZKTWHZ.cjs');
|
|
19
19
|
require('../chunk-WMAPPDMM.cjs');
|
|
20
20
|
require('../chunk-TKJZFIML.cjs');
|
|
@@ -24,13 +24,13 @@ require('../chunk-SOR334EB.cjs');
|
|
|
24
24
|
require('../chunk-YWN746US.cjs');
|
|
25
25
|
require('../chunk-LSKZMJMP.cjs');
|
|
26
26
|
require('../chunk-SVRTJOUF.cjs');
|
|
27
|
-
require('../chunk-
|
|
28
|
-
require('../chunk-
|
|
27
|
+
require('../chunk-KIIMAWOJ.cjs');
|
|
28
|
+
require('../chunk-SHLXACIO.cjs');
|
|
29
29
|
require('../chunk-HLJ6MBUZ.cjs');
|
|
30
30
|
require('../chunk-5QIKR7RR.cjs');
|
|
31
31
|
require('../chunk-QNPEUFHQ.cjs');
|
|
32
|
-
require('../chunk-KNBBQHO2.cjs');
|
|
33
32
|
require('../chunk-E3UK5IIB.cjs');
|
|
33
|
+
require('../chunk-KNBBQHO2.cjs');
|
|
34
34
|
require('../chunk-ARJWXNQL.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
@@ -58,4 +58,4 @@ require('../chunk-S3JO3N4H.cjs');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.APIRouteConflictError =
|
|
61
|
+
exports.APIRouteConflictError = _chunkFO427P6Icjs.APIRouteConflictError; exports.APIRouteManager = _chunkFO427P6Icjs.APIRouteManager; exports.API_ROUTE_METHODS = _chunkS6VYG6XUcjs.API_ROUTE_METHODS; exports.getAllowedAPIRouteMethods = _chunkS6VYG6XUcjs.getAllowedAPIRouteMethods; exports.invokeAPIRouteEndpoint = _chunkS6VYG6XUcjs.invokeAPIRouteEndpoint; exports.isWebResponse = _chunkS6VYG6XUcjs.isWebResponse; exports.matchAPIRoute = _chunkG7HXGLECcjs.matchAPIRoute; exports.normalizeRouteResponse = _chunkS6VYG6XUcjs.normalizeRouteResponse; exports.resolveAPIRouteEndpoint = _chunkS6VYG6XUcjs.resolveAPIRouteEndpoint;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as PluginAPIDispatch } from '../runtime-CAEv36S_.mjs';
|
|
2
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-CAEv36S_.mjs';
|
|
3
|
+
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-C3mK9Pol.mjs';
|
|
2
4
|
import { ViteDevServer } from 'vite';
|
|
3
5
|
import '../types-CnH8DOqo.mjs';
|
|
4
6
|
import { F as FarmI18nRuntime } from '../runtime-CV2UCV-5.mjs';
|
|
5
|
-
export { API_ROUTE_METHODS, getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './runtime.mjs';
|
|
6
7
|
import { A as APIRouteMatch } from '../route-pattern-W-SsJGSp.mjs';
|
|
7
8
|
export { b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from '../route-pattern-W-SsJGSp.mjs';
|
|
8
|
-
import '../lifecycle-DK06VuKP.mjs';
|
|
9
|
-
import '../integration-api-0y4FXJpC.mjs';
|
|
10
9
|
import '../endpoint-CCHFqyTE.mjs';
|
|
11
10
|
import '../cache.mjs';
|
|
12
11
|
import '../cache-invalidation-BD0z_lfu.mjs';
|
|
12
|
+
import '../integration-api-0y4FXJpC.mjs';
|
|
13
|
+
import '../lifecycle-DK06VuKP.mjs';
|
|
13
14
|
import '../renderer.mjs';
|
|
14
15
|
import '../deployment.mjs';
|
|
15
16
|
import 'http';
|
|
@@ -53,6 +54,8 @@ interface APIRouteManagerOptions {
|
|
|
53
54
|
bodySizeLimit?: number;
|
|
54
55
|
/** Same-origin path where canonical `/api` routes are served. */
|
|
55
56
|
basePath?: string;
|
|
57
|
+
/** Runs a plugin's call to an app endpoint through the app's request pipeline. */
|
|
58
|
+
dispatch?: PluginAPIDispatch;
|
|
56
59
|
}
|
|
57
60
|
interface APIRouteHandlerOptions {
|
|
58
61
|
/** Let a framework request boundary report the original endpoint error. */
|
|
@@ -73,7 +76,10 @@ declare class APIRouteManager {
|
|
|
73
76
|
private i18n?;
|
|
74
77
|
private bodySizeLimit?;
|
|
75
78
|
private basePath?;
|
|
79
|
+
private dispatch?;
|
|
76
80
|
constructor(appDir: string | readonly string[], viteServer?: ViteDevServer, options?: APIRouteManagerOptions);
|
|
81
|
+
/** Every file the current handlers were loaded from: route files and root routes files. */
|
|
82
|
+
getSourceFiles(): Set<string>;
|
|
77
83
|
/**
|
|
78
84
|
* Discover route.ts files in /app/api and explicit endpoints in root routes.ts
|
|
79
85
|
*/
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as PluginAPIDispatch } from '../runtime-CQVsT330.js';
|
|
2
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-CQVsT330.js';
|
|
3
|
+
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-r1mOtSC1.js';
|
|
2
4
|
import { ViteDevServer } from 'vite';
|
|
3
5
|
import '../types-CnH8DOqo.js';
|
|
4
6
|
import { F as FarmI18nRuntime } from '../runtime-BgDQzBiu.js';
|
|
5
|
-
export { API_ROUTE_METHODS, getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './runtime.js';
|
|
6
7
|
import { A as APIRouteMatch } from '../route-pattern-W-SsJGSp.js';
|
|
7
8
|
export { b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from '../route-pattern-W-SsJGSp.js';
|
|
8
|
-
import '../lifecycle-DK06VuKP.js';
|
|
9
|
-
import '../integration-api-BPJo5oXb.js';
|
|
10
9
|
import '../endpoint-CA-TNX60.js';
|
|
11
10
|
import '../cache.js';
|
|
12
11
|
import '../cache-invalidation-BD0z_lfu.js';
|
|
12
|
+
import '../integration-api-BPJo5oXb.js';
|
|
13
|
+
import '../lifecycle-DK06VuKP.js';
|
|
13
14
|
import '../renderer.js';
|
|
14
15
|
import '../deployment.js';
|
|
15
16
|
import 'http';
|
|
@@ -53,6 +54,8 @@ interface APIRouteManagerOptions {
|
|
|
53
54
|
bodySizeLimit?: number;
|
|
54
55
|
/** Same-origin path where canonical `/api` routes are served. */
|
|
55
56
|
basePath?: string;
|
|
57
|
+
/** Runs a plugin's call to an app endpoint through the app's request pipeline. */
|
|
58
|
+
dispatch?: PluginAPIDispatch;
|
|
56
59
|
}
|
|
57
60
|
interface APIRouteHandlerOptions {
|
|
58
61
|
/** Let a framework request boundary report the original endpoint error. */
|
|
@@ -73,7 +76,10 @@ declare class APIRouteManager {
|
|
|
73
76
|
private i18n?;
|
|
74
77
|
private bodySizeLimit?;
|
|
75
78
|
private basePath?;
|
|
79
|
+
private dispatch?;
|
|
76
80
|
constructor(appDir: string | readonly string[], viteServer?: ViteDevServer, options?: APIRouteManagerOptions);
|
|
81
|
+
/** Every file the current handlers were loaded from: route files and root routes files. */
|
|
82
|
+
getSourceFiles(): Set<string>;
|
|
77
83
|
/**
|
|
78
84
|
* Discover route.ts files in /app/api and explicit endpoints in root routes.ts
|
|
79
85
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APIRouteConflictError,
|
|
3
3
|
APIRouteManager
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-T4OGRVNS.mjs";
|
|
5
5
|
import "../chunk-UDNPLXW7.mjs";
|
|
6
6
|
import "../chunk-CU625VAY.mjs";
|
|
7
7
|
import "../chunk-NPC7VWJE.mjs";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
isWebResponse,
|
|
15
15
|
normalizeRouteResponse,
|
|
16
16
|
resolveAPIRouteEndpoint
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-O6I6VWKK.mjs";
|
|
18
18
|
import "../chunk-3UEVPCGW.mjs";
|
|
19
19
|
import "../chunk-W3B4PKAW.mjs";
|
|
20
20
|
import "../chunk-5WI2S4CO.mjs";
|
|
@@ -24,13 +24,13 @@ import "../chunk-2J7W2WND.mjs";
|
|
|
24
24
|
import "../chunk-MSSFIQGM.mjs";
|
|
25
25
|
import "../chunk-FZ6YYU2W.mjs";
|
|
26
26
|
import "../chunk-FP2INE7H.mjs";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-ZMMBIVQM.mjs";
|
|
28
|
+
import "../chunk-KMTGADN3.mjs";
|
|
29
29
|
import "../chunk-BCMSYSN2.mjs";
|
|
30
30
|
import "../chunk-KI3MESHB.mjs";
|
|
31
31
|
import "../chunk-QVKYGNVM.mjs";
|
|
32
|
-
import "../chunk-BTHHUD7Q.mjs";
|
|
33
32
|
import "../chunk-FUZEBRP3.mjs";
|
|
33
|
+
import "../chunk-BTHHUD7Q.mjs";
|
|
34
34
|
import "../chunk-EMLAPBEM.mjs";
|
|
35
35
|
import {
|
|
36
36
|
matchAPIRoute
|
package/dist/api/runtime.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkS6VYG6XUcjs = require('../chunk-S6VYG6XU.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkIWZKTWHZcjs = require('../chunk-IWZKTWHZ.cjs');
|
|
@@ -27,9 +27,9 @@ var _chunk75RZHGLScjs = require('../chunk-75RZHGLS.cjs');
|
|
|
27
27
|
require('../chunk-YWN746US.cjs');
|
|
28
28
|
require('../chunk-LSKZMJMP.cjs');
|
|
29
29
|
require('../chunk-SVRTJOUF.cjs');
|
|
30
|
-
require('../chunk-
|
|
31
|
-
require('../chunk-KNBBQHO2.cjs');
|
|
30
|
+
require('../chunk-KIIMAWOJ.cjs');
|
|
32
31
|
require('../chunk-E3UK5IIB.cjs');
|
|
32
|
+
require('../chunk-KNBBQHO2.cjs');
|
|
33
33
|
require('../chunk-ARJWXNQL.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
@@ -61,4 +61,4 @@ require('../chunk-S3JO3N4H.cjs');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
exports.API_ROUTE_METHODS =
|
|
64
|
+
exports.API_ROUTE_METHODS = _chunkS6VYG6XUcjs.API_ROUTE_METHODS; exports._findFarmMCPEndpointTool = _chunk75RZHGLScjs._findFarmMCPEndpointTool; exports._publishFarmMCPCatalog = _chunk75RZHGLScjs._publishFarmMCPCatalog; exports.createEndpointFailureResponse = _chunkS6VYG6XUcjs.createEndpointFailureResponse; exports.createStaticAPIRouteMatcherAtBasePath = _chunkS6VYG6XUcjs.createStaticAPIRouteMatcherAtBasePath; exports.getAllowedAPIRouteMethods = _chunkS6VYG6XUcjs.getAllowedAPIRouteMethods; exports.invokeAPIRouteEndpoint = _chunkS6VYG6XUcjs.invokeAPIRouteEndpoint; exports.isEndpointFailure = _chunkIWZKTWHZcjs.isEndpointFailure; exports.isFarmAPIPathname = _chunkS6VYG6XUcjs.isFarmAPIPathname; exports.isWebResponse = _chunkS6VYG6XUcjs.isWebResponse; exports.matchAPIRoute = _chunkG7HXGLECcjs.matchAPIRoute; exports.matchAPIRouteAtBasePath = _chunkS6VYG6XUcjs.matchAPIRouteAtBasePath; exports.mergePluginAPIRoutes = _chunkS6VYG6XUcjs.mergePluginAPIRoutes; exports.normalizeRouteResponse = _chunkS6VYG6XUcjs.normalizeRouteResponse; exports.parseRouteSchema = _chunkS6VYG6XUcjs.parseRouteSchema; exports.registerAPIRouteShape = _chunkWMAPPDMMcjs.registerAPIRouteShape; exports.registerFarmMCPServer = _chunk75RZHGLScjs.registerFarmMCPServer; exports.resolveAPIRouteEndpoint = _chunkS6VYG6XUcjs.resolveAPIRouteEndpoint;
|
package/dist/api/runtime.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { e as EndpointFailure } from '../endpoint-CCHFqyTE.mjs';
|
|
2
1
|
export { i as isEndpointFailure, p as parseRouteSchema } from '../endpoint-CCHFqyTE.mjs';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
export { aH as FarmMCPCatalogDetails, aI as FarmMCPServerRegistration, aE as _findFarmMCPEndpointTool, aF as _publishFarmMCPCatalog, aG as registerFarmMCPServer } from '../client-plugins-CvIslxWi.mjs';
|
|
2
|
+
export { f as APIRouteShapeSource, A as API_ROUTE_METHODS, d as createEndpointFailureResponse, c as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, b as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, h as mergePluginAPIRoutes, n as normalizeRouteResponse, e as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-CAEv36S_.mjs';
|
|
3
|
+
export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from '../route-pattern-W-SsJGSp.mjs';
|
|
4
|
+
export { aJ as FarmMCPCatalogDetails, aE as FarmMCPServerRegistration, aG as _findFarmMCPEndpointTool, aH as _publishFarmMCPCatalog, aI as registerFarmMCPServer } from '../client-plugins-C3mK9Pol.mjs';
|
|
7
5
|
import '../cache.mjs';
|
|
8
6
|
import '../cache-invalidation-BD0z_lfu.mjs';
|
|
7
|
+
import '../integration-api-0y4FXJpC.mjs';
|
|
9
8
|
import '../lifecycle-DK06VuKP.mjs';
|
|
10
9
|
import '../renderer.mjs';
|
|
11
10
|
import '../deployment.mjs';
|
|
@@ -36,60 +35,3 @@ import '../font.mjs';
|
|
|
36
35
|
import '../after.mjs';
|
|
37
36
|
import 'node:http';
|
|
38
37
|
import '../island-CfGru1MO.mjs';
|
|
39
|
-
|
|
40
|
-
interface APIRouteShapeSource<TSource> {
|
|
41
|
-
routePath: string;
|
|
42
|
-
source: TSource;
|
|
43
|
-
filePath: string;
|
|
44
|
-
}
|
|
45
|
-
/** Validate API URL shapes and return the lower-priority route replaced by this source. */
|
|
46
|
-
declare function registerAPIRouteShape<TSource>(shapes: Map<string, APIRouteShapeSource<TSource>>, routePath: string, filePath: string, source: TSource): string | undefined;
|
|
47
|
-
|
|
48
|
-
interface MountedRoute {
|
|
49
|
-
path: string;
|
|
50
|
-
methods: string[];
|
|
51
|
-
endpoints: Record<string, any>;
|
|
52
|
-
filePath?: string;
|
|
53
|
-
pluginMethods?: string[];
|
|
54
|
-
}
|
|
55
|
-
/** The same registration step is used by dev discovery and the production bundle. */
|
|
56
|
-
declare function mergePluginAPIRoutes(existing: readonly MountedRoute[], plugins: readonly {
|
|
57
|
-
name: string;
|
|
58
|
-
routes?: PluginRoutesFactory;
|
|
59
|
-
}[], expected?: readonly {
|
|
60
|
-
path: string;
|
|
61
|
-
methods: readonly string[];
|
|
62
|
-
}[], options?: {
|
|
63
|
-
bodySizeLimit?: number;
|
|
64
|
-
}): Array<MountedRoute & {
|
|
65
|
-
filePath: string;
|
|
66
|
-
}>;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Every method an API route module can export. Route discovery in core and in
|
|
70
|
-
* the plain-Vite plugin reads this list, so a handler exported under any of
|
|
71
|
-
* these names is served wherever the route is.
|
|
72
|
-
*/
|
|
73
|
-
declare const API_ROUTE_METHODS: readonly ["GET", "HEAD", "QUERY", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
|
|
74
|
-
interface APIRouteMethodTable {
|
|
75
|
-
methods: string[];
|
|
76
|
-
endpoints: Record<string, any>;
|
|
77
|
-
}
|
|
78
|
-
declare function resolveAPIRouteEndpoint(route: APIRouteMethodTable, method: string): any | undefined;
|
|
79
|
-
declare function getAllowedAPIRouteMethods(route: APIRouteMethodTable): string[];
|
|
80
|
-
/** Match canonical routes through a configurable same-origin public API path. */
|
|
81
|
-
declare function matchAPIRouteAtBasePath<T extends {
|
|
82
|
-
path: string;
|
|
83
|
-
}>(routes: Map<string, T>, pathname: string, serverBasePath?: string): APIRouteMatch<T> | null;
|
|
84
|
-
/** @internal Prepare the fixed API table owned by a generated production bundle. */
|
|
85
|
-
declare function createStaticAPIRouteMatcherAtBasePath<T extends {
|
|
86
|
-
path: string;
|
|
87
|
-
}>(routes: readonly T[], serverBasePath?: string): (pathname: string) => APIRouteMatch<T> | null;
|
|
88
|
-
/** Test whether a pathname belongs to the configured local API surface. */
|
|
89
|
-
declare function isFarmAPIPathname(pathname: string, serverBasePath?: string): boolean;
|
|
90
|
-
declare function invokeAPIRouteEndpoint(endpoint: any, request: Request, params?: APIRouteParams, bodySizeLimit?: number): Promise<Response>;
|
|
91
|
-
declare function normalizeRouteResponse(result: unknown): Response;
|
|
92
|
-
declare function isWebResponse(value: unknown): value is Response;
|
|
93
|
-
declare function createEndpointFailureResponse(failure: EndpointFailure<string, unknown>): Response;
|
|
94
|
-
|
|
95
|
-
export { APIRouteMatch, APIRouteParams, type APIRouteShapeSource, API_ROUTE_METHODS, createEndpointFailureResponse, createStaticAPIRouteMatcherAtBasePath, getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isFarmAPIPathname, isWebResponse, matchAPIRouteAtBasePath, mergePluginAPIRoutes, normalizeRouteResponse, registerAPIRouteShape, resolveAPIRouteEndpoint };
|
package/dist/api/runtime.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { e as EndpointFailure } from '../endpoint-CA-TNX60.js';
|
|
2
1
|
export { i as isEndpointFailure, p as parseRouteSchema } from '../endpoint-CA-TNX60.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
export { aH as FarmMCPCatalogDetails, aI as FarmMCPServerRegistration, aE as _findFarmMCPEndpointTool, aF as _publishFarmMCPCatalog, aG as registerFarmMCPServer } from '../client-plugins-HIyulDym.js';
|
|
2
|
+
export { f as APIRouteShapeSource, A as API_ROUTE_METHODS, d as createEndpointFailureResponse, c as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, b as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, h as mergePluginAPIRoutes, n as normalizeRouteResponse, e as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-CQVsT330.js';
|
|
3
|
+
export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from '../route-pattern-W-SsJGSp.js';
|
|
4
|
+
export { aJ as FarmMCPCatalogDetails, aE as FarmMCPServerRegistration, aG as _findFarmMCPEndpointTool, aH as _publishFarmMCPCatalog, aI as registerFarmMCPServer } from '../client-plugins-r1mOtSC1.js';
|
|
7
5
|
import '../cache.js';
|
|
8
6
|
import '../cache-invalidation-BD0z_lfu.js';
|
|
7
|
+
import '../integration-api-BPJo5oXb.js';
|
|
9
8
|
import '../lifecycle-DK06VuKP.js';
|
|
10
9
|
import '../renderer.js';
|
|
11
10
|
import '../deployment.js';
|
|
@@ -36,60 +35,3 @@ import '../font.js';
|
|
|
36
35
|
import '../after.js';
|
|
37
36
|
import 'node:http';
|
|
38
37
|
import '../island-CfGru1MO.js';
|
|
39
|
-
|
|
40
|
-
interface APIRouteShapeSource<TSource> {
|
|
41
|
-
routePath: string;
|
|
42
|
-
source: TSource;
|
|
43
|
-
filePath: string;
|
|
44
|
-
}
|
|
45
|
-
/** Validate API URL shapes and return the lower-priority route replaced by this source. */
|
|
46
|
-
declare function registerAPIRouteShape<TSource>(shapes: Map<string, APIRouteShapeSource<TSource>>, routePath: string, filePath: string, source: TSource): string | undefined;
|
|
47
|
-
|
|
48
|
-
interface MountedRoute {
|
|
49
|
-
path: string;
|
|
50
|
-
methods: string[];
|
|
51
|
-
endpoints: Record<string, any>;
|
|
52
|
-
filePath?: string;
|
|
53
|
-
pluginMethods?: string[];
|
|
54
|
-
}
|
|
55
|
-
/** The same registration step is used by dev discovery and the production bundle. */
|
|
56
|
-
declare function mergePluginAPIRoutes(existing: readonly MountedRoute[], plugins: readonly {
|
|
57
|
-
name: string;
|
|
58
|
-
routes?: PluginRoutesFactory;
|
|
59
|
-
}[], expected?: readonly {
|
|
60
|
-
path: string;
|
|
61
|
-
methods: readonly string[];
|
|
62
|
-
}[], options?: {
|
|
63
|
-
bodySizeLimit?: number;
|
|
64
|
-
}): Array<MountedRoute & {
|
|
65
|
-
filePath: string;
|
|
66
|
-
}>;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Every method an API route module can export. Route discovery in core and in
|
|
70
|
-
* the plain-Vite plugin reads this list, so a handler exported under any of
|
|
71
|
-
* these names is served wherever the route is.
|
|
72
|
-
*/
|
|
73
|
-
declare const API_ROUTE_METHODS: readonly ["GET", "HEAD", "QUERY", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
|
|
74
|
-
interface APIRouteMethodTable {
|
|
75
|
-
methods: string[];
|
|
76
|
-
endpoints: Record<string, any>;
|
|
77
|
-
}
|
|
78
|
-
declare function resolveAPIRouteEndpoint(route: APIRouteMethodTable, method: string): any | undefined;
|
|
79
|
-
declare function getAllowedAPIRouteMethods(route: APIRouteMethodTable): string[];
|
|
80
|
-
/** Match canonical routes through a configurable same-origin public API path. */
|
|
81
|
-
declare function matchAPIRouteAtBasePath<T extends {
|
|
82
|
-
path: string;
|
|
83
|
-
}>(routes: Map<string, T>, pathname: string, serverBasePath?: string): APIRouteMatch<T> | null;
|
|
84
|
-
/** @internal Prepare the fixed API table owned by a generated production bundle. */
|
|
85
|
-
declare function createStaticAPIRouteMatcherAtBasePath<T extends {
|
|
86
|
-
path: string;
|
|
87
|
-
}>(routes: readonly T[], serverBasePath?: string): (pathname: string) => APIRouteMatch<T> | null;
|
|
88
|
-
/** Test whether a pathname belongs to the configured local API surface. */
|
|
89
|
-
declare function isFarmAPIPathname(pathname: string, serverBasePath?: string): boolean;
|
|
90
|
-
declare function invokeAPIRouteEndpoint(endpoint: any, request: Request, params?: APIRouteParams, bodySizeLimit?: number): Promise<Response>;
|
|
91
|
-
declare function normalizeRouteResponse(result: unknown): Response;
|
|
92
|
-
declare function isWebResponse(value: unknown): value is Response;
|
|
93
|
-
declare function createEndpointFailureResponse(failure: EndpointFailure<string, unknown>): Response;
|
|
94
|
-
|
|
95
|
-
export { APIRouteMatch, APIRouteParams, type APIRouteShapeSource, API_ROUTE_METHODS, createEndpointFailureResponse, createStaticAPIRouteMatcherAtBasePath, getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isFarmAPIPathname, isWebResponse, matchAPIRouteAtBasePath, mergePluginAPIRoutes, normalizeRouteResponse, registerAPIRouteShape, resolveAPIRouteEndpoint };
|
package/dist/api/runtime.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
normalizeRouteResponse,
|
|
12
12
|
parseRouteSchema,
|
|
13
13
|
resolveAPIRouteEndpoint
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-O6I6VWKK.mjs";
|
|
15
15
|
import {
|
|
16
16
|
isEndpointFailure
|
|
17
17
|
} from "../chunk-3UEVPCGW.mjs";
|
|
@@ -27,9 +27,9 @@ import {
|
|
|
27
27
|
import "../chunk-MSSFIQGM.mjs";
|
|
28
28
|
import "../chunk-FZ6YYU2W.mjs";
|
|
29
29
|
import "../chunk-FP2INE7H.mjs";
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-BTHHUD7Q.mjs";
|
|
30
|
+
import "../chunk-ZMMBIVQM.mjs";
|
|
32
31
|
import "../chunk-FUZEBRP3.mjs";
|
|
32
|
+
import "../chunk-BTHHUD7Q.mjs";
|
|
33
33
|
import "../chunk-EMLAPBEM.mjs";
|
|
34
34
|
import {
|
|
35
35
|
matchAPIRoute
|