/** * Runtime Detection - Dual-Mode Support * * Detects execution environment and provides appropriate entry points: * - stdio MCP server (npx visus-mcp) * - AWS Lambda function (API Gateway + Lambda) * * This enables a unified codebase for both open-source and hosted tiers. */ /** * Runtime environment types */ export type RuntimeEnvironment = 'stdio' | 'lambda' | 'unknown'; /** * Runtime configuration */ export interface RuntimeConfig { environment: RuntimeEnvironment; isLambda: boolean; isStdio: boolean; region?: string; functionName?: string; } /** * Detect current runtime environment * * Detection logic: * 1. AWS_LAMBDA_FUNCTION_NAME exists → Lambda * 2. VISUS_MCP_MODE=stdio → stdio (explicit override) * 3. stdin is a TTY → unknown/error * 4. Default → stdio (MCP server mode) * * @returns Runtime configuration */ export declare function detectRuntime(): RuntimeConfig; /** * Log runtime configuration to stderr * (MCP protocol uses stdout for JSON-RPC, so logs go to stderr) * * @param config Runtime configuration */ export declare function logRuntimeConfig(config: RuntimeConfig): void; /** * Validate runtime environment is appropriate for operation * * This function logs warnings for unexpected conditions but NEVER throws errors. * This ensures the MCP server can start even in non-standard environments * (e.g., claude.ai hosted MCP runner) by defaulting to stdio mode. * * @param config Runtime configuration */ export declare function validateRuntime(config: RuntimeConfig): void; //# sourceMappingURL=runtime.d.ts.map