/** * GeneratorConfig — Full Configuration for the OpenAPI-to-MCP Generator * * Controls every aspect of code generation: which Vurb features * are enabled, naming conventions, tag filtering, server scaffolding, * and context injection. * * Can be loaded from a YAML file (`openapi-gen.yaml`) or passed programmatically. * * @module */ /** * Controls which Vurb features appear in generated code. * All fields default to `true` for maximum fidelity. */ export interface FeatureFlags { /** Apply OpenAPI tags as MCP tool tags via `.tags()` */ readonly tags: boolean; /** Infer `readOnly` / `destructive` / `idempotent` from HTTP methods */ readonly annotations: boolean; /** Generate Presenter files with `createPresenter()` + Zod response schemas */ readonly presenters: boolean; /** Chain `.describe()` on every Zod field that has an OpenAPI description */ readonly descriptions: boolean; /** Handle deprecated operations: 'skip' = omit, 'comment' = add @deprecated JSDoc */ readonly deprecated: 'skip' | 'comment' | 'include'; /** Enable `toonDescription: true` on generated `defineTool()` calls */ readonly toonDescription: boolean; /** Generate a complete MCP Server file (`server.ts`) with `attachToServer()` */ readonly serverFile: boolean; } /** Controls how action names are derived from operationId / path */ export interface NamingConfig { /** Action naming style */ readonly style: 'snake_case' | 'camelCase'; /** Append _2, _3 for collision resolution */ readonly deduplication: boolean; } /** Controls the context type used in generated tools */ export interface ContextConfig { /** Import path with type name, e.g. `'../src/types.js#MyAppContext'` */ readonly import?: string; } /** Controls the generated MCP Server file */ export interface ServerConfig { /** Server name shown to MCP clients */ readonly name: string; /** Server version */ readonly version: string; /** Transport type for the generated server */ readonly transport: 'stdio' | 'sse'; /** * Exposition strategy for projecting tools onto the MCP wire format. * - `'flat'` — Each action becomes an independent MCP tool (default) * - `'grouped'` — All actions in a builder merge into a single MCP tool */ readonly toolExposition: 'flat' | 'grouped'; /** * Separator for flat mode action naming: `{toolName}{separator}{actionKey}`. * @default '_' * @example 'pet_get_by_id', 'pet.get_by_id', 'pet-get_by_id' */ readonly actionSeparator: string; } /** * Complete generator configuration. * * Can be loaded from `openapi-gen.yaml` or passed to `emitFiles()`. * All fields have sensible defaults — see {@link DEFAULT_CONFIG}. */ export interface GeneratorConfig { /** Path to OpenAPI spec file (YAML or JSON) */ readonly input?: string; /** Output directory for generated files */ readonly output?: string; /** Base URL expression for fetch calls (default: `'ctx.baseUrl'`) */ readonly baseUrl?: string; /** Feature toggles */ readonly features: FeatureFlags; /** Naming conventions */ readonly naming: NamingConfig; /** Context type injection */ readonly context: ContextConfig; /** Server generation settings */ readonly server: ServerConfig; /** Only generate tools for these tags (empty = all) */ readonly includeTags: readonly string[]; /** Exclude these tags from generation */ readonly excludeTags: readonly string[]; } /** Default configuration — all features enabled */ export declare const DEFAULT_CONFIG: GeneratorConfig; /** * Deep-merge a partial config with defaults. * Partial values override defaults at each level. */ export declare function mergeConfig(partial: PartialConfig): GeneratorConfig; /** Partial config shape for merging */ export interface PartialConfig { readonly input?: string; readonly output?: string; readonly baseUrl?: string; readonly features?: Partial; readonly naming?: Partial; readonly context?: Partial; readonly server?: Partial; readonly includeTags?: readonly string[]; readonly excludeTags?: readonly string[]; } //# sourceMappingURL=GeneratorConfig.d.ts.map