frontmcp 1.4.1 → 1.5.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 +5 -5
- package/src/commands/build/adapters/cloudflare.d.ts +10 -1
- package/src/commands/build/adapters/cloudflare.js +57 -62
- package/src/commands/build/adapters/cloudflare.js.map +1 -1
- package/src/commands/build/index.js +8 -0
- package/src/commands/build/index.js.map +1 -1
- package/src/commands/scaffold/create.js +18 -5
- package/src/commands/scaffold/create.js.map +1 -1
- package/src/config/frontmcp-config.schema.d.ts +4 -0
- package/src/config/frontmcp-config.schema.js +1 -0
- package/src/config/frontmcp-config.schema.js.map +1 -1
- package/src/config/frontmcp-config.types.d.ts +7 -1
- package/src/config/frontmcp-config.types.js.map +1 -1
|
@@ -1 +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,E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AAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;CACnE,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,+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;IAEpC,yCAAyC;IACzC,GAAG,EAAE,gCAAwB,CAAC,QAAQ,EAAE;IACxC,6DAA6D;IAC7D,SAAS,EAAE,6BAAqB,CAAC,QAAQ,EAAE;IAC3C,GAAG,EAAE,yBAAiB,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACvC,IAAI,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,6BAAqB,CAAC,QAAQ,EAAE;CACzC,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// CLI extension (issue #409)\n// ============================================\n//\n// `cli.commands` lets projects register custom `frontmcp <verb>` entries\n// that show up in `frontmcp --help` alongside the built-ins and run with\n// the project's full module graph (spawned via `tsx`).\n\n/**\n * Built-in CLI verbs that a project verb may NOT shadow. The reserved set\n * also includes Commander's global flag tokens so a verb literally named\n * `--help` can't be defined.\n */\nexport const RESERVED_VERBS: ReadonlySet<string> = new Set([\n 'dev',\n 'build',\n 'test',\n 'init',\n 'doctor',\n 'inspector',\n 'create',\n 'start',\n 'stop',\n 'restart',\n 'status',\n 'list',\n 'logs',\n 'socket',\n 'service',\n 'install',\n 'uninstall',\n 'configure',\n 'skills',\n 'mcpb',\n 'pm',\n 'help',\n 'version',\n '--help',\n '-h',\n '--version',\n '-V',\n '--list-commands',\n]);\n\nconst projectCommandArgumentSchema = z\n .object({\n name: z.string().min(1),\n required: z.boolean().optional(),\n description: z.string().optional(),\n variadic: z.boolean().optional(),\n })\n .strict();\n\nconst projectCommandOptionSchema = z\n .object({\n flags: z.string().min(1),\n description: z.string().optional(),\n default: z.union([z.string(), z.number(), z.boolean()]).optional(),\n })\n .strict();\n\nexport const projectCommandEntrySchema = z\n .object({\n entry: z.string().min(1),\n description: z.string().optional(),\n arguments: z\n .array(projectCommandArgumentSchema)\n .optional()\n .superRefine((args, ctx) => {\n if (!args) return;\n // Commander allows variadic only on the final positional. Catch it\n // here instead of letting it surface as a cryptic runtime error.\n for (let i = 0; i < args.length - 1; i++) {\n if (args[i].variadic) {\n ctx.addIssue({\n code: 'custom',\n path: [i, 'variadic'],\n message: `Argument \"${args[i].name}\" is variadic but is not the last argument. Variadic positionals must be last.`,\n });\n }\n }\n }),\n options: z.array(projectCommandOptionSchema).optional(),\n hidden: z.boolean().optional(),\n })\n .strict();\n\nexport const cliExtensionConfigSchema = z\n .object({\n commands: z\n .record(z.string(), projectCommandEntrySchema)\n .optional()\n .superRefine((map, ctx) => {\n if (!map) return;\n for (const name of Object.keys(map)) {\n if (RESERVED_VERBS.has(name)) {\n ctx.addIssue({\n code: 'custom',\n path: [name],\n message:\n `Command \"${name}\" collides with a built-in frontmcp verb. ` +\n `Choose a project-specific name (e.g. \"project:${name}\").`,\n });\n }\n if (!/^[a-zA-Z][a-zA-Z0-9:_-]*$/.test(name)) {\n ctx.addIssue({\n code: 'custom',\n path: [name],\n message: `\"${name}\" is not a valid verb name. Use letters, digits, \":\", \"_\", \"-\".`,\n });\n }\n }\n }),\n })\n .strict();\n\n// ============================================\n// Transport defaults (issue #400)\n// ============================================\n//\n// Per-protocol defaults consumed by `dev` / `inspector` / `pm start` / `pm\n// socket` so server-startup flags don't have to be re-typed on every CLI\n// invocation. Per-deployment `server.http.port` still wins where set.\n\nexport const transportHttpSchema = z\n .object({\n port: z.number().int().min(0).max(65535).optional(),\n path: z.string().optional(),\n host: z.string().optional(),\n })\n .strict();\n\nexport const transportStdioSchema = z\n .object({\n command: z.string().optional(),\n args: z.array(z.string()).optional(),\n })\n .strict();\n\nexport const transportConfigSchema = z\n .object({\n default: z.enum(['http', 'sse', 'stdio']).optional(),\n http: transportHttpSchema.optional(),\n stdio: transportStdioSchema.optional(),\n })\n .strict();\n\n// ============================================\n// Env overlays (issue #400)\n// ============================================\n//\n// `shared` applies to every mode; mode-specific overlays (`dev`, `test`,\n// `ship`) are merged on top. Effective env = `shared` ⊕ `<mode>` (later\n// wins). Loaded by `dev`/`test`/`pm` in addition to `.env`/`.env.local`\n// — file-based env still wins for parity with existing behavior.\n\nexport const envOverlaysSchema = z\n .object({\n shared: z.record(z.string(), z.string()).optional(),\n dev: z.record(z.string(), z.string()).optional(),\n test: z.record(z.string(), z.string()).optional(),\n ship: z.record(z.string(), z.string()).optional(),\n })\n .strict();\n\n// ============================================\n// MCP client connection snippets (issue #400)\n// ============================================\n//\n// Per-client connection descriptors consumed by `frontmcp eject-mcp-config\n// <client>` to emit ready-to-paste `.mcp.json` / `claude_desktop_config.json`\n// / Cursor / Windsurf / VS Code snippets.\n\nexport const clientConnectionSchema = z\n .object({\n name: z.string().optional(),\n transport: z.enum(['http', 'sse', 'stdio']),\n command: z.string().optional(),\n args: z.array(z.string()).optional(),\n env: z.record(z.string(), z.string()).optional(),\n url: z.string().url().optional(),\n })\n .strict();\n\n// `z.record(z.enum([...]), …)` in Zod 4 treats every enum value as a\n// REQUIRED key — so a `clients: { 'claude-code': {…} }` config (which is\n// the shape the scaffold emits) fails validation with \"expected object,\n// received undefined\" for the other four clients. The Verdaccio E2E\n// surfaced this against the generated template. `partialRecord` is Zod 4's\n// canonical fix: same enum-keyed schema but every key is optional, which\n// matches the user-facing contract (clients are opt-in, not all-or-nothing).\nexport const clientsConfigSchema = z.partialRecord(\n z.enum(['claude-code', 'claude-desktop', 'cursor', 'windsurf', 'vscode']),\n clientConnectionSchema,\n);\n\n// ============================================\n// Test runner defaults (issue #400)\n// ============================================\n//\n// `frontmcp test` defaults — overridden by CLI flags (`--timeout`,\n// `--runInBand`, `--coverage`, `<patterns>`).\n\nexport const testConfigSchema = z\n .object({\n timeoutMs: z.number().int().positive().optional(),\n runInBand: z.boolean().optional(),\n testMatch: z.array(z.string()).optional(),\n coverage: z.boolean().optional(),\n })\n .strict();\n\n// ============================================\n// Skills install / export defaults (issue #400)\n// ============================================\n//\n// `frontmcp skills install` / `export` defaults — `install` is the list of\n// catalog skill names a project depends on so `frontmcp skills install`\n// with no arguments installs the curated set.\n\nexport const skillsCliConfigSchema = z\n .object({\n provider: z.enum(['claude', 'codex']).optional(),\n bundle: z.enum(['recommended', 'minimal', 'full', 'none']).optional(),\n install: z.array(z.string()).optional(),\n exportTarget: z.enum(['cursor', 'windsurf', 'copilot']).optional(),\n })\n .strict();\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 // Issue #409 — project-defined CLI verbs\n cli: cliExtensionConfigSchema.optional(),\n // Issue #400 — config drives every command, not just `build`\n transport: transportConfigSchema.optional(),\n env: envOverlaysSchema.optional(),\n clients: clientsConfigSchema.optional(),\n test: testConfigSchema.optional(),\n skills: skillsCliConfigSchema.optional(),\n })\n .strict();\n\nexport type FrontMcpConfigInput = z.input<typeof frontmcpConfigSchema>;\nexport type FrontMcpConfigParsed = z.output<typeof frontmcpConfigSchema>;\n"]}
|
|
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,CAAC,QAAQ,EAAE;IACvF,SAAS,EAAE,YAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,YAAC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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;IAEpC,yCAAyC;IACzC,GAAG,EAAE,gCAAwB,CAAC,QAAQ,EAAE;IACxC,6DAA6D;IAC7D,SAAS,EAAE,6BAAqB,CAAC,QAAQ,EAAE;IAC3C,GAAG,EAAE,yBAAiB,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACvC,IAAI,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,6BAAqB,CAAC,QAAQ,EAAE;CACzC,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 compatibilityFlags: z.array(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// CLI extension (issue #409)\n// ============================================\n//\n// `cli.commands` lets projects register custom `frontmcp <verb>` entries\n// that show up in `frontmcp --help` alongside the built-ins and run with\n// the project's full module graph (spawned via `tsx`).\n\n/**\n * Built-in CLI verbs that a project verb may NOT shadow. The reserved set\n * also includes Commander's global flag tokens so a verb literally named\n * `--help` can't be defined.\n */\nexport const RESERVED_VERBS: ReadonlySet<string> = new Set([\n 'dev',\n 'build',\n 'test',\n 'init',\n 'doctor',\n 'inspector',\n 'create',\n 'start',\n 'stop',\n 'restart',\n 'status',\n 'list',\n 'logs',\n 'socket',\n 'service',\n 'install',\n 'uninstall',\n 'configure',\n 'skills',\n 'mcpb',\n 'pm',\n 'help',\n 'version',\n '--help',\n '-h',\n '--version',\n '-V',\n '--list-commands',\n]);\n\nconst projectCommandArgumentSchema = z\n .object({\n name: z.string().min(1),\n required: z.boolean().optional(),\n description: z.string().optional(),\n variadic: z.boolean().optional(),\n })\n .strict();\n\nconst projectCommandOptionSchema = z\n .object({\n flags: z.string().min(1),\n description: z.string().optional(),\n default: z.union([z.string(), z.number(), z.boolean()]).optional(),\n })\n .strict();\n\nexport const projectCommandEntrySchema = z\n .object({\n entry: z.string().min(1),\n description: z.string().optional(),\n arguments: z\n .array(projectCommandArgumentSchema)\n .optional()\n .superRefine((args, ctx) => {\n if (!args) return;\n // Commander allows variadic only on the final positional. Catch it\n // here instead of letting it surface as a cryptic runtime error.\n for (let i = 0; i < args.length - 1; i++) {\n if (args[i].variadic) {\n ctx.addIssue({\n code: 'custom',\n path: [i, 'variadic'],\n message: `Argument \"${args[i].name}\" is variadic but is not the last argument. Variadic positionals must be last.`,\n });\n }\n }\n }),\n options: z.array(projectCommandOptionSchema).optional(),\n hidden: z.boolean().optional(),\n })\n .strict();\n\nexport const cliExtensionConfigSchema = z\n .object({\n commands: z\n .record(z.string(), projectCommandEntrySchema)\n .optional()\n .superRefine((map, ctx) => {\n if (!map) return;\n for (const name of Object.keys(map)) {\n if (RESERVED_VERBS.has(name)) {\n ctx.addIssue({\n code: 'custom',\n path: [name],\n message:\n `Command \"${name}\" collides with a built-in frontmcp verb. ` +\n `Choose a project-specific name (e.g. \"project:${name}\").`,\n });\n }\n if (!/^[a-zA-Z][a-zA-Z0-9:_-]*$/.test(name)) {\n ctx.addIssue({\n code: 'custom',\n path: [name],\n message: `\"${name}\" is not a valid verb name. Use letters, digits, \":\", \"_\", \"-\".`,\n });\n }\n }\n }),\n })\n .strict();\n\n// ============================================\n// Transport defaults (issue #400)\n// ============================================\n//\n// Per-protocol defaults consumed by `dev` / `inspector` / `pm start` / `pm\n// socket` so server-startup flags don't have to be re-typed on every CLI\n// invocation. Per-deployment `server.http.port` still wins where set.\n\nexport const transportHttpSchema = z\n .object({\n port: z.number().int().min(0).max(65535).optional(),\n path: z.string().optional(),\n host: z.string().optional(),\n })\n .strict();\n\nexport const transportStdioSchema = z\n .object({\n command: z.string().optional(),\n args: z.array(z.string()).optional(),\n })\n .strict();\n\nexport const transportConfigSchema = z\n .object({\n default: z.enum(['http', 'sse', 'stdio']).optional(),\n http: transportHttpSchema.optional(),\n stdio: transportStdioSchema.optional(),\n })\n .strict();\n\n// ============================================\n// Env overlays (issue #400)\n// ============================================\n//\n// `shared` applies to every mode; mode-specific overlays (`dev`, `test`,\n// `ship`) are merged on top. Effective env = `shared` ⊕ `<mode>` (later\n// wins). Loaded by `dev`/`test`/`pm` in addition to `.env`/`.env.local`\n// — file-based env still wins for parity with existing behavior.\n\nexport const envOverlaysSchema = z\n .object({\n shared: z.record(z.string(), z.string()).optional(),\n dev: z.record(z.string(), z.string()).optional(),\n test: z.record(z.string(), z.string()).optional(),\n ship: z.record(z.string(), z.string()).optional(),\n })\n .strict();\n\n// ============================================\n// MCP client connection snippets (issue #400)\n// ============================================\n//\n// Per-client connection descriptors consumed by `frontmcp eject-mcp-config\n// <client>` to emit ready-to-paste `.mcp.json` / `claude_desktop_config.json`\n// / Cursor / Windsurf / VS Code snippets.\n\nexport const clientConnectionSchema = z\n .object({\n name: z.string().optional(),\n transport: z.enum(['http', 'sse', 'stdio']),\n command: z.string().optional(),\n args: z.array(z.string()).optional(),\n env: z.record(z.string(), z.string()).optional(),\n url: z.string().url().optional(),\n })\n .strict();\n\n// `z.record(z.enum([...]), …)` in Zod 4 treats every enum value as a\n// REQUIRED key — so a `clients: { 'claude-code': {…} }` config (which is\n// the shape the scaffold emits) fails validation with \"expected object,\n// received undefined\" for the other four clients. The Verdaccio E2E\n// surfaced this against the generated template. `partialRecord` is Zod 4's\n// canonical fix: same enum-keyed schema but every key is optional, which\n// matches the user-facing contract (clients are opt-in, not all-or-nothing).\nexport const clientsConfigSchema = z.partialRecord(\n z.enum(['claude-code', 'claude-desktop', 'cursor', 'windsurf', 'vscode']),\n clientConnectionSchema,\n);\n\n// ============================================\n// Test runner defaults (issue #400)\n// ============================================\n//\n// `frontmcp test` defaults — overridden by CLI flags (`--timeout`,\n// `--runInBand`, `--coverage`, `<patterns>`).\n\nexport const testConfigSchema = z\n .object({\n timeoutMs: z.number().int().positive().optional(),\n runInBand: z.boolean().optional(),\n testMatch: z.array(z.string()).optional(),\n coverage: z.boolean().optional(),\n })\n .strict();\n\n// ============================================\n// Skills install / export defaults (issue #400)\n// ============================================\n//\n// `frontmcp skills install` / `export` defaults — `install` is the list of\n// catalog skill names a project depends on so `frontmcp skills install`\n// with no arguments installs the curated set.\n\nexport const skillsCliConfigSchema = z\n .object({\n provider: z.enum(['claude', 'codex']).optional(),\n bundle: z.enum(['recommended', 'minimal', 'full', 'none']).optional(),\n install: z.array(z.string()).optional(),\n exportTarget: z.enum(['cursor', 'windsurf', 'copilot']).optional(),\n })\n .strict();\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 // Issue #409 — project-defined CLI verbs\n cli: cliExtensionConfigSchema.optional(),\n // Issue #400 — config drives every command, not just `build`\n transport: transportConfigSchema.optional(),\n env: envOverlaysSchema.optional(),\n clients: clientsConfigSchema.optional(),\n test: testConfigSchema.optional(),\n skills: skillsCliConfigSchema.optional(),\n })\n .strict();\n\nexport type FrontMcpConfigInput = z.input<typeof frontmcpConfigSchema>;\nexport type FrontMcpConfigParsed = z.output<typeof frontmcpConfigSchema>;\n"]}
|
|
@@ -137,8 +137,14 @@ export interface CliTargetConfig {
|
|
|
137
137
|
export interface WranglerConfig {
|
|
138
138
|
/** Worker name. */
|
|
139
139
|
name?: string;
|
|
140
|
-
/** Compatibility date. */
|
|
140
|
+
/** Compatibility date. Defaults to `2024-09-23` (the date that enables full `nodejs_compat`). */
|
|
141
141
|
compatibilityDate?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Extra Cloudflare compatibility flags. `nodejs_compat` is always emitted
|
|
144
|
+
* (the FrontMCP worker entry requires Node builtins), so list only additions
|
|
145
|
+
* here — e.g. `['nodejs_compat_populate_process_env']`.
|
|
146
|
+
*/
|
|
147
|
+
compatibilityFlags?: string[];
|
|
142
148
|
}
|
|
143
149
|
export type DeploymentTargetType = 'node' | 'distributed' | 'cli' | 'vercel' | 'lambda' | 'cloudflare' | 'browser' | 'sdk' | 'mcpb';
|
|
144
150
|
interface DeploymentBase {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontmcp-config.types.js","sourceRoot":"","sources":["../../../src/config/frontmcp-config.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG","sourcesContent":["/**\n * FrontMCP Configuration Types\n *\n * Defines the unified deployment configuration schema.\n * Used by `frontmcp.config.(json|yml|js|ts)` files.\n *\n * Separation of concerns:\n * - frontmcp.config = deployment (targets, server defaults, cookies, CSP)\n * - @FrontMcp() = runtime (auth, tools, resources, transport)\n * - Environment variables = secrets/overrides (Redis password, API keys)\n */\n\n// ============================================\n// Server Defaults\n// ============================================\n\nexport interface CorsConfig {\n /** Allowed origins. Empty array = permissive. */\n origins?: string[];\n /** Allow credentials (cookies, authorization headers). @default false */\n credentials?: boolean;\n /** Preflight cache max age in seconds. */\n maxAge?: number;\n}\n\nexport interface CspConfig {\n /** Enable CSP headers. @default false */\n enabled?: boolean;\n /** CSP directives (e.g., 'default-src': \"'self'\"). */\n directives?: Record<string, string | string[]>;\n /** Report URI for CSP violations. */\n reportUri?: string;\n /** Use Content-Security-Policy-Report-Only instead. @default false */\n reportOnly?: boolean;\n}\n\nexport interface CookiesConfig {\n /** LB affinity cookie name. @default '__frontmcp_node' */\n affinity?: string;\n /** Cookie domain. */\n domain?: string;\n /** SameSite policy. @default 'Strict' */\n sameSite?: 'Strict' | 'Lax' | 'None';\n}\n\nexport interface SecurityHeadersConfig {\n /** Strict-Transport-Security. Set to false to disable. */\n hsts?: string | false;\n /** X-Content-Type-Options. Set to false to disable. @default 'nosniff' */\n contentTypeOptions?: string | false;\n /** X-Frame-Options. Set to false to disable. @default 'DENY' */\n frameOptions?: string | false;\n /** Custom response headers. */\n custom?: Record<string, string>;\n}\n\n/**\n * HTTP options — aligns with `@FrontMcp({ http })`.\n *\n * Available on targets that serve HTTP:\n * - node, distributed: full (port + cors)\n * - vercel, lambda, cloudflare: no port (platform-managed), but cors applies\n * - browser, sdk, cli: not available\n */\nexport interface HttpConfig {\n /** HTTP port. Only for node/distributed. @default 3000 */\n port?: number;\n /** Unix socket path (alternative to port). Only for node/distributed. */\n socketPath?: string;\n /** MCP entry path ('' or '/mcp'). @default '' */\n entryPath?: string;\n /** CORS configuration. */\n cors?: CorsConfig;\n}\n\n/**\n * Server-level options for targets that handle HTTP responses.\n * Separated from HttpConfig because these apply even to serverless\n * targets that don't control the port (Cloudflare, Vercel, Lambda).\n */\nexport interface ServerDefaults {\n /** HTTP configuration (port, cors). */\n http?: HttpConfig;\n /** Content Security Policy. */\n csp?: CspConfig;\n /** Cookie configuration. */\n cookies?: CookiesConfig;\n /** Security headers. */\n headers?: SecurityHeadersConfig;\n}\n\n// ============================================\n// Build Options\n// ============================================\n\nexport interface EsbuildOptions {\n /** Dependencies to exclude from bundle. */\n external?: string[];\n /** Global defines. */\n define?: Record<string, string>;\n /** Build target (e.g., 'node22'). */\n target?: string;\n /** Minify output. */\n minify?: boolean;\n}\n\nexport interface BuildOptions {\n /** esbuild/bundler options. */\n esbuild?: EsbuildOptions;\n /** System/native dependencies for CLI packaging. */\n dependencies?: {\n system?: string[];\n nativeAddons?: string[];\n };\n /** Storage type for CLI setup. */\n storage?: {\n type: 'sqlite' | 'redis' | 'none';\n required?: boolean;\n };\n /** Network defaults. */\n network?: {\n defaultPort?: number;\n supportsSocket?: boolean;\n };\n}\n\n// ============================================\n// HA Configuration (distributed target only)\n// ============================================\n\nexport interface HaDeploymentConfig {\n /** Heartbeat interval in ms. @default 10000 */\n heartbeatIntervalMs?: number;\n /** Heartbeat TTL in ms (should be 2-3x interval). @default 30000 */\n heartbeatTtlMs?: number;\n /** Grace period before claiming orphaned sessions. @default 5000 */\n takeoverGracePeriodMs?: number;\n /** Redis key prefix for HA keys. @default 'mcp:ha:' */\n redisKeyPrefix?: string;\n}\n\n// ============================================\n// CLI Configuration (cli target only)\n// ============================================\n\nexport interface CliTargetConfig {\n /** CLI description. */\n description?: string;\n /** Default output format. @default 'text' */\n outputDefault?: 'text' | 'json';\n /** Require authentication for CLI. */\n authRequired?: boolean;\n /** Tools to exclude from CLI. */\n excludeTools?: string[];\n /** OAuth configuration for CLI authentication. */\n oauth?: {\n serverUrl?: string;\n clientId?: string;\n defaultScope?: string;\n portRange?: [number, number];\n };\n}\n\n// ============================================\n// Wrangler Configuration (cloudflare target only)\n// ============================================\n\nexport interface WranglerConfig {\n /** Worker name. */\n name?: string;\n /** Compatibility date. */\n compatibilityDate?: string;\n}\n\n// ============================================\n// Deployment Targets\n// ============================================\n\nexport type DeploymentTargetType =\n | 'node'\n | 'distributed'\n | 'cli'\n | 'vercel'\n | 'lambda'\n | 'cloudflare'\n | 'browser'\n | 'sdk'\n | 'mcpb';\n\ninterface DeploymentBase {\n /** Deployment target type. */\n target: DeploymentTargetType;\n /** Output directory override. @default 'dist/{target}' */\n outDir?: string;\n /** Environment variables injected at build time. */\n env?: Record<string, string>;\n}\n\nexport interface NodeDeployment extends DeploymentBase {\n target: 'node';\n /** Server config (http with port, csp, cookies, headers). */\n server?: ServerDefaults;\n}\n\nexport interface DistributedDeployment extends DeploymentBase {\n target: 'distributed';\n /** Server config (http with port, csp, cookies, headers). */\n server?: ServerDefaults;\n /** HA configuration. */\n ha?: HaDeploymentConfig;\n}\n\nexport interface CliDeployment extends DeploymentBase {\n target: 'cli';\n /** Output JS bundle instead of native binary. */\n js?: boolean;\n /** CLI-specific configuration. */\n cli?: CliTargetConfig;\n /** Single Executable Application settings. */\n sea?: { enabled?: boolean };\n}\n\nexport interface VercelDeployment extends DeploymentBase {\n target: 'vercel';\n /** Server config (no port — platform-managed, but cors/csp/cookies apply). */\n server?: ServerDefaults;\n}\n\nexport interface LambdaDeployment extends DeploymentBase {\n target: 'lambda';\n /** Server config (no port — platform-managed, but cors/csp/cookies apply). */\n server?: ServerDefaults;\n}\n\nexport interface CloudflareDeployment extends DeploymentBase {\n target: 'cloudflare';\n /** Server config (no port — platform-managed, but cors/csp/cookies apply). */\n server?: ServerDefaults;\n /** Wrangler configuration. */\n wrangler?: WranglerConfig;\n}\n\nexport interface BrowserDeployment extends DeploymentBase {\n target: 'browser';\n /** No server — browser bundles are client-side. */\n}\n\nexport interface SdkDeployment extends DeploymentBase {\n target: 'sdk';\n /** No server — SDK is a library. */\n}\n\n// ============================================\n// MCPB Deployment (MCP Bundle)\n// ============================================\n\nexport interface McpbAuthor {\n name: string;\n email?: string;\n url?: string;\n}\n\nexport type McpbUserConfigType = 'string' | 'number' | 'boolean' | 'directory' | 'file';\n\nexport interface McpbUserConfigEntry {\n type: McpbUserConfigType;\n title: string;\n description?: string;\n required?: boolean;\n default?: string | number | boolean;\n multiple?: boolean;\n sensitive?: boolean;\n min?: number;\n max?: number;\n}\n\nexport interface McpbCompatibility {\n /** Semver range for Claude Desktop (e.g., \">=1.0.0\"). */\n claude_desktop?: string;\n /** Supported platforms. */\n platforms?: Array<'darwin' | 'win32' | 'linux'>;\n /** Runtime version constraints. */\n runtimes?: {\n node?: string;\n python?: string;\n };\n}\n\nexport type McpbRepository = string | { type: string; url: string };\n\nexport interface McpbDeployment extends DeploymentBase {\n target: 'mcpb';\n /** Human-friendly display name. */\n displayName?: string;\n /** Long markdown description. */\n longDescription?: string;\n /** Author object — overrides parsed package.json.author. */\n author?: McpbAuthor;\n /** SPDX license identifier — overrides package.json.license. */\n license?: string;\n /** Project homepage URL. */\n homepage?: string;\n /** Source repository. */\n repository?: McpbRepository;\n /** Documentation URL. */\n documentation?: string;\n /** Support URL (issues/contact). */\n support?: string;\n /** Path to icon (PNG) relative to project root. */\n icon?: string;\n /** Keywords for search. */\n keywords?: string[];\n /** Privacy policy URLs. */\n privacyPolicies?: string[];\n /** Runtime/platform compatibility constraints. */\n compatibility?: McpbCompatibility;\n /** User-configurable inputs (injected as env vars). */\n userConfig?: Record<string, McpbUserConfigEntry>;\n /** Single-executable binary integration. */\n sea?: {\n /** Build SEA binary for host platform. */\n enabled?: boolean;\n /** Directory of pre-built cross-platform SEA binaries to merge. */\n mergeFrom?: string;\n };\n /** Include node_modules/ in archive (opt-in). */\n includeNodeModules?: boolean;\n /** Deterministic archive output. @default true */\n deterministic?: boolean;\n}\n\nexport type DeploymentTarget =\n | NodeDeployment\n | DistributedDeployment\n | CliDeployment\n | VercelDeployment\n | LambdaDeployment\n | CloudflareDeployment\n | BrowserDeployment\n | SdkDeployment\n | McpbDeployment;\n\n// ============================================\n// CLI extension (issue #409)\n// ============================================\n\n/** Positional argument for a project-defined command. */\nexport interface ProjectCommandArgument {\n /** Argument name (kebab-case). Shown in --help. */\n name: string;\n /** Required (`<name>`) vs optional (`[name]`). @default false */\n required?: boolean;\n /** One-line description. */\n description?: string;\n /** Variadic (`<name...>`/`[name...]`). @default false */\n variadic?: boolean;\n}\n\n/** Named option for a project-defined command. */\nexport interface ProjectCommandOption {\n /** Commander flag spec, e.g. `-f, --force` or `-p, --port <num>`. */\n flags: string;\n /** One-line description. */\n description?: string;\n /** Default value forwarded to Commander. */\n default?: string | number | boolean;\n}\n\n/** A single project-defined CLI command. */\nexport interface ProjectCommandEntry {\n /** Path to the runner module (TS or JS), relative to project root. */\n entry: string;\n /** One-line description shown under \"Project commands\" in --help. */\n description?: string;\n /** Positional arguments. */\n arguments?: ProjectCommandArgument[];\n /** Named options. */\n options?: ProjectCommandOption[];\n /** Hide from --help. Verb is still invokable. @default false */\n hidden?: boolean;\n}\n\n/** CLI extension block — see `cli.commands` in frontmcp.config. */\nexport interface CliExtensionConfig {\n /**\n * Map of verb name → command definition. Verb names may include `:`,\n * `_`, and `-` (e.g. `project:init`, `db-migrate`). Reserved verbs (the\n * built-in ones) are rejected at config-load time.\n */\n commands?: Record<string, ProjectCommandEntry>;\n}\n\n// ============================================\n// Top-Level Config\n// ============================================\n\n// ============================================\n// Transport defaults (issue #400)\n// ============================================\n\n/**\n * Per-protocol defaults consumed by `dev` / `inspector` / `pm start` /\n * `pm socket` so server-startup flags don't have to be re-typed on every\n * CLI invocation.\n */\nexport interface TransportConfig {\n /** Default protocol when no flag is set. */\n default?: 'http' | 'sse' | 'stdio';\n /** HTTP transport defaults — overridden by `--port` / per-deployment `server.http.port`. */\n http?: {\n /** Default HTTP port. */\n port?: number;\n /** Mount path (e.g., '/mcp'). */\n path?: string;\n /** Bind address. */\n host?: string;\n };\n /** Stdio transport defaults — used by `inspector` to spawn the server. */\n stdio?: {\n command?: string;\n args?: string[];\n };\n}\n\n// ============================================\n// Env overlays (issue #400)\n// ============================================\n\n/**\n * Top-level env overlays. `shared` applies everywhere; mode-specific\n * overlays (`dev`, `test`, `ship`) are merged on top of `shared`.\n *\n * Effective env = `shared` ⊕ `<mode>` (later wins). `.env` / `.env.local`\n * files still load and take precedence over config overlays (parity with\n * existing `dev` behavior).\n */\nexport interface EnvOverlays {\n shared?: Record<string, string>;\n dev?: Record<string, string>;\n test?: Record<string, string>;\n ship?: Record<string, string>;\n}\n\n// ============================================\n// MCP client connection snippets (issue #400)\n// ============================================\n\nexport type McpClientName = 'claude-code' | 'claude-desktop' | 'cursor' | 'windsurf' | 'vscode';\n\nexport interface ClientConnection {\n /** Display name. Defaults to the top-level `name` field. */\n name?: string;\n /** Transport protocol. */\n transport: 'http' | 'sse' | 'stdio';\n /** Spawn command (for `stdio` transport). */\n command?: string;\n /** Spawn args (for `stdio` transport). */\n args?: string[];\n /** Env vars to set on the spawned client. */\n env?: Record<string, string>;\n /** Server URL (for `http` / `sse` transport). */\n url?: string;\n}\n\n/**\n * Per-client connection descriptors consumed by `frontmcp eject-mcp-config\n * <client>` to emit ready-to-paste `.mcp.json` /\n * `claude_desktop_config.json` / Cursor / Windsurf / VS Code snippets.\n */\nexport type ClientsConfig = Partial<Record<McpClientName, ClientConnection>>;\n\n// ============================================\n// Test runner defaults (issue #400)\n// ============================================\n\n/**\n * `frontmcp test` defaults. CLI flags (`--timeout`, `--runInBand`,\n * `--coverage`, positional test patterns) override these.\n */\nexport interface TestConfig {\n timeoutMs?: number;\n runInBand?: boolean;\n testMatch?: string[];\n coverage?: boolean;\n}\n\n// ============================================\n// Skills install / export defaults (issue #400)\n// ============================================\n\n/**\n * `frontmcp skills install` / `export` defaults. `install` is the list of\n * catalog skill names a project depends on so `frontmcp skills install`\n * with no arguments installs the curated set.\n */\nexport interface SkillsCliConfig {\n provider?: 'claude' | 'codex';\n bundle?: 'recommended' | 'minimal' | 'full' | 'none';\n install?: string[];\n exportTarget?: 'cursor' | 'windsurf' | 'copilot';\n}\n\n// ============================================\n// Top-level config\n// ============================================\n\nexport interface FrontMcpConfig {\n /** JSON Schema pointer for IDE autocomplete. */\n $schema?: string;\n /** Server name (alphanumeric, .-_ allowed). */\n name: string;\n /** Server version (semver). @default '1.0.0' */\n version?: string;\n /** Entry point file path. */\n entry?: string;\n /** Node.js version requirement. @default '>=22.0.0' */\n nodeVersion?: string;\n /** Build targets — server config lives inside each target that needs it. */\n deployments: DeploymentTarget[];\n /** Build/bundler options. */\n build?: BuildOptions;\n /** Project-defined CLI extensions (issue #409). */\n cli?: CliExtensionConfig;\n\n // Issue #400 — config drives every command, not just `build`\n /** Transport defaults consumed by `dev` / `inspector` / `pm start` / `pm socket`. */\n transport?: TransportConfig;\n /** Env overlays merged in addition to `.env` / `.env.local`. */\n env?: EnvOverlays;\n /** Per-client snippets emitted by `frontmcp eject-mcp-config <client>`. */\n clients?: ClientsConfig;\n /** `frontmcp test` defaults overridden by CLI flags. */\n test?: TestConfig;\n /** `frontmcp skills install` / `export` defaults. */\n skills?: SkillsCliConfig;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"frontmcp-config.types.js","sourceRoot":"","sources":["../../../src/config/frontmcp-config.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG","sourcesContent":["/**\n * FrontMCP Configuration Types\n *\n * Defines the unified deployment configuration schema.\n * Used by `frontmcp.config.(json|yml|js|ts)` files.\n *\n * Separation of concerns:\n * - frontmcp.config = deployment (targets, server defaults, cookies, CSP)\n * - @FrontMcp() = runtime (auth, tools, resources, transport)\n * - Environment variables = secrets/overrides (Redis password, API keys)\n */\n\n// ============================================\n// Server Defaults\n// ============================================\n\nexport interface CorsConfig {\n /** Allowed origins. Empty array = permissive. */\n origins?: string[];\n /** Allow credentials (cookies, authorization headers). @default false */\n credentials?: boolean;\n /** Preflight cache max age in seconds. */\n maxAge?: number;\n}\n\nexport interface CspConfig {\n /** Enable CSP headers. @default false */\n enabled?: boolean;\n /** CSP directives (e.g., 'default-src': \"'self'\"). */\n directives?: Record<string, string | string[]>;\n /** Report URI for CSP violations. */\n reportUri?: string;\n /** Use Content-Security-Policy-Report-Only instead. @default false */\n reportOnly?: boolean;\n}\n\nexport interface CookiesConfig {\n /** LB affinity cookie name. @default '__frontmcp_node' */\n affinity?: string;\n /** Cookie domain. */\n domain?: string;\n /** SameSite policy. @default 'Strict' */\n sameSite?: 'Strict' | 'Lax' | 'None';\n}\n\nexport interface SecurityHeadersConfig {\n /** Strict-Transport-Security. Set to false to disable. */\n hsts?: string | false;\n /** X-Content-Type-Options. Set to false to disable. @default 'nosniff' */\n contentTypeOptions?: string | false;\n /** X-Frame-Options. Set to false to disable. @default 'DENY' */\n frameOptions?: string | false;\n /** Custom response headers. */\n custom?: Record<string, string>;\n}\n\n/**\n * HTTP options — aligns with `@FrontMcp({ http })`.\n *\n * Available on targets that serve HTTP:\n * - node, distributed: full (port + cors)\n * - vercel, lambda, cloudflare: no port (platform-managed), but cors applies\n * - browser, sdk, cli: not available\n */\nexport interface HttpConfig {\n /** HTTP port. Only for node/distributed. @default 3000 */\n port?: number;\n /** Unix socket path (alternative to port). Only for node/distributed. */\n socketPath?: string;\n /** MCP entry path ('' or '/mcp'). @default '' */\n entryPath?: string;\n /** CORS configuration. */\n cors?: CorsConfig;\n}\n\n/**\n * Server-level options for targets that handle HTTP responses.\n * Separated from HttpConfig because these apply even to serverless\n * targets that don't control the port (Cloudflare, Vercel, Lambda).\n */\nexport interface ServerDefaults {\n /** HTTP configuration (port, cors). */\n http?: HttpConfig;\n /** Content Security Policy. */\n csp?: CspConfig;\n /** Cookie configuration. */\n cookies?: CookiesConfig;\n /** Security headers. */\n headers?: SecurityHeadersConfig;\n}\n\n// ============================================\n// Build Options\n// ============================================\n\nexport interface EsbuildOptions {\n /** Dependencies to exclude from bundle. */\n external?: string[];\n /** Global defines. */\n define?: Record<string, string>;\n /** Build target (e.g., 'node22'). */\n target?: string;\n /** Minify output. */\n minify?: boolean;\n}\n\nexport interface BuildOptions {\n /** esbuild/bundler options. */\n esbuild?: EsbuildOptions;\n /** System/native dependencies for CLI packaging. */\n dependencies?: {\n system?: string[];\n nativeAddons?: string[];\n };\n /** Storage type for CLI setup. */\n storage?: {\n type: 'sqlite' | 'redis' | 'none';\n required?: boolean;\n };\n /** Network defaults. */\n network?: {\n defaultPort?: number;\n supportsSocket?: boolean;\n };\n}\n\n// ============================================\n// HA Configuration (distributed target only)\n// ============================================\n\nexport interface HaDeploymentConfig {\n /** Heartbeat interval in ms. @default 10000 */\n heartbeatIntervalMs?: number;\n /** Heartbeat TTL in ms (should be 2-3x interval). @default 30000 */\n heartbeatTtlMs?: number;\n /** Grace period before claiming orphaned sessions. @default 5000 */\n takeoverGracePeriodMs?: number;\n /** Redis key prefix for HA keys. @default 'mcp:ha:' */\n redisKeyPrefix?: string;\n}\n\n// ============================================\n// CLI Configuration (cli target only)\n// ============================================\n\nexport interface CliTargetConfig {\n /** CLI description. */\n description?: string;\n /** Default output format. @default 'text' */\n outputDefault?: 'text' | 'json';\n /** Require authentication for CLI. */\n authRequired?: boolean;\n /** Tools to exclude from CLI. */\n excludeTools?: string[];\n /** OAuth configuration for CLI authentication. */\n oauth?: {\n serverUrl?: string;\n clientId?: string;\n defaultScope?: string;\n portRange?: [number, number];\n };\n}\n\n// ============================================\n// Wrangler Configuration (cloudflare target only)\n// ============================================\n\nexport interface WranglerConfig {\n /** Worker name. */\n name?: string;\n /** Compatibility date. Defaults to `2024-09-23` (the date that enables full `nodejs_compat`). */\n compatibilityDate?: string;\n /**\n * Extra Cloudflare compatibility flags. `nodejs_compat` is always emitted\n * (the FrontMCP worker entry requires Node builtins), so list only additions\n * here — e.g. `['nodejs_compat_populate_process_env']`.\n */\n compatibilityFlags?: string[];\n}\n\n// ============================================\n// Deployment Targets\n// ============================================\n\nexport type DeploymentTargetType =\n | 'node'\n | 'distributed'\n | 'cli'\n | 'vercel'\n | 'lambda'\n | 'cloudflare'\n | 'browser'\n | 'sdk'\n | 'mcpb';\n\ninterface DeploymentBase {\n /** Deployment target type. */\n target: DeploymentTargetType;\n /** Output directory override. @default 'dist/{target}' */\n outDir?: string;\n /** Environment variables injected at build time. */\n env?: Record<string, string>;\n}\n\nexport interface NodeDeployment extends DeploymentBase {\n target: 'node';\n /** Server config (http with port, csp, cookies, headers). */\n server?: ServerDefaults;\n}\n\nexport interface DistributedDeployment extends DeploymentBase {\n target: 'distributed';\n /** Server config (http with port, csp, cookies, headers). */\n server?: ServerDefaults;\n /** HA configuration. */\n ha?: HaDeploymentConfig;\n}\n\nexport interface CliDeployment extends DeploymentBase {\n target: 'cli';\n /** Output JS bundle instead of native binary. */\n js?: boolean;\n /** CLI-specific configuration. */\n cli?: CliTargetConfig;\n /** Single Executable Application settings. */\n sea?: { enabled?: boolean };\n}\n\nexport interface VercelDeployment extends DeploymentBase {\n target: 'vercel';\n /** Server config (no port — platform-managed, but cors/csp/cookies apply). */\n server?: ServerDefaults;\n}\n\nexport interface LambdaDeployment extends DeploymentBase {\n target: 'lambda';\n /** Server config (no port — platform-managed, but cors/csp/cookies apply). */\n server?: ServerDefaults;\n}\n\nexport interface CloudflareDeployment extends DeploymentBase {\n target: 'cloudflare';\n /** Server config (no port — platform-managed, but cors/csp/cookies apply). */\n server?: ServerDefaults;\n /** Wrangler configuration. */\n wrangler?: WranglerConfig;\n}\n\nexport interface BrowserDeployment extends DeploymentBase {\n target: 'browser';\n /** No server — browser bundles are client-side. */\n}\n\nexport interface SdkDeployment extends DeploymentBase {\n target: 'sdk';\n /** No server — SDK is a library. */\n}\n\n// ============================================\n// MCPB Deployment (MCP Bundle)\n// ============================================\n\nexport interface McpbAuthor {\n name: string;\n email?: string;\n url?: string;\n}\n\nexport type McpbUserConfigType = 'string' | 'number' | 'boolean' | 'directory' | 'file';\n\nexport interface McpbUserConfigEntry {\n type: McpbUserConfigType;\n title: string;\n description?: string;\n required?: boolean;\n default?: string | number | boolean;\n multiple?: boolean;\n sensitive?: boolean;\n min?: number;\n max?: number;\n}\n\nexport interface McpbCompatibility {\n /** Semver range for Claude Desktop (e.g., \">=1.0.0\"). */\n claude_desktop?: string;\n /** Supported platforms. */\n platforms?: Array<'darwin' | 'win32' | 'linux'>;\n /** Runtime version constraints. */\n runtimes?: {\n node?: string;\n python?: string;\n };\n}\n\nexport type McpbRepository = string | { type: string; url: string };\n\nexport interface McpbDeployment extends DeploymentBase {\n target: 'mcpb';\n /** Human-friendly display name. */\n displayName?: string;\n /** Long markdown description. */\n longDescription?: string;\n /** Author object — overrides parsed package.json.author. */\n author?: McpbAuthor;\n /** SPDX license identifier — overrides package.json.license. */\n license?: string;\n /** Project homepage URL. */\n homepage?: string;\n /** Source repository. */\n repository?: McpbRepository;\n /** Documentation URL. */\n documentation?: string;\n /** Support URL (issues/contact). */\n support?: string;\n /** Path to icon (PNG) relative to project root. */\n icon?: string;\n /** Keywords for search. */\n keywords?: string[];\n /** Privacy policy URLs. */\n privacyPolicies?: string[];\n /** Runtime/platform compatibility constraints. */\n compatibility?: McpbCompatibility;\n /** User-configurable inputs (injected as env vars). */\n userConfig?: Record<string, McpbUserConfigEntry>;\n /** Single-executable binary integration. */\n sea?: {\n /** Build SEA binary for host platform. */\n enabled?: boolean;\n /** Directory of pre-built cross-platform SEA binaries to merge. */\n mergeFrom?: string;\n };\n /** Include node_modules/ in archive (opt-in). */\n includeNodeModules?: boolean;\n /** Deterministic archive output. @default true */\n deterministic?: boolean;\n}\n\nexport type DeploymentTarget =\n | NodeDeployment\n | DistributedDeployment\n | CliDeployment\n | VercelDeployment\n | LambdaDeployment\n | CloudflareDeployment\n | BrowserDeployment\n | SdkDeployment\n | McpbDeployment;\n\n// ============================================\n// CLI extension (issue #409)\n// ============================================\n\n/** Positional argument for a project-defined command. */\nexport interface ProjectCommandArgument {\n /** Argument name (kebab-case). Shown in --help. */\n name: string;\n /** Required (`<name>`) vs optional (`[name]`). @default false */\n required?: boolean;\n /** One-line description. */\n description?: string;\n /** Variadic (`<name...>`/`[name...]`). @default false */\n variadic?: boolean;\n}\n\n/** Named option for a project-defined command. */\nexport interface ProjectCommandOption {\n /** Commander flag spec, e.g. `-f, --force` or `-p, --port <num>`. */\n flags: string;\n /** One-line description. */\n description?: string;\n /** Default value forwarded to Commander. */\n default?: string | number | boolean;\n}\n\n/** A single project-defined CLI command. */\nexport interface ProjectCommandEntry {\n /** Path to the runner module (TS or JS), relative to project root. */\n entry: string;\n /** One-line description shown under \"Project commands\" in --help. */\n description?: string;\n /** Positional arguments. */\n arguments?: ProjectCommandArgument[];\n /** Named options. */\n options?: ProjectCommandOption[];\n /** Hide from --help. Verb is still invokable. @default false */\n hidden?: boolean;\n}\n\n/** CLI extension block — see `cli.commands` in frontmcp.config. */\nexport interface CliExtensionConfig {\n /**\n * Map of verb name → command definition. Verb names may include `:`,\n * `_`, and `-` (e.g. `project:init`, `db-migrate`). Reserved verbs (the\n * built-in ones) are rejected at config-load time.\n */\n commands?: Record<string, ProjectCommandEntry>;\n}\n\n// ============================================\n// Top-Level Config\n// ============================================\n\n// ============================================\n// Transport defaults (issue #400)\n// ============================================\n\n/**\n * Per-protocol defaults consumed by `dev` / `inspector` / `pm start` /\n * `pm socket` so server-startup flags don't have to be re-typed on every\n * CLI invocation.\n */\nexport interface TransportConfig {\n /** Default protocol when no flag is set. */\n default?: 'http' | 'sse' | 'stdio';\n /** HTTP transport defaults — overridden by `--port` / per-deployment `server.http.port`. */\n http?: {\n /** Default HTTP port. */\n port?: number;\n /** Mount path (e.g., '/mcp'). */\n path?: string;\n /** Bind address. */\n host?: string;\n };\n /** Stdio transport defaults — used by `inspector` to spawn the server. */\n stdio?: {\n command?: string;\n args?: string[];\n };\n}\n\n// ============================================\n// Env overlays (issue #400)\n// ============================================\n\n/**\n * Top-level env overlays. `shared` applies everywhere; mode-specific\n * overlays (`dev`, `test`, `ship`) are merged on top of `shared`.\n *\n * Effective env = `shared` ⊕ `<mode>` (later wins). `.env` / `.env.local`\n * files still load and take precedence over config overlays (parity with\n * existing `dev` behavior).\n */\nexport interface EnvOverlays {\n shared?: Record<string, string>;\n dev?: Record<string, string>;\n test?: Record<string, string>;\n ship?: Record<string, string>;\n}\n\n// ============================================\n// MCP client connection snippets (issue #400)\n// ============================================\n\nexport type McpClientName = 'claude-code' | 'claude-desktop' | 'cursor' | 'windsurf' | 'vscode';\n\nexport interface ClientConnection {\n /** Display name. Defaults to the top-level `name` field. */\n name?: string;\n /** Transport protocol. */\n transport: 'http' | 'sse' | 'stdio';\n /** Spawn command (for `stdio` transport). */\n command?: string;\n /** Spawn args (for `stdio` transport). */\n args?: string[];\n /** Env vars to set on the spawned client. */\n env?: Record<string, string>;\n /** Server URL (for `http` / `sse` transport). */\n url?: string;\n}\n\n/**\n * Per-client connection descriptors consumed by `frontmcp eject-mcp-config\n * <client>` to emit ready-to-paste `.mcp.json` /\n * `claude_desktop_config.json` / Cursor / Windsurf / VS Code snippets.\n */\nexport type ClientsConfig = Partial<Record<McpClientName, ClientConnection>>;\n\n// ============================================\n// Test runner defaults (issue #400)\n// ============================================\n\n/**\n * `frontmcp test` defaults. CLI flags (`--timeout`, `--runInBand`,\n * `--coverage`, positional test patterns) override these.\n */\nexport interface TestConfig {\n timeoutMs?: number;\n runInBand?: boolean;\n testMatch?: string[];\n coverage?: boolean;\n}\n\n// ============================================\n// Skills install / export defaults (issue #400)\n// ============================================\n\n/**\n * `frontmcp skills install` / `export` defaults. `install` is the list of\n * catalog skill names a project depends on so `frontmcp skills install`\n * with no arguments installs the curated set.\n */\nexport interface SkillsCliConfig {\n provider?: 'claude' | 'codex';\n bundle?: 'recommended' | 'minimal' | 'full' | 'none';\n install?: string[];\n exportTarget?: 'cursor' | 'windsurf' | 'copilot';\n}\n\n// ============================================\n// Top-level config\n// ============================================\n\nexport interface FrontMcpConfig {\n /** JSON Schema pointer for IDE autocomplete. */\n $schema?: string;\n /** Server name (alphanumeric, .-_ allowed). */\n name: string;\n /** Server version (semver). @default '1.0.0' */\n version?: string;\n /** Entry point file path. */\n entry?: string;\n /** Node.js version requirement. @default '>=22.0.0' */\n nodeVersion?: string;\n /** Build targets — server config lives inside each target that needs it. */\n deployments: DeploymentTarget[];\n /** Build/bundler options. */\n build?: BuildOptions;\n /** Project-defined CLI extensions (issue #409). */\n cli?: CliExtensionConfig;\n\n // Issue #400 — config drives every command, not just `build`\n /** Transport defaults consumed by `dev` / `inspector` / `pm start` / `pm socket`. */\n transport?: TransportConfig;\n /** Env overlays merged in addition to `.env` / `.env.local`. */\n env?: EnvOverlays;\n /** Per-client snippets emitted by `frontmcp eject-mcp-config <client>`. */\n clients?: ClientsConfig;\n /** `frontmcp test` defaults overridden by CLI flags. */\n test?: TestConfig;\n /** `frontmcp skills install` / `export` defaults. */\n skills?: SkillsCliConfig;\n}\n"]}
|