@farm.js/core 0.1.51-beta.2 → 0.1.51-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-handler-WWCC4GLG.mjs → agent-mcp-handler-7JSKGSOW.mjs} +4 -4
- package/dist/{agent-mcp-handler-RT3COCEL.cjs → agent-mcp-handler-YE4AGWHN.cjs} +5 -5
- package/dist/{agent-mcp.d-CR5Ov83o.d.ts → agent-mcp.d-BAR9njbJ.d.ts} +1 -1
- package/dist/{agent-mcp.d-Z5DuwrqW.d.mts → agent-mcp.d-BJKChOrO.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/{analyzer-Z6TNEAET.mjs → analyzer-OTPEWH5W.mjs} +14 -3
- package/dist/{analyzer-T76CN3S7.cjs → analyzer-TSQXZCZN.cjs} +14 -3
- package/dist/api/route-manager.d.mts +4 -4
- package/dist/api/route-manager.d.ts +4 -4
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/{app-manifest.d-DiWr_Jfx.d.ts → app-manifest.d-BLFbaqx8.d.ts} +1 -1
- package/dist/{app-manifest.d-CAHkOBFa.d.mts → app-manifest.d-DEQNnNhV.d.mts} +1 -1
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +3 -3
- package/dist/{app.d-DmapqkbV.d.ts → app.d-CNPaUYaa.d.ts} +4 -4
- package/dist/{app.d-BfgJCsTQ.d.mts → app.d-CT7xDkj2.d.mts} +4 -4
- package/dist/{chunk-YVJV7Q2X.mjs → chunk-3BLEXUGE.mjs} +1 -1
- package/dist/chunk-3HLQTOVU.cjs +6 -0
- package/dist/{chunk-E6LTONL4.mjs → chunk-3SMXQNFD.mjs} +2 -2
- package/dist/{chunk-PMKUU273.mjs → chunk-3TLKUBXG.mjs} +411 -166
- package/dist/{chunk-74Z5KX4A.mjs → chunk-3WSIYBMG.mjs} +41 -19
- package/dist/{chunk-GNJIYJMS.cjs → chunk-3XQ57EFI.cjs} +16 -16
- package/dist/{chunk-GW4YUIHW.mjs → chunk-3Z63X45F.mjs} +1 -1
- package/dist/{chunk-IBSAYAWB.mjs → chunk-4353ZRE5.mjs} +1 -1
- package/dist/{chunk-SBABQKPT.cjs → chunk-46KXZBOG.cjs} +5 -5
- package/dist/{chunk-YU42A5MA.cjs → chunk-4CGOMZP3.cjs} +221 -199
- package/dist/{chunk-J3LBO2O4.cjs → chunk-4SEHMBL4.cjs} +10 -10
- package/dist/{chunk-E73PGHSR.mjs → chunk-4TKAIO2F.mjs} +3 -3
- package/dist/{chunk-NJLTQR5P.cjs → chunk-53SACYBY.cjs} +7 -7
- package/dist/{chunk-FM2UEKS2.mjs → chunk-5FXPJIOT.mjs} +2 -2
- package/dist/{chunk-QXPSWMUD.cjs → chunk-7MD37P5V.cjs} +5 -5
- package/dist/{chunk-JATTVAHA.cjs → chunk-B3GM5I6N.cjs} +4 -4
- package/dist/{chunk-WJFFPXCV.cjs → chunk-D7UQC4O6.cjs} +10 -8
- package/dist/{chunk-KRRZJ77U.mjs → chunk-E5DXF5GE.mjs} +2 -2
- package/dist/chunk-EFZGB7JC.cjs +114 -0
- package/dist/{chunk-NYQSC4DX.cjs → chunk-FFE2EMF7.cjs} +5 -5
- package/dist/{chunk-CTM4SPB3.mjs → chunk-GAO7MS5O.mjs} +4 -3
- package/dist/{chunk-HIFIG6HL.cjs → chunk-H33PJEXN.cjs} +5 -5
- package/dist/{chunk-NXBHYO7S.cjs → chunk-HLWOWZFX.cjs} +2 -2
- package/dist/chunk-JXEPLIXD.cjs +389 -0
- package/dist/{chunk-NPQLMP7M.cjs → chunk-KLNFJDFM.cjs} +10 -9
- package/dist/{chunk-KBRZAYI7.mjs → chunk-LDNSSHEG.mjs} +2 -2
- package/dist/chunk-LLZSYFOM.mjs +6 -0
- package/dist/{chunk-N77JBPLC.mjs → chunk-LPDKG6RA.mjs} +9 -7
- package/dist/chunk-MIGFX2FN.mjs +758 -0
- package/dist/{chunk-72D2NX77.mjs → chunk-MRNDAJEV.mjs} +1 -1
- package/dist/{chunk-4SSRBCBR.mjs → chunk-NOTSHVRN.mjs} +355 -218
- package/dist/{chunk-GUJTVM36.cjs → chunk-OAMUSC7H.cjs} +1 -1
- package/dist/chunk-P6MHI5O2.cjs +758 -0
- package/dist/{chunk-6CYQQQGR.mjs → chunk-R4PHCZ3G.mjs} +1 -1
- package/dist/{chunk-WZW6LEHM.cjs → chunk-TQMI6BYO.cjs} +675 -430
- package/dist/{chunk-76GHW3WI.cjs → chunk-TSFMFPRU.cjs} +4 -4
- package/dist/{chunk-5N7QAGEA.cjs → chunk-TWHXBMLJ.cjs} +37 -7
- package/dist/{chunk-BOVGCUDZ.cjs → chunk-UJL4JOXV.cjs} +2 -2
- package/dist/chunk-UQF3OJVE.mjs +389 -0
- package/dist/{chunk-DTU4PX7V.cjs → chunk-WGUHDWT5.cjs} +557 -420
- package/dist/{chunk-LAZK6UV7.mjs → chunk-YAJTD3ZG.mjs} +1 -1
- package/dist/{chunk-7UPCJDB5.mjs → chunk-YUEYBL35.mjs} +2 -2
- package/dist/{chunk-EIMK7D2D.mjs → chunk-ZD2VKAUI.mjs} +34 -4
- package/dist/chunk-ZNXTU4YH.mjs +114 -0
- package/dist/{client-plugins.d-Bx3FXpqm.d.mts → client-plugins.d-DllmH8eM.d.mts} +17 -4
- package/dist/{client-plugins.d-TiLbS5j4.d.ts → client-plugins.d-n3iWY1EJ.d.ts} +17 -4
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/{config.d-iRPI16ku.d.ts → config.d-DqKaCr1r.d.mts} +8 -1
- package/dist/{config.d-iRPI16ku.d.mts → config.d-DqKaCr1r.d.ts} +8 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/desktop.d.mts +3 -3
- package/dist/desktop.d.ts +3 -3
- package/dist/{devtools-6XWCZIGO.cjs → devtools-TO6TAO32.cjs} +5 -5
- package/dist/{devtools-UQLDAOEI.mjs → devtools-UESYARTF.mjs} +4 -4
- package/dist/docs.cjs +7 -7
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +6 -6
- package/dist/index.cjs +22 -18
- package/dist/{index.d-YxJ2AiDF.d.mts → index.d-BL7KKiwa.d.mts} +1 -1
- package/dist/{index.d-yueUNipJ.d.ts → index.d-BXsAXm1U.d.ts} +1 -1
- package/dist/index.d.mts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.mjs +22 -18
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +20 -18
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +19 -17
- package/dist/internal/cli-runtime.cjs +7 -7
- package/dist/internal/cli-runtime.mjs +6 -6
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +6 -6
- package/dist/internal/config-runtime.d.mts +31 -7
- package/dist/internal/config-runtime.d.ts +31 -7
- package/dist/internal/config-runtime.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +8 -8
- package/dist/internal/infra-analytics-runtime.mjs +6 -6
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +87 -9
- package/dist/internal/production-runtime.d.mts +44 -12
- package/dist/internal/production-runtime.d.ts +44 -12
- package/dist/internal/production-runtime.mjs +86 -8
- package/dist/markdown.cjs +4 -2
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +3 -1
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/mobile.d.mts +21 -5
- package/dist/mobile.d.ts +21 -5
- package/dist/native-tree-EBPDFTRW.mjs +25 -0
- package/dist/native-tree-MMZS7S6W.cjs +25 -0
- package/dist/{navigation-delegate.d-HnDXhlyP.d.mts → navigation-delegate.d-C76gXTmO.d.mts} +1 -1
- package/dist/{navigation-delegate.d-BY1e_Xrh.d.ts → navigation-delegate.d-DIyDslxt.d.ts} +1 -1
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/plugin.cjs +14 -13
- package/dist/plugin.d.mts +5 -4
- package/dist/plugin.d.ts +5 -4
- package/dist/plugin.mjs +13 -12
- package/dist/{production-runtime.d-BpJUDzP8.d.mts → production-runtime.d-CDHztggO.d.mts} +1 -1
- package/dist/{production-runtime.d-lMjvE9cf.d.ts → production-runtime.d-tyaGdbk6.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-BlFp5hv4.d.ts → programmatic-routes-client.d-XfmIrCK1.d.ts} +2 -2
- package/dist/{programmatic-routes-client.d-6CGQ3TCk.d.mts → programmatic-routes-client.d-aAWiDd64.d.mts} +2 -2
- package/dist/{render-plan.d-BH9edqKs.d.mts → render-plan.d-Diwybxo8.d.mts} +1 -1
- package/dist/{render-plan.d-DhP0mTHF.d.ts → render-plan.d-Dr5WRjoV.d.ts} +1 -1
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/{request.d-BVZrsR1v.d.ts → request.d-D01fRn--.d.ts} +1 -1
- package/dist/{request.d-DJFRdKi8.d.mts → request.d-Dd3AFR79.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-Bpmw7PED.d.mts → route-rendering.d-BQ53lJ_D.d.mts} +1 -1
- package/dist/{route-rendering.d-B00JtK_-.d.ts → route-rendering.d-Bhx4QoJt.d.ts} +1 -1
- package/dist/{router.d-e0jQ3jQ-.d.mts → router.d-Bi23a6Xc.d.mts} +1 -1
- package/dist/{router.d-Bd1x9XxQ.d.ts → router.d-DQ3k7EYn.d.ts} +1 -1
- package/dist/{routes.d-Cmv8TgVq.d.mts → routes.d-BgTd7vI4.d.mts} +3 -3
- package/dist/{routes.d-D96Dq9lz.d.ts → routes.d-C7jMJFvP.d.ts} +3 -3
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-ZQ4CTVEG.mjs → rsc-pipeline-K3ER3Q4N.mjs} +5 -5
- package/dist/{rsc-pipeline-DX4OC5FN.cjs → rsc-pipeline-OCZIT5OF.cjs} +6 -6
- package/dist/{runtime-NQ3EDSA7.cjs → runtime-DKNSIH7V.cjs} +30 -23
- package/dist/{runtime-NPDRDV6R.mjs → runtime-MKYDEUZT.mjs} +20 -13
- package/dist/{runtime.d-CgB3IJDq.d.mts → runtime.d-B2Js6qZ2.d.mts} +1 -1
- package/dist/{runtime.d-D-td-RR3.d.ts → runtime.d-BL-CGwoi.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +31 -30
- package/dist/server.d.mts +11 -10
- package/dist/server.d.ts +11 -10
- package/dist/server.mjs +16 -15
- package/dist/{spa-router.d-BWDhS0FK.d.mts → spa-router.d-B2rIFGs0.d.mts} +2 -2
- package/dist/{spa-router.d-CO01mVOM.d.ts → spa-router.d-DqZ6Lfs0.d.ts} +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/{utils.d-B77__yh8.d.ts → utils.d-Bv2MPeLR.d.ts} +1 -1
- package/dist/{utils.d-DRDazhCA.d.mts → utils.d-fqXe8lNc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +14 -13
- package/dist/vite.d.mts +12 -6
- package/dist/vite.d.ts +12 -6
- package/dist/vite.mjs +13 -12
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk46KXZBOGcjs = require('./chunk-46KXZBOG.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkSG57PX7Kcjs = require('./chunk-SG57PX7K.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkD7UQC4O6cjs = require('./chunk-D7UQC4O6.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -23,7 +23,7 @@ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
|
23
23
|
var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkOAMUSC7Hcjs = require('./chunk-OAMUSC7H.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -159,7 +159,7 @@ function createFarmAiCatalogResponse(request, input = {}, requestUrl) {
|
|
|
159
159
|
if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
|
|
160
160
|
return new Response(null, { status: 304, headers });
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
_chunkD7UQC4O6cjs.emitFarmAgentRead.call(void 0, request, card ? "mcp-server-card" : "ai-catalog", 200);
|
|
163
163
|
return new Response(method === "HEAD" ? null : body, { status: 200, headers });
|
|
164
164
|
}
|
|
165
165
|
function corsHeaders() {
|
|
@@ -227,7 +227,7 @@ function createFarmApiCatalogResponse(method, input, request) {
|
|
|
227
227
|
headers: { Allow: "GET, HEAD", "Content-Type": "text/plain; charset=utf-8" }
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
if (request)
|
|
230
|
+
if (request) _chunkD7UQC4O6cjs.emitFarmAgentRead.call(void 0, request, "api-catalog", 200);
|
|
231
231
|
const catalog = createFarmApiCatalog(input);
|
|
232
232
|
return new Response(upperMethod === "HEAD" ? null : JSON.stringify(catalog), {
|
|
233
233
|
status: 200,
|
|
@@ -282,7 +282,7 @@ function createFarmAppManifest(input) {
|
|
|
282
282
|
return {
|
|
283
283
|
schemaVersion: 1,
|
|
284
284
|
app: app ? {
|
|
285
|
-
...app.version ? { farm:
|
|
285
|
+
...app.version ? { farm: _chunkOAMUSC7Hcjs.FARM_VERSION } : {},
|
|
286
286
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
287
287
|
basePath: input.basePath,
|
|
288
288
|
...app.build ? { build: input.build } : {}
|
|
@@ -348,7 +348,7 @@ function listDefaultServer(input) {
|
|
|
348
348
|
authorization: "none",
|
|
349
349
|
resources: [],
|
|
350
350
|
prompts: [],
|
|
351
|
-
tools:
|
|
351
|
+
tools: _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_TOOLS.map((tool) => ({
|
|
352
352
|
name: tool.name,
|
|
353
353
|
title: tool.title,
|
|
354
354
|
description: tool.description,
|
|
@@ -408,7 +408,7 @@ function listFarmBuiltInRoutePaths(input) {
|
|
|
408
408
|
...agent.manifest !== false ? [FARM_APP_MANIFEST_PATH, FARM_APP_MANIFEST_LEGACY_PATH] : [],
|
|
409
409
|
...agent.apiCatalog ? [FARM_API_CATALOG_PATH] : [],
|
|
410
410
|
...agent.aiCatalog !== false ? [FARM_AI_CATALOG_PATH, FARM_ARD_PATH] : [],
|
|
411
|
-
...agent.mcp === true ? [
|
|
411
|
+
...agent.mcp === true ? [_chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PATH, `${_chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PATH}${FARM_MCP_SERVER_CARD_SUFFIX}`] : [],
|
|
412
412
|
..._optionalChain([agent, 'access', _39 => _39.llmsTxt, 'optionalAccess', _40 => _40.enabled]) ? ["/llms.txt"] : [],
|
|
413
413
|
..._optionalChain([agent, 'access', _41 => _41.llmsTxt, 'optionalAccess', _42 => _42.enabled]) && agent.llmsTxt.full ? ["/llms-full.txt"] : [],
|
|
414
414
|
..._optionalChain([agent, 'access', _43 => _43.sitemap, 'optionalAccess', _44 => _44.enabled]) ? ["/sitemap.xml"] : [],
|
|
@@ -447,7 +447,7 @@ function resolveFarmDocsRouteLabel(routePathname, docs) {
|
|
|
447
447
|
for (const entry of entries) {
|
|
448
448
|
const base = entry === "/" ? "" : entry;
|
|
449
449
|
if (page === entry || entry === "/" && page === "/index") {
|
|
450
|
-
return markdown ?
|
|
450
|
+
return markdown ? _chunkD7UQC4O6cjs.getFarmMarkdownMirrorPath.call(void 0, entry) : entry;
|
|
451
451
|
}
|
|
452
452
|
if (page.startsWith(`${base}/`)) return `${base}/[...slug]${markdown ? ".md" : ""}`;
|
|
453
453
|
}
|
|
@@ -467,7 +467,7 @@ function resolveFarmMarkdownRouteLabel(routePathname, matchPagePattern) {
|
|
|
467
467
|
if (!routePathname.toLowerCase().endsWith(".md")) return null;
|
|
468
468
|
const page = routePathname === "/index.md" ? "/" : routePathname.slice(0, -".md".length) || "/";
|
|
469
469
|
const pattern = matchPagePattern(page);
|
|
470
|
-
return pattern ?
|
|
470
|
+
return pattern ? _chunkD7UQC4O6cjs.getFarmMarkdownMirrorPath.call(void 0, pattern) : null;
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FARM_DEFAULT_MCP_PATH,
|
|
3
3
|
FARM_DEFAULT_MCP_TOOLS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E5DXF5GE.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveFarmAppManifestConfig
|
|
7
7
|
} from "./chunk-2WZTGPK6.mjs";
|
|
8
8
|
import {
|
|
9
9
|
emitFarmAgentRead,
|
|
10
10
|
getFarmMarkdownMirrorPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LPDKG6RA.mjs";
|
|
12
12
|
import {
|
|
13
13
|
_listFarmMCPCatalogs,
|
|
14
14
|
_listFarmRegisteredMCPServers
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-LM2YOGDK.mjs";
|
|
24
24
|
import {
|
|
25
25
|
FARM_VERSION
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-R4PHCZ3G.mjs";
|
|
27
27
|
import {
|
|
28
28
|
applyFarmBasePath
|
|
29
29
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk46KXZBOGcjs = require('./chunk-46KXZBOG.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -36,10 +36,10 @@ async function handleFarmDefaultMCPRequest(request, context) {
|
|
|
36
36
|
return transportError(403, "Cross-origin requests are not allowed.");
|
|
37
37
|
}
|
|
38
38
|
const protocolHeader = request.headers.get("mcp-protocol-version");
|
|
39
|
-
if (protocolHeader && !
|
|
39
|
+
if (protocolHeader && !_chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(protocolHeader.trim())) {
|
|
40
40
|
return transportError(
|
|
41
41
|
400,
|
|
42
|
-
`Unsupported MCP-Protocol-Version: ${protocolHeader.slice(0, 32)}. Supported: ${
|
|
42
|
+
`Unsupported MCP-Protocol-Version: ${protocolHeader.slice(0, 32)}. Supported: ${_chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.join(", ")}.`
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
const contentType = _nullishCoalesce(request.headers.get("content-type"), () => ( ""));
|
|
@@ -95,7 +95,7 @@ async function dispatch(method, params, request, context) {
|
|
|
95
95
|
switch (method) {
|
|
96
96
|
case "initialize": {
|
|
97
97
|
const requested = isRecord(params) ? params.protocolVersion : void 0;
|
|
98
|
-
const protocolVersion = typeof requested === "string" &&
|
|
98
|
+
const protocolVersion = typeof requested === "string" && _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(requested) ? requested : _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS[0];
|
|
99
99
|
return {
|
|
100
100
|
protocolVersion,
|
|
101
101
|
capabilities: { tools: { listChanged: false } },
|
|
@@ -103,7 +103,7 @@ async function dispatch(method, params, request, context) {
|
|
|
103
103
|
name: context.server.name,
|
|
104
104
|
version: context.server.version,
|
|
105
105
|
...context.server.title ? { title: context.server.title } : {},
|
|
106
|
-
description:
|
|
106
|
+
description: _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_DESCRIPTION
|
|
107
107
|
},
|
|
108
108
|
instructions: INSTRUCTIONS
|
|
109
109
|
};
|
|
@@ -111,7 +111,7 @@ async function dispatch(method, params, request, context) {
|
|
|
111
111
|
case "ping":
|
|
112
112
|
return {};
|
|
113
113
|
case "tools/list":
|
|
114
|
-
return { tools:
|
|
114
|
+
return { tools: _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_TOOLS };
|
|
115
115
|
case "tools/call":
|
|
116
116
|
return callTool(params, request, context);
|
|
117
117
|
default:
|
|
@@ -122,7 +122,7 @@ async function callTool(params, request, context) {
|
|
|
122
122
|
if (!isRecord(params) || typeof params.name !== "string") {
|
|
123
123
|
throw new FarmMCPRequestError(INVALID_PARAMS, "tools/call needs a tool name.");
|
|
124
124
|
}
|
|
125
|
-
const tool =
|
|
125
|
+
const tool = _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_TOOLS.find(({ name }) => name === params.name);
|
|
126
126
|
if (!tool) {
|
|
127
127
|
throw new FarmMCPRequestError(INVALID_PARAMS, `Unknown tool: ${params.name.slice(0, 64)}`);
|
|
128
128
|
}
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
loadFarmDocsPage,
|
|
6
6
|
resolveFarmDocsContentDir,
|
|
7
7
|
toFarmDocsMarkdownPage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZD2VKAUI.mjs";
|
|
9
9
|
import {
|
|
10
10
|
docsEngine,
|
|
11
11
|
loadFarmDocsEngine
|
|
12
12
|
} from "./chunk-VE3FWJBO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
resolveDocsConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GAO7MS5O.mjs";
|
|
16
16
|
import {
|
|
17
17
|
getFarmDocsAdapterConfigModule,
|
|
18
18
|
isSecretDocsConfigKey
|
|
@@ -1,9 +1,9 @@
|
|
|
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 _chunk4SEHMBL4cjs = require('./chunk-4SEHMBL4.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkD7UQC4O6cjs = require('./chunk-D7UQC4O6.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
@@ -75,7 +75,7 @@ function resolveFarmInfraAnalytics(env = processEnv()) {
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
function classifyFarmInfraAgent(userAgent) {
|
|
78
|
-
return
|
|
78
|
+
return _chunkD7UQC4O6cjs.classifyFarmAgent.call(void 0, userAgent);
|
|
79
79
|
}
|
|
80
80
|
function routeTemplate(pattern) {
|
|
81
81
|
return typeof pattern === "string" && pattern.length <= 256 && /^\/(?!\/)[a-zA-Z0-9_./:[\]()*-]*$/.test(pattern) ? pattern : "/[unmatched]";
|
|
@@ -273,7 +273,7 @@ function requestEvent(metadata, method, status, durationMs) {
|
|
|
273
273
|
id: uuid(),
|
|
274
274
|
requestId: metadata.id,
|
|
275
275
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
276
|
-
route: routeTemplate(
|
|
276
|
+
route: routeTemplate(_chunk4SEHMBL4cjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
277
277
|
agent: metadata.agent,
|
|
278
278
|
kind: "request",
|
|
279
279
|
method,
|
|
@@ -286,7 +286,7 @@ function toolEvent(metadata, event) {
|
|
|
286
286
|
id: uuid(),
|
|
287
287
|
requestId: metadata.id,
|
|
288
288
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
289
|
-
route: routeTemplate(
|
|
289
|
+
route: routeTemplate(_chunk4SEHMBL4cjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
290
290
|
agent: metadata.agent,
|
|
291
291
|
kind: "mcp.tool",
|
|
292
292
|
tool: event.tool,
|
|
@@ -6,7 +6,7 @@ var _chunkUNJZGVPUcjs = require('./chunk-UNJZGVPU.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkD7UQC4O6cjs = require('./chunk-D7UQC4O6.cjs');
|
|
10
10
|
|
|
11
11
|
// src/app-markdown-runtime.ts
|
|
12
12
|
var _url = require('url');
|
|
@@ -160,7 +160,7 @@ async function anonymousVisitorOpensPage(options, url, targetPathname) {
|
|
|
160
160
|
if (!PAGE_CHECK_DROPPED_HEADERS.has(name.toLowerCase())) headers.append(name, value);
|
|
161
161
|
}
|
|
162
162
|
headers.set("accept", "text/html");
|
|
163
|
-
headers.set(
|
|
163
|
+
headers.set(_chunkD7UQC4O6cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER, _chunkD7UQC4O6cjs._getFarmMarkdownPageCheckToken.call(void 0, ));
|
|
164
164
|
const response = await options.renderPage(
|
|
165
165
|
new Request(pageUrl, {
|
|
166
166
|
method: "GET",
|
|
@@ -192,7 +192,7 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
192
192
|
}
|
|
193
193
|
const url = new URL(options.request.url);
|
|
194
194
|
const hasMarkdownExtension = url.pathname.toLowerCase().endsWith(".md");
|
|
195
|
-
if (!hasMarkdownExtension && !
|
|
195
|
+
if (!hasMarkdownExtension && !_chunkD7UQC4O6cjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
|
|
196
196
|
return null;
|
|
197
197
|
}
|
|
198
198
|
const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname);
|
|
@@ -254,7 +254,7 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
254
254
|
if (!hasMarkdownExtension) {
|
|
255
255
|
headers.set("Vary", "Accept");
|
|
256
256
|
}
|
|
257
|
-
return
|
|
257
|
+
return _chunkD7UQC4O6cjs.createFarmMarkdownViewResponse.call(void 0, {
|
|
258
258
|
request: options.request,
|
|
259
259
|
requestUrl: url,
|
|
260
260
|
markdown: source.source,
|
|
@@ -890,14 +890,15 @@ function extractHtmlTitle(html) {
|
|
|
890
890
|
return match ? decodeHtml(stripTags(match[1])).trim() : void 0;
|
|
891
891
|
}
|
|
892
892
|
function readHtmlContentRegion(html) {
|
|
893
|
+
return extractHtmlBody(_readFarmRenderedHtml(html));
|
|
894
|
+
}
|
|
895
|
+
function _readFarmRenderedHtml(html) {
|
|
893
896
|
const streamed = readStreamedBoundaryInstructions(html);
|
|
894
|
-
return
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
).replace(/<!--[\s\S]*?-->/g, "")
|
|
900
|
-
)
|
|
897
|
+
return removeHiddenElements(
|
|
898
|
+
resolveStreamedBoundaries(
|
|
899
|
+
html.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, "").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi, "").replace(/<noscript\b[^>]*>[\s\S]*?<\/noscript>/gi, ""),
|
|
900
|
+
streamed
|
|
901
|
+
).replace(/<!--[\s\S]*?-->/g, "")
|
|
901
902
|
);
|
|
902
903
|
}
|
|
903
904
|
function extractHtmlBody(html) {
|
|
@@ -1354,4 +1355,5 @@ function decodeHtml(input) {
|
|
|
1354
1355
|
|
|
1355
1356
|
|
|
1356
1357
|
|
|
1357
|
-
|
|
1358
|
+
|
|
1359
|
+
exports.classifyFarmAgent = classifyFarmAgent; exports.FARM_INTERNAL_READ_HEADER = FARM_INTERNAL_READ_HEADER; exports.emitFarmAgentRead = emitFarmAgentRead; exports.createFarmMarkdownViewResponse = createFarmMarkdownViewResponse; exports.FARM_MARKDOWN_CONTENT_TYPE = FARM_MARKDOWN_CONTENT_TYPE; exports.FARM_MARKDOWN_PAGE_CHECK_HEADER = FARM_MARKDOWN_PAGE_CHECK_HEADER; exports._getFarmMarkdownPageCheckToken = _getFarmMarkdownPageCheckToken; exports._isFarmMarkdownPageCheck = _isFarmMarkdownPageCheck; exports.farmRequestWantsMarkdown = farmRequestWantsMarkdown; exports.createFarmMarkdownErrorBody = createFarmMarkdownErrorBody; exports.resolveMarkdownConfig = resolveMarkdownConfig; exports.resolveMarkdownMirrorTarget = resolveMarkdownMirrorTarget; exports.createMarkdownMirrorResponse = createMarkdownMirrorResponse; exports.applyMarkdownNegotiationHeaders = applyMarkdownNegotiationHeaders; exports.htmlToMarkdown = htmlToMarkdown; exports.farmAcceptQuality = farmAcceptQuality; exports.requestAcceptsMarkdown = requestAcceptsMarkdown; exports.getFarmMarkdownMirrorPath = getFarmMarkdownMirrorPath; exports.getFarmMarkdownAlternatePath = getFarmMarkdownAlternatePath; exports.isFarmMarkdownMirrorExposed = isFarmMarkdownMirrorExposed; exports.matchesFarmMarkdownRoutePattern = matchesFarmMarkdownRoutePattern; exports._readFarmRenderedHtml = _readFarmRenderedHtml; exports.extractFarmPageActions = extractFarmPageActions;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collectFarmLlmsTxtPages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YAJTD3ZG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getFarmMarkdownMirrorPath,
|
|
6
6
|
isFarmMarkdownMirrorExposed
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LPDKG6RA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
_listFarmMCPCatalogs,
|
|
10
10
|
_listFarmRegisteredMCPServers
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/nitro/mobile-client.ts
|
|
2
|
+
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
3
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
4
|
+
var FARM_MOBILE_CLIENT_ENTRY_NAME = "farm-mobile-client";
|
|
5
|
+
var FARM_MOBILE_CLIENT_MANIFEST_FILE = "mobile-client.json";
|
|
6
|
+
var HASHED_FILE = /-h[0-9a-f]{8,}\.[A-Za-z0-9]+$/;
|
|
7
|
+
function isFarmContentHashedFile(file) {
|
|
8
|
+
return HASHED_FILE.test(file);
|
|
9
|
+
}
|
|
10
|
+
function manifestPath(buildDir) {
|
|
11
|
+
return _path2.default.join(buildDir, FARM_MOBILE_CLIENT_MANIFEST_FILE);
|
|
12
|
+
}
|
|
13
|
+
async function removeFarmMobileClientManifest(buildDir) {
|
|
14
|
+
await _promises2.default.rm(manifestPath(buildDir), { force: true });
|
|
15
|
+
}
|
|
16
|
+
function createFarmMobileClientManifestPlugin(options) {
|
|
17
|
+
return {
|
|
18
|
+
name: "farm-mobile-client-manifest",
|
|
19
|
+
enforce: "post",
|
|
20
|
+
async generateBundle(_output, bundle) {
|
|
21
|
+
const entry = _optionalChain([Object, 'access', _ => _.entries, 'call', _2 => _2(bundle), 'access', _3 => _3.find, 'call', _4 => _4(
|
|
22
|
+
([, output]) => output.type === "chunk" && output.isEntry && output.name === options.entryName
|
|
23
|
+
), 'optionalAccess', _5 => _5[0]]);
|
|
24
|
+
const record = entry ? {
|
|
25
|
+
entry,
|
|
26
|
+
files: Object.keys(bundle).filter((file) => !file.endsWith(".css") && !file.endsWith(".map")).sort()
|
|
27
|
+
} : null;
|
|
28
|
+
await _promises2.default.mkdir(options.buildDir, { recursive: true });
|
|
29
|
+
await _promises2.default.writeFile(manifestPath(options.buildDir), JSON.stringify(record));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
async function hasFarmMobileClientEntry(buildDir, clientOutputDir) {
|
|
34
|
+
let record = null;
|
|
35
|
+
try {
|
|
36
|
+
record = JSON.parse(await _promises2.default.readFile(manifestPath(buildDir), "utf8"));
|
|
37
|
+
} catch (e) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
if (!record) return false;
|
|
41
|
+
return _promises2.default.stat(_path2.default.join(clientOutputDir, record.entry)).then(
|
|
42
|
+
(stat) => stat.isFile() && stat.size > 0,
|
|
43
|
+
() => false
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function stylesheetUrls(css) {
|
|
47
|
+
const urls = [];
|
|
48
|
+
for (const match of css.matchAll(/url\(\s*(["']?)(\/[^"')?#]+)[^"')]*\1\s*\)/g)) {
|
|
49
|
+
urls.push(match[2]);
|
|
50
|
+
}
|
|
51
|
+
return urls;
|
|
52
|
+
}
|
|
53
|
+
async function finalizeFarmMobileClient(options) {
|
|
54
|
+
let record = null;
|
|
55
|
+
try {
|
|
56
|
+
record = JSON.parse(await _promises2.default.readFile(manifestPath(options.buildDir), "utf8"));
|
|
57
|
+
} catch (e2) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
if (!record) return null;
|
|
61
|
+
const mobileFiles = new Set(record.files);
|
|
62
|
+
const files = new Set(record.files.filter(isFarmContentHashedFile).map((file) => `/${file}`));
|
|
63
|
+
const stylesheetFile = options.stylesheet.replace(/^\/+/, "");
|
|
64
|
+
if (isFarmContentHashedFile(stylesheetFile)) {
|
|
65
|
+
files.add(`/${stylesheetFile}`);
|
|
66
|
+
const css = await _promises2.default.readFile(_path2.default.join(options.clientOutputDir, stylesheetFile), "utf8").catch(() => "");
|
|
67
|
+
for (const url of stylesheetUrls(css)) {
|
|
68
|
+
const file = url.replace(/^\/+/, "");
|
|
69
|
+
if (!isFarmContentHashedFile(file)) continue;
|
|
70
|
+
const exists = await _promises2.default.stat(_path2.default.join(options.clientOutputDir, file)).then(
|
|
71
|
+
(stat) => stat.isFile(),
|
|
72
|
+
() => false
|
|
73
|
+
);
|
|
74
|
+
if (exists) files.add(`/${file}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const manifest = {
|
|
78
|
+
version: 1,
|
|
79
|
+
webEntry: options.webEntry,
|
|
80
|
+
entry: `/${record.entry}`,
|
|
81
|
+
stylesheet: options.stylesheet,
|
|
82
|
+
files: [...files].sort()
|
|
83
|
+
};
|
|
84
|
+
await _promises2.default.writeFile(manifestPath(options.buildDir), `${JSON.stringify(manifest, null, 2)}
|
|
85
|
+
`);
|
|
86
|
+
return {
|
|
87
|
+
webEntry: options.webEntry,
|
|
88
|
+
entry: manifest.entry,
|
|
89
|
+
webOnly: options.webFiles.filter((file) => !mobileFiles.has(file)).sort()
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
async function readFarmMobileClientManifest(buildDir) {
|
|
93
|
+
try {
|
|
94
|
+
const manifest = JSON.parse(await _promises2.default.readFile(manifestPath(buildDir), "utf8"));
|
|
95
|
+
return manifest && manifest.version === 1 ? manifest : null;
|
|
96
|
+
} catch (e3) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function encodeFarmMobileShellClient(client) {
|
|
101
|
+
return JSON.stringify(JSON.stringify(client)).slice(1, -1).replace(/'/g, "\\u0027").replace(/`/g, "\\u0060").replace(/\$/g, "\\u0024").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
102
|
+
}
|
|
103
|
+
var FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER = "__farm_mobile_shell_client__";
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
exports.FARM_MOBILE_CLIENT_ENTRY_NAME = FARM_MOBILE_CLIENT_ENTRY_NAME; exports.removeFarmMobileClientManifest = removeFarmMobileClientManifest; exports.createFarmMobileClientManifestPlugin = createFarmMobileClientManifestPlugin; exports.hasFarmMobileClientEntry = hasFarmMobileClientEntry; exports.finalizeFarmMobileClient = finalizeFarmMobileClient; exports.readFarmMobileClientManifest = readFarmMobileClientManifest; exports.encodeFarmMobileShellClient = encodeFarmMobileShellClient; exports.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER = FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER;
|
|
@@ -1,9 +1,9 @@
|
|
|
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 _chunkH33PJEXNcjs = require('./chunk-H33PJEXN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkD7UQC4O6cjs = require('./chunk-D7UQC4O6.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -166,12 +166,12 @@ function createFarmDefaultSitemap(sources, options) {
|
|
|
166
166
|
for (const source of sources) {
|
|
167
167
|
const path = source.pattern;
|
|
168
168
|
if (path.includes("[") || path.includes("(") || entries.has(path)) continue;
|
|
169
|
-
if (include.length && !include.some((pattern) =>
|
|
169
|
+
if (include.length && !include.some((pattern) => _chunkD7UQC4O6cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
170
170
|
continue;
|
|
171
171
|
}
|
|
172
|
-
if (exclude.some((pattern) =>
|
|
172
|
+
if (exclude.some((pattern) => _chunkD7UQC4O6cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
173
173
|
const module = isRecord(source.module) ? source.module : void 0;
|
|
174
|
-
if (
|
|
174
|
+
if (_chunkH33PJEXNcjs.isFarmMetadataNoIndex.call(void 0, _optionalChain([module, 'optionalAccess', _2 => _2.metadata]))) continue;
|
|
175
175
|
if (_optionalChain([module, 'optionalAccess', _3 => _3.__farmRouteGuard])) continue;
|
|
176
176
|
entries.set(path, {
|
|
177
177
|
url: new URL(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, path, options.basePath), base).href,
|
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
resolveFarmAgentSitemap,
|
|
26
26
|
resolveFarmNoindexPreviews,
|
|
27
27
|
resolveFarmPerformanceConfig
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LDNSSHEG.mjs";
|
|
29
29
|
import {
|
|
30
30
|
resolveFarmAppManifestConfig
|
|
31
31
|
} from "./chunk-2WZTGPK6.mjs";
|
|
32
32
|
import {
|
|
33
33
|
resolveFarmLlmsTxtConfig
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YAJTD3ZG.mjs";
|
|
35
35
|
import {
|
|
36
36
|
farmCspBlocksFrameworkInlineScripts,
|
|
37
37
|
getFarmSecurityHeader,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
} from "./chunk-YWPNIYUP.mjs";
|
|
69
69
|
import {
|
|
70
70
|
resolveMarkdownConfig
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-LPDKG6RA.mjs";
|
|
72
72
|
import {
|
|
73
73
|
resolveIntegrationPlugins
|
|
74
74
|
} from "./chunk-Y2G5SJFB.mjs";
|
|
@@ -885,6 +885,7 @@ async function resolveConfig(userConfig, mode) {
|
|
|
885
885
|
},
|
|
886
886
|
agent: resolveFarmAgentConfig(userConfig.agent, { docs: docs.enabled }),
|
|
887
887
|
desktop: desktopSetup?.desktop ?? null,
|
|
888
|
+
...userConfig.mobile !== void 0 ? { mobileClient: true } : {},
|
|
888
889
|
plugins: [
|
|
889
890
|
...mobileSessionPlugin ? [mobileSessionPlugin] : [],
|
|
890
891
|
...resolveIntegrationPlugins(integrations),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkD7UQC4O6cjs = require('./chunk-D7UQC4O6.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -59,12 +59,12 @@ function collectFarmLlmsTxtPages(sources, options) {
|
|
|
59
59
|
for (const source of sources) {
|
|
60
60
|
const path = source.pattern;
|
|
61
61
|
if (path.includes("[") || pages.has(path)) continue;
|
|
62
|
-
if (include.length && !include.some((pattern) =>
|
|
62
|
+
if (include.length && !include.some((pattern) => _chunkD7UQC4O6cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
63
63
|
continue;
|
|
64
64
|
}
|
|
65
|
-
if (exclude.some((pattern) =>
|
|
65
|
+
if (exclude.some((pattern) => _chunkD7UQC4O6cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
66
66
|
if (isFarmMetadataNoIndex(source.metadata)) continue;
|
|
67
|
-
const target =
|
|
67
|
+
const target = _chunkD7UQC4O6cjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? _chunkD7UQC4O6cjs.getFarmMarkdownMirrorPath.call(void 0, path) : path;
|
|
68
68
|
const description = readMetadataString(source.metadata, "description");
|
|
69
69
|
pages.set(path, {
|
|
70
70
|
path,
|
|
@@ -155,7 +155,7 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
|
|
|
155
155
|
try {
|
|
156
156
|
const response = await fetchMarkdown(
|
|
157
157
|
new Request(url, {
|
|
158
|
-
headers: { accept: "text/markdown", [
|
|
158
|
+
headers: { accept: "text/markdown", [_chunkD7UQC4O6cjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
|
|
159
159
|
})
|
|
160
160
|
);
|
|
161
161
|
const type = _nullishCoalesce(response.headers.get("content-type"), () => ( ""));
|
|
@@ -7,7 +7,7 @@ var _chunkSJ23LJ3Ncjs = require('./chunk-SJ23LJ3N.cjs');
|
|
|
7
7
|
var _chunkXPMC4E2Gcjs = require('./chunk-XPMC4E2G.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkKLNFJDFMcjs = require('./chunk-KLNFJDFM.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -111,7 +111,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
111
111
|
server: { environmentName: "rsc" },
|
|
112
112
|
config: {
|
|
113
113
|
preset: options.preset,
|
|
114
|
-
outputDir: options.outputDir &&
|
|
114
|
+
outputDir: options.outputDir && _chunkKLNFJDFMcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
|
|
115
115
|
}
|
|
116
116
|
})
|
|
117
117
|
]
|