import 'reflect-metadata'; import { NitroStackServer } from './server.js'; import type { ClassConstructor } from './types.js'; import type { McpTransform } from './transforms/index.js'; /** * MCP Application Options */ export interface McpAppOptions { /** * Root module of the application */ module: ClassConstructor; /** * Server configuration */ server?: { name?: string; version?: string; /** * MCP protocol era to serve (additive; env `NITRO_MCP_PROTOCOL_VERSION` * wins). Unset ⇒ 'auto' (serves modern 2026-07-28 stateless with legacy fallback). * `2026-07-28` enforces pure modern; `2025-06-18` / `legacy` selects sessionful legacy. */ protocolVersion?: string; /** * Extra extensions to advertise on the 2026-07-28 `server/discover` map. */ extensions?: Record>; }; /** * Logging configuration */ logging?: { level?: 'debug' | 'info' | 'warn' | 'error'; }; /** * Transport configuration * - 'stdio': STDIO only (default) * - 'http': HTTP only * - 'dual': STDIO for MCP + HTTP for OAuth metadata (auto-enabled with OAuth) */ transport?: { type: 'stdio' | 'http' | 'dual'; http?: { port?: number; host?: string; basePath?: string; }; }; /** * Register OS signal handlers (SIGTERM/SIGINT) so the application shuts down * gracefully and runs the shutdown lifecycle hooks. Enabled by default; set to * false if the host process manages its own shutdown. */ shutdownHooks?: boolean; /** * Catalog transforms pipeline for Progressive Discovery, Code Mode, etc. */ transforms?: McpTransform[]; } /** * @McpApp Decorator * Marks a class as the root application module */ export declare function McpApp(options: McpAppOptions): ClassDecorator; /** * Get MCP App metadata */ export declare function getMcpAppMetadata(target: ClassConstructor): McpAppOptions | undefined; export interface PackageIdentity { name?: string; version?: string; } /** * Name and version advertised by a new MCP server. * Decorator fields win. Otherwise the project's own package.json is used. * `npm_package_*` is intentionally ignored: npm only sets it for lifecycle * scripts, and child processes inherit it from whichever package npm ran. */ export declare function resolveServerIdentity(server: { name?: string; version?: string; } | undefined, manifest?: PackageIdentity): { name: string; version: string; }; /** Reads `package.json` from `cwd` (defaults to `process.cwd()`). Missing or invalid files yield `{}`. */ export declare function readLocalPackageManifest(cwd?: string): PackageIdentity; /** * MCP Application Factory * Creates and bootstraps an MCP application */ export declare class McpApplicationFactory { /** * Create an MCP application from an app module */ static create(AppModule: ClassConstructor): Promise; } //# sourceMappingURL=app-decorator.d.ts.map