frontmcp 1.0.4 → 1.1.0
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/package.json +10 -4
- package/src/commands/build/adapters/cloudflare.d.ts +1 -1
- package/src/commands/build/adapters/cloudflare.js +1 -0
- package/src/commands/build/adapters/cloudflare.js.map +1 -1
- package/src/commands/build/adapters/distributed.d.ts +15 -0
- package/src/commands/build/adapters/distributed.js +30 -0
- package/src/commands/build/adapters/distributed.js.map +1 -0
- package/src/commands/build/adapters/index.d.ts +3 -2
- package/src/commands/build/adapters/index.js +4 -1
- package/src/commands/build/adapters/index.js.map +1 -1
- package/src/commands/build/adapters/lambda.d.ts +1 -1
- package/src/commands/build/adapters/lambda.js +1 -0
- package/src/commands/build/adapters/lambda.js.map +1 -1
- package/src/commands/build/adapters/vercel.d.ts +1 -1
- package/src/commands/build/adapters/vercel.js +1 -0
- package/src/commands/build/adapters/vercel.js.map +1 -1
- package/src/commands/build/exec/cli-runtime/generate-cli-entry.js +122 -34
- package/src/commands/build/exec/cli-runtime/generate-cli-entry.js.map +1 -1
- package/src/commands/build/exec/config.d.ts +2 -2
- package/src/commands/build/exec/config.js.map +1 -1
- package/src/commands/build/exec/esbuild-bundler.d.ts +1 -1
- package/src/commands/build/exec/esbuild-bundler.js +1 -1
- package/src/commands/build/exec/esbuild-bundler.js.map +1 -1
- package/src/commands/build/exec/index.d.ts +1 -1
- package/src/commands/build/exec/index.js +5 -38
- package/src/commands/build/exec/index.js.map +1 -1
- package/src/commands/build/exec/skill-assets.d.ts +27 -0
- package/src/commands/build/exec/skill-assets.js +60 -0
- package/src/commands/build/exec/skill-assets.js.map +1 -0
- package/src/commands/build/index.d.ts +1 -1
- package/src/commands/build/index.js +44 -5
- package/src/commands/build/index.js.map +1 -1
- package/src/commands/build/mcpb/binary.d.ts +37 -0
- package/src/commands/build/mcpb/binary.js +72 -0
- package/src/commands/build/mcpb/binary.js.map +1 -0
- package/src/commands/build/mcpb/constants.d.ts +21 -0
- package/src/commands/build/mcpb/constants.js +31 -0
- package/src/commands/build/mcpb/constants.js.map +1 -0
- package/src/commands/build/mcpb/index.d.ts +20 -0
- package/src/commands/build/mcpb/index.js +241 -0
- package/src/commands/build/mcpb/index.js.map +1 -0
- package/src/commands/build/mcpb/manifest.d.ts +183 -0
- package/src/commands/build/mcpb/manifest.js +252 -0
- package/src/commands/build/mcpb/manifest.js.map +1 -0
- package/src/commands/build/mcpb/stage.d.ts +50 -0
- package/src/commands/build/mcpb/stage.js +94 -0
- package/src/commands/build/mcpb/stage.js.map +1 -0
- package/src/commands/build/mcpb/user-config.d.ts +26 -0
- package/src/commands/build/mcpb/user-config.js +147 -0
- package/src/commands/build/mcpb/user-config.js.map +1 -0
- package/src/commands/build/mcpb/validate.d.ts +27 -0
- package/src/commands/build/mcpb/validate.js +218 -0
- package/src/commands/build/mcpb/validate.js.map +1 -0
- package/src/commands/build/mcpb/zip.d.ts +37 -0
- package/src/commands/build/mcpb/zip.js +85 -0
- package/src/commands/build/mcpb/zip.js.map +1 -0
- package/src/commands/build/register.d.ts +1 -1
- package/src/commands/build/register.js +7 -1
- package/src/commands/build/register.js.map +1 -1
- package/src/commands/build/sdk/index.d.ts +1 -1
- package/src/commands/build/sdk/index.js +1 -1
- package/src/commands/build/sdk/index.js.map +1 -1
- package/src/commands/build/types.d.ts +1 -1
- package/src/commands/build/types.js.map +1 -1
- package/src/commands/mcpb/register.d.ts +2 -0
- package/src/commands/mcpb/register.js +14 -0
- package/src/commands/mcpb/register.js.map +1 -0
- package/src/commands/mcpb/validate.d.ts +1 -0
- package/src/commands/mcpb/validate.js +28 -0
- package/src/commands/mcpb/validate.js.map +1 -0
- package/src/commands/scaffold/create.js +5 -7
- package/src/commands/scaffold/create.js.map +1 -1
- package/src/config/define-config.d.ts +26 -0
- package/src/config/define-config.js +31 -0
- package/src/config/define-config.js.map +1 -0
- package/src/config/frontmcp-config.loader.d.ts +32 -0
- package/src/config/frontmcp-config.loader.js +113 -0
- package/src/config/frontmcp-config.loader.js.map +1 -0
- package/src/config/frontmcp-config.schema.d.ts +1062 -0
- package/src/config/frontmcp-config.schema.js +313 -0
- package/src/config/frontmcp-config.schema.js.map +1 -0
- package/src/config/frontmcp-config.types.d.ts +287 -0
- package/src/config/frontmcp-config.types.js +14 -0
- package/src/config/frontmcp-config.types.js.map +1 -0
- package/src/config/index.d.ts +5 -0
- package/src/config/index.js +13 -0
- package/src/config/index.js.map +1 -0
- package/src/core/args.d.ts +7 -2
- package/src/core/args.js +12 -2
- package/src/core/args.js.map +1 -1
- package/src/core/bridge.d.ts +1 -1
- package/src/core/bridge.js +10 -0
- package/src/core/bridge.js.map +1 -1
- package/src/core/cli.js +3 -1
- package/src/core/cli.js.map +1 -1
- package/src/core/program.js +15 -13
- package/src/core/program.js.map +1 -1
- package/src/index.d.ts +2 -0
- package/src/index.js +7 -0
- package/src/index.js.map +1 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FrontMCP Config — Zod Validation Schema
|
|
4
|
+
*
|
|
5
|
+
* Validates and normalizes `frontmcp.config` files.
|
|
6
|
+
* The schema is also the source of truth for JSON Schema generation.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.frontmcpConfigSchema = exports.deploymentTargetSchema = exports.mcpbDeploymentSchema = exports.mcpbRepositorySchema = exports.mcpbCompatibilitySchema = exports.mcpbUserConfigEntrySchema = exports.mcpbAuthorSchema = exports.sdkDeploymentSchema = exports.browserDeploymentSchema = exports.cloudflareDeploymentSchema = exports.lambdaDeploymentSchema = exports.vercelDeploymentSchema = exports.cliDeploymentSchema = exports.distributedDeploymentSchema = exports.nodeDeploymentSchema = exports.wranglerConfigSchema = exports.cliTargetConfigSchema = exports.haConfigSchema = exports.buildOptionsSchema = exports.esbuildOptionsSchema = exports.serverDefaultsSchema = exports.httpConfigSchema = exports.securityHeadersSchema = exports.cookiesConfigSchema = exports.cspConfigSchema = exports.corsConfigSchema = void 0;
|
|
10
|
+
// Lazy-by-default `z`. Same API as `zod`'s `z`, but compound schemas
|
|
11
|
+
// (`z.object`, `z.union`, `z.discriminatedUnion`, `z.intersection`,
|
|
12
|
+
// `z.record`, `z.tuple`) defer construction until first `.parse()`.
|
|
13
|
+
// This schema is parsed at CLI startup — using lazy-z keeps module load
|
|
14
|
+
// from materializing every nested config-shape eagerly.
|
|
15
|
+
//
|
|
16
|
+
// Imported directly from `@frontmcp/lazy-zod` (not the `@frontmcp/sdk`
|
|
17
|
+
// barrel) to keep this leaf module lightweight — pulling the full SDK
|
|
18
|
+
// barrel into Jest's transform chain trips on `jose`'s ESM-only build.
|
|
19
|
+
const lazy_zod_1 = require("@frontmcp/lazy-zod");
|
|
20
|
+
// ============================================
|
|
21
|
+
// Server Defaults
|
|
22
|
+
// ============================================
|
|
23
|
+
exports.corsConfigSchema = lazy_zod_1.z
|
|
24
|
+
.object({
|
|
25
|
+
origins: lazy_zod_1.z.array(lazy_zod_1.z.string()).optional(),
|
|
26
|
+
credentials: lazy_zod_1.z.boolean().optional(),
|
|
27
|
+
maxAge: lazy_zod_1.z.number().int().positive().optional(),
|
|
28
|
+
})
|
|
29
|
+
.strict();
|
|
30
|
+
exports.cspConfigSchema = lazy_zod_1.z
|
|
31
|
+
.object({
|
|
32
|
+
enabled: lazy_zod_1.z.boolean().optional(),
|
|
33
|
+
directives: lazy_zod_1.z.record(lazy_zod_1.z.string(), lazy_zod_1.z.union([lazy_zod_1.z.string(), lazy_zod_1.z.array(lazy_zod_1.z.string())])).optional(),
|
|
34
|
+
reportUri: lazy_zod_1.z.string().optional(),
|
|
35
|
+
reportOnly: lazy_zod_1.z.boolean().optional(),
|
|
36
|
+
})
|
|
37
|
+
.strict();
|
|
38
|
+
exports.cookiesConfigSchema = lazy_zod_1.z
|
|
39
|
+
.object({
|
|
40
|
+
affinity: lazy_zod_1.z.string().optional(),
|
|
41
|
+
domain: lazy_zod_1.z.string().optional(),
|
|
42
|
+
sameSite: lazy_zod_1.z.enum(['Strict', 'Lax', 'None']).optional(),
|
|
43
|
+
})
|
|
44
|
+
.strict();
|
|
45
|
+
exports.securityHeadersSchema = lazy_zod_1.z
|
|
46
|
+
.object({
|
|
47
|
+
hsts: lazy_zod_1.z.union([lazy_zod_1.z.string(), lazy_zod_1.z.literal(false)]).optional(),
|
|
48
|
+
contentTypeOptions: lazy_zod_1.z.union([lazy_zod_1.z.string(), lazy_zod_1.z.literal(false)]).optional(),
|
|
49
|
+
frameOptions: lazy_zod_1.z.union([lazy_zod_1.z.string(), lazy_zod_1.z.literal(false)]).optional(),
|
|
50
|
+
custom: lazy_zod_1.z.record(lazy_zod_1.z.string(), lazy_zod_1.z.string()).optional(),
|
|
51
|
+
})
|
|
52
|
+
.strict();
|
|
53
|
+
exports.httpConfigSchema = lazy_zod_1.z
|
|
54
|
+
.object({
|
|
55
|
+
port: lazy_zod_1.z.number().int().min(0).max(65535).optional(),
|
|
56
|
+
socketPath: lazy_zod_1.z.string().optional(),
|
|
57
|
+
entryPath: lazy_zod_1.z.string().optional(),
|
|
58
|
+
cors: exports.corsConfigSchema.optional(),
|
|
59
|
+
})
|
|
60
|
+
.strict();
|
|
61
|
+
exports.serverDefaultsSchema = lazy_zod_1.z
|
|
62
|
+
.object({
|
|
63
|
+
http: exports.httpConfigSchema.optional(),
|
|
64
|
+
csp: exports.cspConfigSchema.optional(),
|
|
65
|
+
cookies: exports.cookiesConfigSchema.optional(),
|
|
66
|
+
headers: exports.securityHeadersSchema.optional(),
|
|
67
|
+
})
|
|
68
|
+
.strict();
|
|
69
|
+
// ============================================
|
|
70
|
+
// Build Options
|
|
71
|
+
// ============================================
|
|
72
|
+
exports.esbuildOptionsSchema = lazy_zod_1.z
|
|
73
|
+
.object({
|
|
74
|
+
external: lazy_zod_1.z.array(lazy_zod_1.z.string()).optional(),
|
|
75
|
+
define: lazy_zod_1.z.record(lazy_zod_1.z.string(), lazy_zod_1.z.string()).optional(),
|
|
76
|
+
target: lazy_zod_1.z.string().optional(),
|
|
77
|
+
minify: lazy_zod_1.z.boolean().optional(),
|
|
78
|
+
})
|
|
79
|
+
.strict();
|
|
80
|
+
exports.buildOptionsSchema = lazy_zod_1.z
|
|
81
|
+
.object({
|
|
82
|
+
esbuild: exports.esbuildOptionsSchema.optional(),
|
|
83
|
+
dependencies: lazy_zod_1.z
|
|
84
|
+
.object({
|
|
85
|
+
system: lazy_zod_1.z.array(lazy_zod_1.z.string()).optional(),
|
|
86
|
+
nativeAddons: lazy_zod_1.z.array(lazy_zod_1.z.string()).optional(),
|
|
87
|
+
})
|
|
88
|
+
.strict()
|
|
89
|
+
.optional(),
|
|
90
|
+
storage: lazy_zod_1.z
|
|
91
|
+
.object({
|
|
92
|
+
type: lazy_zod_1.z.enum(['sqlite', 'redis', 'none']),
|
|
93
|
+
required: lazy_zod_1.z.boolean().optional(),
|
|
94
|
+
})
|
|
95
|
+
.strict()
|
|
96
|
+
.optional(),
|
|
97
|
+
network: lazy_zod_1.z
|
|
98
|
+
.object({
|
|
99
|
+
defaultPort: lazy_zod_1.z.number().int().optional(),
|
|
100
|
+
supportsSocket: lazy_zod_1.z.boolean().optional(),
|
|
101
|
+
})
|
|
102
|
+
.strict()
|
|
103
|
+
.optional(),
|
|
104
|
+
})
|
|
105
|
+
.strict();
|
|
106
|
+
// ============================================
|
|
107
|
+
// Deployment Targets
|
|
108
|
+
// ============================================
|
|
109
|
+
exports.haConfigSchema = lazy_zod_1.z
|
|
110
|
+
.object({
|
|
111
|
+
heartbeatIntervalMs: lazy_zod_1.z.number().int().positive().optional(),
|
|
112
|
+
heartbeatTtlMs: lazy_zod_1.z.number().int().positive().optional(),
|
|
113
|
+
takeoverGracePeriodMs: lazy_zod_1.z.number().int().positive().optional(),
|
|
114
|
+
redisKeyPrefix: lazy_zod_1.z.string().optional(),
|
|
115
|
+
})
|
|
116
|
+
.strict();
|
|
117
|
+
exports.cliTargetConfigSchema = lazy_zod_1.z
|
|
118
|
+
.object({
|
|
119
|
+
description: lazy_zod_1.z.string().optional(),
|
|
120
|
+
outputDefault: lazy_zod_1.z.enum(['text', 'json']).optional(),
|
|
121
|
+
authRequired: lazy_zod_1.z.boolean().optional(),
|
|
122
|
+
excludeTools: lazy_zod_1.z.array(lazy_zod_1.z.string()).optional(),
|
|
123
|
+
oauth: lazy_zod_1.z
|
|
124
|
+
.object({
|
|
125
|
+
serverUrl: lazy_zod_1.z.string().optional(),
|
|
126
|
+
clientId: lazy_zod_1.z.string().optional(),
|
|
127
|
+
defaultScope: lazy_zod_1.z.string().optional(),
|
|
128
|
+
portRange: lazy_zod_1.z.tuple([lazy_zod_1.z.number(), lazy_zod_1.z.number()]).optional(),
|
|
129
|
+
})
|
|
130
|
+
.strict()
|
|
131
|
+
.optional(),
|
|
132
|
+
})
|
|
133
|
+
.strict();
|
|
134
|
+
exports.wranglerConfigSchema = lazy_zod_1.z
|
|
135
|
+
.object({
|
|
136
|
+
name: lazy_zod_1.z.string().optional(),
|
|
137
|
+
compatibilityDate: lazy_zod_1.z.string().optional(),
|
|
138
|
+
})
|
|
139
|
+
.strict();
|
|
140
|
+
const deploymentBaseSchema = lazy_zod_1.z.object({
|
|
141
|
+
outDir: lazy_zod_1.z.string().optional(),
|
|
142
|
+
env: lazy_zod_1.z.record(lazy_zod_1.z.string(), lazy_zod_1.z.string()).optional(),
|
|
143
|
+
});
|
|
144
|
+
exports.nodeDeploymentSchema = deploymentBaseSchema
|
|
145
|
+
.extend({
|
|
146
|
+
target: lazy_zod_1.z.literal('node'),
|
|
147
|
+
server: exports.serverDefaultsSchema.optional(),
|
|
148
|
+
})
|
|
149
|
+
.strict();
|
|
150
|
+
exports.distributedDeploymentSchema = deploymentBaseSchema
|
|
151
|
+
.extend({
|
|
152
|
+
target: lazy_zod_1.z.literal('distributed'),
|
|
153
|
+
server: exports.serverDefaultsSchema.optional(),
|
|
154
|
+
ha: exports.haConfigSchema.optional(),
|
|
155
|
+
})
|
|
156
|
+
.strict();
|
|
157
|
+
exports.cliDeploymentSchema = deploymentBaseSchema
|
|
158
|
+
.extend({
|
|
159
|
+
target: lazy_zod_1.z.literal('cli'),
|
|
160
|
+
js: lazy_zod_1.z.boolean().optional(),
|
|
161
|
+
cli: exports.cliTargetConfigSchema.optional(),
|
|
162
|
+
sea: lazy_zod_1.z.object({ enabled: lazy_zod_1.z.boolean().optional() }).strict().optional(),
|
|
163
|
+
})
|
|
164
|
+
.strict();
|
|
165
|
+
exports.vercelDeploymentSchema = deploymentBaseSchema
|
|
166
|
+
.extend({
|
|
167
|
+
target: lazy_zod_1.z.literal('vercel'),
|
|
168
|
+
server: exports.serverDefaultsSchema.optional(),
|
|
169
|
+
})
|
|
170
|
+
.strict();
|
|
171
|
+
exports.lambdaDeploymentSchema = deploymentBaseSchema
|
|
172
|
+
.extend({
|
|
173
|
+
target: lazy_zod_1.z.literal('lambda'),
|
|
174
|
+
server: exports.serverDefaultsSchema.optional(),
|
|
175
|
+
})
|
|
176
|
+
.strict();
|
|
177
|
+
exports.cloudflareDeploymentSchema = deploymentBaseSchema
|
|
178
|
+
.extend({
|
|
179
|
+
target: lazy_zod_1.z.literal('cloudflare'),
|
|
180
|
+
server: exports.serverDefaultsSchema.optional(),
|
|
181
|
+
wrangler: exports.wranglerConfigSchema.optional(),
|
|
182
|
+
})
|
|
183
|
+
.strict();
|
|
184
|
+
exports.browserDeploymentSchema = deploymentBaseSchema
|
|
185
|
+
.extend({
|
|
186
|
+
target: lazy_zod_1.z.literal('browser'),
|
|
187
|
+
})
|
|
188
|
+
.strict();
|
|
189
|
+
exports.sdkDeploymentSchema = deploymentBaseSchema
|
|
190
|
+
.extend({
|
|
191
|
+
target: lazy_zod_1.z.literal('sdk'),
|
|
192
|
+
})
|
|
193
|
+
.strict();
|
|
194
|
+
// ============================================
|
|
195
|
+
// MCPB (MCP Bundles) target — produces a .mcpb ZIP archive
|
|
196
|
+
// per https://github.com/modelcontextprotocol/mcpb (manifest_version 0.3)
|
|
197
|
+
// ============================================
|
|
198
|
+
exports.mcpbAuthorSchema = lazy_zod_1.z
|
|
199
|
+
.object({
|
|
200
|
+
name: lazy_zod_1.z.string(),
|
|
201
|
+
email: lazy_zod_1.z.string().email().optional(),
|
|
202
|
+
url: lazy_zod_1.z.string().url().optional(),
|
|
203
|
+
})
|
|
204
|
+
.strict();
|
|
205
|
+
exports.mcpbUserConfigEntrySchema = lazy_zod_1.z
|
|
206
|
+
.object({
|
|
207
|
+
type: lazy_zod_1.z.enum(['string', 'number', 'boolean', 'directory', 'file']),
|
|
208
|
+
title: lazy_zod_1.z.string(),
|
|
209
|
+
description: lazy_zod_1.z.string().optional(),
|
|
210
|
+
required: lazy_zod_1.z.boolean().optional(),
|
|
211
|
+
default: lazy_zod_1.z.union([lazy_zod_1.z.string(), lazy_zod_1.z.number(), lazy_zod_1.z.boolean()]).optional(),
|
|
212
|
+
multiple: lazy_zod_1.z.boolean().optional(),
|
|
213
|
+
sensitive: lazy_zod_1.z.boolean().optional(),
|
|
214
|
+
min: lazy_zod_1.z.number().optional(),
|
|
215
|
+
max: lazy_zod_1.z.number().optional(),
|
|
216
|
+
})
|
|
217
|
+
.strict();
|
|
218
|
+
exports.mcpbCompatibilitySchema = lazy_zod_1.z
|
|
219
|
+
.object({
|
|
220
|
+
claude_desktop: lazy_zod_1.z.string().optional(),
|
|
221
|
+
platforms: lazy_zod_1.z.array(lazy_zod_1.z.enum(['darwin', 'win32', 'linux'])).optional(),
|
|
222
|
+
runtimes: lazy_zod_1.z
|
|
223
|
+
.object({
|
|
224
|
+
node: lazy_zod_1.z.string().optional(),
|
|
225
|
+
python: lazy_zod_1.z.string().optional(),
|
|
226
|
+
})
|
|
227
|
+
.strict()
|
|
228
|
+
.optional(),
|
|
229
|
+
})
|
|
230
|
+
.strict();
|
|
231
|
+
exports.mcpbRepositorySchema = lazy_zod_1.z.union([
|
|
232
|
+
lazy_zod_1.z.string(),
|
|
233
|
+
lazy_zod_1.z
|
|
234
|
+
.object({
|
|
235
|
+
type: lazy_zod_1.z.string(),
|
|
236
|
+
url: lazy_zod_1.z.string(),
|
|
237
|
+
})
|
|
238
|
+
.strict(),
|
|
239
|
+
]);
|
|
240
|
+
exports.mcpbDeploymentSchema = deploymentBaseSchema
|
|
241
|
+
.extend({
|
|
242
|
+
target: lazy_zod_1.z.literal('mcpb'),
|
|
243
|
+
/** Human-friendly display name shown in installer dialog. */
|
|
244
|
+
displayName: lazy_zod_1.z.string().optional(),
|
|
245
|
+
/** Long markdown description shown in extension details. */
|
|
246
|
+
longDescription: lazy_zod_1.z.string().optional(),
|
|
247
|
+
/** Author object (name/email/url). Overrides parsed package.json.author. */
|
|
248
|
+
author: exports.mcpbAuthorSchema.optional(),
|
|
249
|
+
/** SPDX license identifier. Overrides package.json.license. */
|
|
250
|
+
license: lazy_zod_1.z.string().optional(),
|
|
251
|
+
/** Project homepage URL. */
|
|
252
|
+
homepage: lazy_zod_1.z.string().url().optional(),
|
|
253
|
+
/** Source repository (string URL or {type, url}). */
|
|
254
|
+
repository: exports.mcpbRepositorySchema.optional(),
|
|
255
|
+
/** Documentation URL. */
|
|
256
|
+
documentation: lazy_zod_1.z.string().url().optional(),
|
|
257
|
+
/** Support URL (issues/contact). */
|
|
258
|
+
support: lazy_zod_1.z.string().optional(),
|
|
259
|
+
/** Path to icon (PNG) relative to project root. */
|
|
260
|
+
icon: lazy_zod_1.z.string().optional(),
|
|
261
|
+
/** Keywords for search. */
|
|
262
|
+
keywords: lazy_zod_1.z.array(lazy_zod_1.z.string()).optional(),
|
|
263
|
+
/** Privacy policy URLs for external services this bundle talks to. */
|
|
264
|
+
privacyPolicies: lazy_zod_1.z.array(lazy_zod_1.z.string()).optional(),
|
|
265
|
+
/** Runtime/platform/client compatibility constraints. */
|
|
266
|
+
compatibility: exports.mcpbCompatibilitySchema.optional(),
|
|
267
|
+
/** User-configurable inputs (injected as env vars at runtime). */
|
|
268
|
+
userConfig: lazy_zod_1.z.record(lazy_zod_1.z.string(), exports.mcpbUserConfigEntrySchema).optional(),
|
|
269
|
+
/** Single-executable-application binary integration. */
|
|
270
|
+
sea: lazy_zod_1.z
|
|
271
|
+
.object({
|
|
272
|
+
/** Build SEA binary for host platform and include via platform_overrides. */
|
|
273
|
+
enabled: lazy_zod_1.z.boolean().optional(),
|
|
274
|
+
/** Directory of pre-built SEA binaries to merge (e.g., CI artifacts). */
|
|
275
|
+
mergeFrom: lazy_zod_1.z.string().optional(),
|
|
276
|
+
})
|
|
277
|
+
.strict()
|
|
278
|
+
.optional(),
|
|
279
|
+
/** Include node_modules/ in archive (opt-in, defaults off). */
|
|
280
|
+
includeNodeModules: lazy_zod_1.z.boolean().optional(),
|
|
281
|
+
/** Produce byte-identical archives across builds. @default true */
|
|
282
|
+
deterministic: lazy_zod_1.z.boolean().optional(),
|
|
283
|
+
})
|
|
284
|
+
.strict();
|
|
285
|
+
exports.deploymentTargetSchema = lazy_zod_1.z.discriminatedUnion('target', [
|
|
286
|
+
exports.nodeDeploymentSchema,
|
|
287
|
+
exports.distributedDeploymentSchema,
|
|
288
|
+
exports.cliDeploymentSchema,
|
|
289
|
+
exports.vercelDeploymentSchema,
|
|
290
|
+
exports.lambdaDeploymentSchema,
|
|
291
|
+
exports.cloudflareDeploymentSchema,
|
|
292
|
+
exports.browserDeploymentSchema,
|
|
293
|
+
exports.sdkDeploymentSchema,
|
|
294
|
+
exports.mcpbDeploymentSchema,
|
|
295
|
+
]);
|
|
296
|
+
// ============================================
|
|
297
|
+
// Top-Level Config
|
|
298
|
+
// ============================================
|
|
299
|
+
exports.frontmcpConfigSchema = lazy_zod_1.z
|
|
300
|
+
.object({
|
|
301
|
+
$schema: lazy_zod_1.z.string().optional(),
|
|
302
|
+
name: lazy_zod_1.z
|
|
303
|
+
.string()
|
|
304
|
+
.min(1)
|
|
305
|
+
.regex(/^[a-zA-Z0-9._-]+$/, 'Must be alphanumeric with .-_ only'),
|
|
306
|
+
version: lazy_zod_1.z.string().optional(),
|
|
307
|
+
entry: lazy_zod_1.z.string().optional(),
|
|
308
|
+
nodeVersion: lazy_zod_1.z.string().optional(),
|
|
309
|
+
deployments: lazy_zod_1.z.array(exports.deploymentTargetSchema).min(1, 'At least one deployment target required'),
|
|
310
|
+
build: exports.buildOptionsSchema.optional(),
|
|
311
|
+
})
|
|
312
|
+
.strict();
|
|
313
|
+
//# sourceMappingURL=frontmcp-config.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmcp-config.schema.js","sourceRoot":"","sources":["../../../src/config/frontmcp-config.schema.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qEAAqE;AACrE,oEAAoE;AACpE,oEAAoE;AACpE,wEAAwE;AACxE,wDAAwD;AACxD,EAAE;AACF,uEAAuE;AACvE,sEAAsE;AACtE,uEAAuE;AACvE,iDAAuC;AAEvC,+CAA+C;AAC/C,kBAAkB;AAClB,+CAA+C;AAElC,QAAA,gBAAgB,GAAG,YAAC;KAC9B,MAAM,CAAC;IACN,OAAO,EAAE,YAAC,CAAC,KAAK,CAAC,YAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,WAAW,EAAE,YAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,YAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC/C,CAAC;KACD,MAAM,EAAE,CAAC;AAEC,QAAA,eAAe,GAAG,YAAC;KAC7B,MAAM,CAAC;IACN,OAAO,EAAE,YAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,YAAC,CAAC,MAAM,CAAC,YAAC,CAAC,MAAM,EAAE,EAAE,YAAC,CAAC,KAAK,CAAC,CAAC,YAAC,CAAC,MAAM,EAAE,EAAE,YAAC,CAAC,KAAK,CAAC,YAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CA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,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACjC,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;IACb,+DAA+D;IAC/D,kBAAkB,EAAE,YAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC1C,mEAAmE;IACnE,aAAa,EAAE,YAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEC,QAAA,sBAAsB,GAAG,YAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACnE,4BAAoB;IACpB,mCAA2B;IAC3B,2BAAmB;IACnB,8BAAsB;IACtB,8BAAsB;IACtB,kCAA0B;IAC1B,+BAAuB;IACvB,2BAAmB;IACnB,4BAAoB;CACrB,CAAC,CAAC;AAEH,+CAA+C;AAC/C,mBAAmB;AACnB,+CAA+C;AAElC,QAAA,oBAAoB,GAAG,YAAC;KAClC,MAAM,CAAC;IACN,OAAO,EAAE,YAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,IAAI,EAAE,YAAC;SACJ,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,KAAK,CAAC,mBAAmB,EAAE,oCAAoC,CAAC;IACnE,OAAO,EAAE,YAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,KAAK,EAAE,YAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,WAAW,EAAE,YAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,YAAC,CAAC,KAAK,CAAC,8BAAsB,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,yCAAyC,CAAC;IAC9F,KAAK,EAAE,0BAAkB,CAAC,QAAQ,EAAE;CACrC,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["/**\n * FrontMCP Config — Zod Validation Schema\n *\n * Validates and normalizes `frontmcp.config` files.\n * The schema is also the source of truth for JSON Schema generation.\n */\n\n// Lazy-by-default `z`. Same API as `zod`'s `z`, but compound schemas\n// (`z.object`, `z.union`, `z.discriminatedUnion`, `z.intersection`,\n// `z.record`, `z.tuple`) defer construction until first `.parse()`.\n// This schema is parsed at CLI startup — using lazy-z keeps module load\n// from materializing every nested config-shape eagerly.\n//\n// Imported directly from `@frontmcp/lazy-zod` (not the `@frontmcp/sdk`\n// barrel) to keep this leaf module lightweight — pulling the full SDK\n// barrel into Jest's transform chain trips on `jose`'s ESM-only build.\nimport { z } from '@frontmcp/lazy-zod';\n\n// ============================================\n// Server Defaults\n// ============================================\n\nexport const corsConfigSchema = z\n .object({\n origins: z.array(z.string()).optional(),\n credentials: z.boolean().optional(),\n maxAge: z.number().int().positive().optional(),\n })\n .strict();\n\nexport const cspConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n directives: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional(),\n reportUri: z.string().optional(),\n reportOnly: z.boolean().optional(),\n })\n .strict();\n\nexport const cookiesConfigSchema = z\n .object({\n affinity: z.string().optional(),\n domain: z.string().optional(),\n sameSite: z.enum(['Strict', 'Lax', 'None']).optional(),\n })\n .strict();\n\nexport const securityHeadersSchema = z\n .object({\n hsts: z.union([z.string(), z.literal(false)]).optional(),\n contentTypeOptions: z.union([z.string(), z.literal(false)]).optional(),\n frameOptions: z.union([z.string(), z.literal(false)]).optional(),\n custom: z.record(z.string(), z.string()).optional(),\n })\n .strict();\n\nexport const httpConfigSchema = z\n .object({\n port: z.number().int().min(0).max(65535).optional(),\n socketPath: z.string().optional(),\n entryPath: z.string().optional(),\n cors: corsConfigSchema.optional(),\n })\n .strict();\n\nexport const serverDefaultsSchema = z\n .object({\n http: httpConfigSchema.optional(),\n csp: cspConfigSchema.optional(),\n cookies: cookiesConfigSchema.optional(),\n headers: securityHeadersSchema.optional(),\n })\n .strict();\n\n// ============================================\n// Build Options\n// ============================================\n\nexport const esbuildOptionsSchema = z\n .object({\n external: z.array(z.string()).optional(),\n define: z.record(z.string(), z.string()).optional(),\n target: z.string().optional(),\n minify: z.boolean().optional(),\n })\n .strict();\n\nexport const buildOptionsSchema = z\n .object({\n esbuild: esbuildOptionsSchema.optional(),\n dependencies: z\n .object({\n system: z.array(z.string()).optional(),\n nativeAddons: z.array(z.string()).optional(),\n })\n .strict()\n .optional(),\n storage: z\n .object({\n type: z.enum(['sqlite', 'redis', 'none']),\n required: z.boolean().optional(),\n })\n .strict()\n .optional(),\n network: z\n .object({\n defaultPort: z.number().int().optional(),\n supportsSocket: z.boolean().optional(),\n })\n .strict()\n .optional(),\n })\n .strict();\n\n// ============================================\n// Deployment Targets\n// ============================================\n\nexport const haConfigSchema = z\n .object({\n heartbeatIntervalMs: z.number().int().positive().optional(),\n heartbeatTtlMs: z.number().int().positive().optional(),\n takeoverGracePeriodMs: z.number().int().positive().optional(),\n redisKeyPrefix: z.string().optional(),\n })\n .strict();\n\nexport const cliTargetConfigSchema = z\n .object({\n description: z.string().optional(),\n outputDefault: z.enum(['text', 'json']).optional(),\n authRequired: z.boolean().optional(),\n excludeTools: z.array(z.string()).optional(),\n oauth: z\n .object({\n serverUrl: z.string().optional(),\n clientId: z.string().optional(),\n defaultScope: z.string().optional(),\n portRange: z.tuple([z.number(), z.number()]).optional(),\n })\n .strict()\n .optional(),\n })\n .strict();\n\nexport const wranglerConfigSchema = z\n .object({\n name: z.string().optional(),\n compatibilityDate: z.string().optional(),\n })\n .strict();\n\nconst deploymentBaseSchema = z.object({\n outDir: z.string().optional(),\n env: z.record(z.string(), z.string()).optional(),\n});\n\nexport const nodeDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('node'),\n server: serverDefaultsSchema.optional(),\n })\n .strict();\n\nexport const distributedDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('distributed'),\n server: serverDefaultsSchema.optional(),\n ha: haConfigSchema.optional(),\n })\n .strict();\n\nexport const cliDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('cli'),\n js: z.boolean().optional(),\n cli: cliTargetConfigSchema.optional(),\n sea: z.object({ enabled: z.boolean().optional() }).strict().optional(),\n })\n .strict();\n\nexport const vercelDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('vercel'),\n server: serverDefaultsSchema.optional(),\n })\n .strict();\n\nexport const lambdaDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('lambda'),\n server: serverDefaultsSchema.optional(),\n })\n .strict();\n\nexport const cloudflareDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('cloudflare'),\n server: serverDefaultsSchema.optional(),\n wrangler: wranglerConfigSchema.optional(),\n })\n .strict();\n\nexport const browserDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('browser'),\n })\n .strict();\n\nexport const sdkDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('sdk'),\n })\n .strict();\n\n// ============================================\n// MCPB (MCP Bundles) target — produces a .mcpb ZIP archive\n// per https://github.com/modelcontextprotocol/mcpb (manifest_version 0.3)\n// ============================================\n\nexport const mcpbAuthorSchema = z\n .object({\n name: z.string(),\n email: z.string().email().optional(),\n url: z.string().url().optional(),\n })\n .strict();\n\nexport const mcpbUserConfigEntrySchema = z\n .object({\n type: z.enum(['string', 'number', 'boolean', 'directory', 'file']),\n title: z.string(),\n description: z.string().optional(),\n required: z.boolean().optional(),\n default: z.union([z.string(), z.number(), z.boolean()]).optional(),\n multiple: z.boolean().optional(),\n sensitive: z.boolean().optional(),\n min: z.number().optional(),\n max: z.number().optional(),\n })\n .strict();\n\nexport const mcpbCompatibilitySchema = z\n .object({\n claude_desktop: z.string().optional(),\n platforms: z.array(z.enum(['darwin', 'win32', 'linux'])).optional(),\n runtimes: z\n .object({\n node: z.string().optional(),\n python: z.string().optional(),\n })\n .strict()\n .optional(),\n })\n .strict();\n\nexport const mcpbRepositorySchema = z.union([\n z.string(),\n z\n .object({\n type: z.string(),\n url: z.string(),\n })\n .strict(),\n]);\n\nexport const mcpbDeploymentSchema = deploymentBaseSchema\n .extend({\n target: z.literal('mcpb'),\n /** Human-friendly display name shown in installer dialog. */\n displayName: z.string().optional(),\n /** Long markdown description shown in extension details. */\n longDescription: z.string().optional(),\n /** Author object (name/email/url). Overrides parsed package.json.author. */\n author: mcpbAuthorSchema.optional(),\n /** SPDX license identifier. Overrides package.json.license. */\n license: z.string().optional(),\n /** Project homepage URL. */\n homepage: z.string().url().optional(),\n /** Source repository (string URL or {type, url}). */\n repository: mcpbRepositorySchema.optional(),\n /** Documentation URL. */\n documentation: z.string().url().optional(),\n /** Support URL (issues/contact). */\n support: z.string().optional(),\n /** Path to icon (PNG) relative to project root. */\n icon: z.string().optional(),\n /** Keywords for search. */\n keywords: z.array(z.string()).optional(),\n /** Privacy policy URLs for external services this bundle talks to. */\n privacyPolicies: z.array(z.string()).optional(),\n /** Runtime/platform/client compatibility constraints. */\n compatibility: mcpbCompatibilitySchema.optional(),\n /** User-configurable inputs (injected as env vars at runtime). */\n userConfig: z.record(z.string(), mcpbUserConfigEntrySchema).optional(),\n /** Single-executable-application binary integration. */\n sea: z\n .object({\n /** Build SEA binary for host platform and include via platform_overrides. */\n enabled: z.boolean().optional(),\n /** Directory of pre-built SEA binaries to merge (e.g., CI artifacts). */\n mergeFrom: z.string().optional(),\n })\n .strict()\n .optional(),\n /** Include node_modules/ in archive (opt-in, defaults off). */\n includeNodeModules: z.boolean().optional(),\n /** Produce byte-identical archives across builds. @default true */\n deterministic: z.boolean().optional(),\n })\n .strict();\n\nexport const deploymentTargetSchema = z.discriminatedUnion('target', [\n nodeDeploymentSchema,\n distributedDeploymentSchema,\n cliDeploymentSchema,\n vercelDeploymentSchema,\n lambdaDeploymentSchema,\n cloudflareDeploymentSchema,\n browserDeploymentSchema,\n sdkDeploymentSchema,\n mcpbDeploymentSchema,\n]);\n\n// ============================================\n// Top-Level Config\n// ============================================\n\nexport const frontmcpConfigSchema = z\n .object({\n $schema: z.string().optional(),\n name: z\n .string()\n .min(1)\n .regex(/^[a-zA-Z0-9._-]+$/, 'Must be alphanumeric with .-_ only'),\n version: z.string().optional(),\n entry: z.string().optional(),\n nodeVersion: z.string().optional(),\n deployments: z.array(deploymentTargetSchema).min(1, 'At least one deployment target required'),\n build: buildOptionsSchema.optional(),\n })\n .strict();\n\nexport type FrontMcpConfigInput = z.input<typeof frontmcpConfigSchema>;\nexport type FrontMcpConfigParsed = z.output<typeof frontmcpConfigSchema>;\n"]}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FrontMCP Configuration Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the unified deployment configuration schema.
|
|
5
|
+
* Used by `frontmcp.config.(json|yml|js|ts)` files.
|
|
6
|
+
*
|
|
7
|
+
* Separation of concerns:
|
|
8
|
+
* - frontmcp.config = deployment (targets, server defaults, cookies, CSP)
|
|
9
|
+
* - @FrontMcp() = runtime (auth, tools, resources, transport)
|
|
10
|
+
* - Environment variables = secrets/overrides (Redis password, API keys)
|
|
11
|
+
*/
|
|
12
|
+
export interface CorsConfig {
|
|
13
|
+
/** Allowed origins. Empty array = permissive. */
|
|
14
|
+
origins?: string[];
|
|
15
|
+
/** Allow credentials (cookies, authorization headers). @default false */
|
|
16
|
+
credentials?: boolean;
|
|
17
|
+
/** Preflight cache max age in seconds. */
|
|
18
|
+
maxAge?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface CspConfig {
|
|
21
|
+
/** Enable CSP headers. @default false */
|
|
22
|
+
enabled?: boolean;
|
|
23
|
+
/** CSP directives (e.g., 'default-src': "'self'"). */
|
|
24
|
+
directives?: Record<string, string | string[]>;
|
|
25
|
+
/** Report URI for CSP violations. */
|
|
26
|
+
reportUri?: string;
|
|
27
|
+
/** Use Content-Security-Policy-Report-Only instead. @default false */
|
|
28
|
+
reportOnly?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface CookiesConfig {
|
|
31
|
+
/** LB affinity cookie name. @default '__frontmcp_node' */
|
|
32
|
+
affinity?: string;
|
|
33
|
+
/** Cookie domain. */
|
|
34
|
+
domain?: string;
|
|
35
|
+
/** SameSite policy. @default 'Strict' */
|
|
36
|
+
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
37
|
+
}
|
|
38
|
+
export interface SecurityHeadersConfig {
|
|
39
|
+
/** Strict-Transport-Security. Set to false to disable. */
|
|
40
|
+
hsts?: string | false;
|
|
41
|
+
/** X-Content-Type-Options. Set to false to disable. @default 'nosniff' */
|
|
42
|
+
contentTypeOptions?: string | false;
|
|
43
|
+
/** X-Frame-Options. Set to false to disable. @default 'DENY' */
|
|
44
|
+
frameOptions?: string | false;
|
|
45
|
+
/** Custom response headers. */
|
|
46
|
+
custom?: Record<string, string>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* HTTP options — aligns with `@FrontMcp({ http })`.
|
|
50
|
+
*
|
|
51
|
+
* Available on targets that serve HTTP:
|
|
52
|
+
* - node, distributed: full (port + cors)
|
|
53
|
+
* - vercel, lambda, cloudflare: no port (platform-managed), but cors applies
|
|
54
|
+
* - browser, sdk, cli: not available
|
|
55
|
+
*/
|
|
56
|
+
export interface HttpConfig {
|
|
57
|
+
/** HTTP port. Only for node/distributed. @default 3000 */
|
|
58
|
+
port?: number;
|
|
59
|
+
/** Unix socket path (alternative to port). Only for node/distributed. */
|
|
60
|
+
socketPath?: string;
|
|
61
|
+
/** MCP entry path ('' or '/mcp'). @default '' */
|
|
62
|
+
entryPath?: string;
|
|
63
|
+
/** CORS configuration. */
|
|
64
|
+
cors?: CorsConfig;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Server-level options for targets that handle HTTP responses.
|
|
68
|
+
* Separated from HttpConfig because these apply even to serverless
|
|
69
|
+
* targets that don't control the port (Cloudflare, Vercel, Lambda).
|
|
70
|
+
*/
|
|
71
|
+
export interface ServerDefaults {
|
|
72
|
+
/** HTTP configuration (port, cors). */
|
|
73
|
+
http?: HttpConfig;
|
|
74
|
+
/** Content Security Policy. */
|
|
75
|
+
csp?: CspConfig;
|
|
76
|
+
/** Cookie configuration. */
|
|
77
|
+
cookies?: CookiesConfig;
|
|
78
|
+
/** Security headers. */
|
|
79
|
+
headers?: SecurityHeadersConfig;
|
|
80
|
+
}
|
|
81
|
+
export interface EsbuildOptions {
|
|
82
|
+
/** Dependencies to exclude from bundle. */
|
|
83
|
+
external?: string[];
|
|
84
|
+
/** Global defines. */
|
|
85
|
+
define?: Record<string, string>;
|
|
86
|
+
/** Build target (e.g., 'node22'). */
|
|
87
|
+
target?: string;
|
|
88
|
+
/** Minify output. */
|
|
89
|
+
minify?: boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface BuildOptions {
|
|
92
|
+
/** esbuild/bundler options. */
|
|
93
|
+
esbuild?: EsbuildOptions;
|
|
94
|
+
/** System/native dependencies for CLI packaging. */
|
|
95
|
+
dependencies?: {
|
|
96
|
+
system?: string[];
|
|
97
|
+
nativeAddons?: string[];
|
|
98
|
+
};
|
|
99
|
+
/** Storage type for CLI setup. */
|
|
100
|
+
storage?: {
|
|
101
|
+
type: 'sqlite' | 'redis' | 'none';
|
|
102
|
+
required?: boolean;
|
|
103
|
+
};
|
|
104
|
+
/** Network defaults. */
|
|
105
|
+
network?: {
|
|
106
|
+
defaultPort?: number;
|
|
107
|
+
supportsSocket?: boolean;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
export interface HaDeploymentConfig {
|
|
111
|
+
/** Heartbeat interval in ms. @default 10000 */
|
|
112
|
+
heartbeatIntervalMs?: number;
|
|
113
|
+
/** Heartbeat TTL in ms (should be 2-3x interval). @default 30000 */
|
|
114
|
+
heartbeatTtlMs?: number;
|
|
115
|
+
/** Grace period before claiming orphaned sessions. @default 5000 */
|
|
116
|
+
takeoverGracePeriodMs?: number;
|
|
117
|
+
/** Redis key prefix for HA keys. @default 'mcp:ha:' */
|
|
118
|
+
redisKeyPrefix?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface CliTargetConfig {
|
|
121
|
+
/** CLI description. */
|
|
122
|
+
description?: string;
|
|
123
|
+
/** Default output format. @default 'text' */
|
|
124
|
+
outputDefault?: 'text' | 'json';
|
|
125
|
+
/** Require authentication for CLI. */
|
|
126
|
+
authRequired?: boolean;
|
|
127
|
+
/** Tools to exclude from CLI. */
|
|
128
|
+
excludeTools?: string[];
|
|
129
|
+
/** OAuth configuration for CLI authentication. */
|
|
130
|
+
oauth?: {
|
|
131
|
+
serverUrl?: string;
|
|
132
|
+
clientId?: string;
|
|
133
|
+
defaultScope?: string;
|
|
134
|
+
portRange?: [number, number];
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export interface WranglerConfig {
|
|
138
|
+
/** Worker name. */
|
|
139
|
+
name?: string;
|
|
140
|
+
/** Compatibility date. */
|
|
141
|
+
compatibilityDate?: string;
|
|
142
|
+
}
|
|
143
|
+
export type DeploymentTargetType = 'node' | 'distributed' | 'cli' | 'vercel' | 'lambda' | 'cloudflare' | 'browser' | 'sdk' | 'mcpb';
|
|
144
|
+
interface DeploymentBase {
|
|
145
|
+
/** Deployment target type. */
|
|
146
|
+
target: DeploymentTargetType;
|
|
147
|
+
/** Output directory override. @default 'dist/{target}' */
|
|
148
|
+
outDir?: string;
|
|
149
|
+
/** Environment variables injected at build time. */
|
|
150
|
+
env?: Record<string, string>;
|
|
151
|
+
}
|
|
152
|
+
export interface NodeDeployment extends DeploymentBase {
|
|
153
|
+
target: 'node';
|
|
154
|
+
/** Server config (http with port, csp, cookies, headers). */
|
|
155
|
+
server?: ServerDefaults;
|
|
156
|
+
}
|
|
157
|
+
export interface DistributedDeployment extends DeploymentBase {
|
|
158
|
+
target: 'distributed';
|
|
159
|
+
/** Server config (http with port, csp, cookies, headers). */
|
|
160
|
+
server?: ServerDefaults;
|
|
161
|
+
/** HA configuration. */
|
|
162
|
+
ha?: HaDeploymentConfig;
|
|
163
|
+
}
|
|
164
|
+
export interface CliDeployment extends DeploymentBase {
|
|
165
|
+
target: 'cli';
|
|
166
|
+
/** Output JS bundle instead of native binary. */
|
|
167
|
+
js?: boolean;
|
|
168
|
+
/** CLI-specific configuration. */
|
|
169
|
+
cli?: CliTargetConfig;
|
|
170
|
+
/** Single Executable Application settings. */
|
|
171
|
+
sea?: {
|
|
172
|
+
enabled?: boolean;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
export interface VercelDeployment extends DeploymentBase {
|
|
176
|
+
target: 'vercel';
|
|
177
|
+
/** Server config (no port — platform-managed, but cors/csp/cookies apply). */
|
|
178
|
+
server?: ServerDefaults;
|
|
179
|
+
}
|
|
180
|
+
export interface LambdaDeployment extends DeploymentBase {
|
|
181
|
+
target: 'lambda';
|
|
182
|
+
/** Server config (no port — platform-managed, but cors/csp/cookies apply). */
|
|
183
|
+
server?: ServerDefaults;
|
|
184
|
+
}
|
|
185
|
+
export interface CloudflareDeployment extends DeploymentBase {
|
|
186
|
+
target: 'cloudflare';
|
|
187
|
+
/** Server config (no port — platform-managed, but cors/csp/cookies apply). */
|
|
188
|
+
server?: ServerDefaults;
|
|
189
|
+
/** Wrangler configuration. */
|
|
190
|
+
wrangler?: WranglerConfig;
|
|
191
|
+
}
|
|
192
|
+
export interface BrowserDeployment extends DeploymentBase {
|
|
193
|
+
target: 'browser';
|
|
194
|
+
}
|
|
195
|
+
export interface SdkDeployment extends DeploymentBase {
|
|
196
|
+
target: 'sdk';
|
|
197
|
+
}
|
|
198
|
+
export interface McpbAuthor {
|
|
199
|
+
name: string;
|
|
200
|
+
email?: string;
|
|
201
|
+
url?: string;
|
|
202
|
+
}
|
|
203
|
+
export type McpbUserConfigType = 'string' | 'number' | 'boolean' | 'directory' | 'file';
|
|
204
|
+
export interface McpbUserConfigEntry {
|
|
205
|
+
type: McpbUserConfigType;
|
|
206
|
+
title: string;
|
|
207
|
+
description?: string;
|
|
208
|
+
required?: boolean;
|
|
209
|
+
default?: string | number | boolean;
|
|
210
|
+
multiple?: boolean;
|
|
211
|
+
sensitive?: boolean;
|
|
212
|
+
min?: number;
|
|
213
|
+
max?: number;
|
|
214
|
+
}
|
|
215
|
+
export interface McpbCompatibility {
|
|
216
|
+
/** Semver range for Claude Desktop (e.g., ">=1.0.0"). */
|
|
217
|
+
claude_desktop?: string;
|
|
218
|
+
/** Supported platforms. */
|
|
219
|
+
platforms?: Array<'darwin' | 'win32' | 'linux'>;
|
|
220
|
+
/** Runtime version constraints. */
|
|
221
|
+
runtimes?: {
|
|
222
|
+
node?: string;
|
|
223
|
+
python?: string;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
export type McpbRepository = string | {
|
|
227
|
+
type: string;
|
|
228
|
+
url: string;
|
|
229
|
+
};
|
|
230
|
+
export interface McpbDeployment extends DeploymentBase {
|
|
231
|
+
target: 'mcpb';
|
|
232
|
+
/** Human-friendly display name. */
|
|
233
|
+
displayName?: string;
|
|
234
|
+
/** Long markdown description. */
|
|
235
|
+
longDescription?: string;
|
|
236
|
+
/** Author object — overrides parsed package.json.author. */
|
|
237
|
+
author?: McpbAuthor;
|
|
238
|
+
/** SPDX license identifier — overrides package.json.license. */
|
|
239
|
+
license?: string;
|
|
240
|
+
/** Project homepage URL. */
|
|
241
|
+
homepage?: string;
|
|
242
|
+
/** Source repository. */
|
|
243
|
+
repository?: McpbRepository;
|
|
244
|
+
/** Documentation URL. */
|
|
245
|
+
documentation?: string;
|
|
246
|
+
/** Support URL (issues/contact). */
|
|
247
|
+
support?: string;
|
|
248
|
+
/** Path to icon (PNG) relative to project root. */
|
|
249
|
+
icon?: string;
|
|
250
|
+
/** Keywords for search. */
|
|
251
|
+
keywords?: string[];
|
|
252
|
+
/** Privacy policy URLs. */
|
|
253
|
+
privacyPolicies?: string[];
|
|
254
|
+
/** Runtime/platform compatibility constraints. */
|
|
255
|
+
compatibility?: McpbCompatibility;
|
|
256
|
+
/** User-configurable inputs (injected as env vars). */
|
|
257
|
+
userConfig?: Record<string, McpbUserConfigEntry>;
|
|
258
|
+
/** Single-executable binary integration. */
|
|
259
|
+
sea?: {
|
|
260
|
+
/** Build SEA binary for host platform. */
|
|
261
|
+
enabled?: boolean;
|
|
262
|
+
/** Directory of pre-built cross-platform SEA binaries to merge. */
|
|
263
|
+
mergeFrom?: string;
|
|
264
|
+
};
|
|
265
|
+
/** Include node_modules/ in archive (opt-in). */
|
|
266
|
+
includeNodeModules?: boolean;
|
|
267
|
+
/** Deterministic archive output. @default true */
|
|
268
|
+
deterministic?: boolean;
|
|
269
|
+
}
|
|
270
|
+
export type DeploymentTarget = NodeDeployment | DistributedDeployment | CliDeployment | VercelDeployment | LambdaDeployment | CloudflareDeployment | BrowserDeployment | SdkDeployment | McpbDeployment;
|
|
271
|
+
export interface FrontMcpConfig {
|
|
272
|
+
/** JSON Schema pointer for IDE autocomplete. */
|
|
273
|
+
$schema?: string;
|
|
274
|
+
/** Server name (alphanumeric, .-_ allowed). */
|
|
275
|
+
name: string;
|
|
276
|
+
/** Server version (semver). @default '1.0.0' */
|
|
277
|
+
version?: string;
|
|
278
|
+
/** Entry point file path. */
|
|
279
|
+
entry?: string;
|
|
280
|
+
/** Node.js version requirement. @default '>=22.0.0' */
|
|
281
|
+
nodeVersion?: string;
|
|
282
|
+
/** Build targets — server config lives inside each target that needs it. */
|
|
283
|
+
deployments: DeploymentTarget[];
|
|
284
|
+
/** Build/bundler options. */
|
|
285
|
+
build?: BuildOptions;
|
|
286
|
+
}
|
|
287
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FrontMCP Configuration Types
|
|
4
|
+
*
|
|
5
|
+
* Defines the unified deployment configuration schema.
|
|
6
|
+
* Used by `frontmcp.config.(json|yml|js|ts)` files.
|
|
7
|
+
*
|
|
8
|
+
* Separation of concerns:
|
|
9
|
+
* - frontmcp.config = deployment (targets, server defaults, cookies, CSP)
|
|
10
|
+
* - @FrontMcp() = runtime (auth, tools, resources, transport)
|
|
11
|
+
* - Environment variables = secrets/overrides (Redis password, API keys)
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
//# sourceMappingURL=frontmcp-config.types.js.map
|