/** * Application constants * * Why: Centralized constants improve readability and maintainability. * Magic numbers scattered through code are harder to understand and change. */ /** * Time conversion constants */ export declare const TIME: { readonly MS_PER_SECOND: 1000; readonly MS_PER_MINUTE: 60000; readonly MS_PER_HOUR: 3600000; readonly SECONDS_PER_MINUTE: 60; readonly MINUTES_PER_HOUR: 60; }; /** * HTTP status codes * * Why: Named constants more readable than numeric literals. * Makes intent clear (STATUS_TOO_MANY_REQUESTS vs 429). */ export declare const HTTP_STATUS: { readonly OK: 200; readonly CREATED: 201; readonly ACCEPTED: 202; readonly NOT_MODIFIED: 304; readonly FOUND: 302; readonly MULTIPLE_CHOICES: 300; readonly BAD_REQUEST: 400; readonly UNAUTHORIZED: 401; readonly FORBIDDEN: 403; readonly NOT_FOUND: 404; readonly METHOD_NOT_ALLOWED: 405; readonly NOT_ACCEPTABLE: 406; readonly TOO_MANY_REQUESTS: 429; readonly INTERNAL_SERVER_ERROR: 500; readonly BAD_GATEWAY: 502; readonly SERVICE_UNAVAILABLE: 503; readonly GATEWAY_TIMEOUT: 504; }; /** * MIME type constants * * Why: Prevents typos in content-type headers and ensures consistency. */ export declare const MIME_TYPES: { readonly JSON: "application/json"; readonly EVENT_STREAM: "text/event-stream"; readonly FORM_URLENCODED: "application/x-www-form-urlencoded"; }; /** * OAuth and Well-Known URL paths * * Why: Centralized OAuth-related paths for consistency and easy updates. */ export declare const OAUTH_PATHS: { readonly AUTHORIZE: "/oauth/authorize"; readonly TOKEN: "/oauth/token"; readonly CALLBACK: "/oauth/callback"; readonly REGISTER: "/oauth/register"; readonly WELL_KNOWN_AUTHORIZATION_SERVER: "/.well-known/oauth-authorization-server"; readonly WELL_KNOWN_OPENID_CONFIGURATION: "/.well-known/openid-configuration"; readonly WELL_KNOWN_PROTECTED_RESOURCE: "/.well-known/oauth-protected-resource/mcp"; }; /** * Default timeout and interval values (in milliseconds) * * Why: Centralized timing configuration for sessions, heartbeats, and cleanup. */ export declare const TIMEOUTS: { readonly SESSION_TIMEOUT_MS: number; readonly HEARTBEAT_INTERVAL_MS: number; readonly RATE_LIMIT_WINDOW_MS: 60000; readonly CLEANUP_INTERVAL_MS: 60000; readonly HTTP_REQUEST_TIMEOUT_MS: number; }; /** * OAuth rate limiting defaults * * Why: Centralized OAuth rate limiting configuration to prevent duplication * and ensure consistency across mcp-server.ts and http-transport.ts */ export declare const OAUTH_RATE_LIMIT: { readonly MAX_REQUESTS: 10; readonly WINDOW_MS: 60000; }; /** * OAuth state/code cleanup defaults * * Why: Keep OAuth state lifetime independent from request rate limiting. */ export declare const OAUTH_CLEANUP: { readonly STATE_TIMEOUT_MS: number; }; /** * Proxy Credentials for local proxy mode (VS Code compatibility) * * Why: Centralized credentials allow overrides via environment variables * and prevent hardcoded secrets in the codebase. */ export declare const PROXY_CREDENTIALS: { readonly CLIENT_ID: string; readonly CLIENT_SECRET: string; }; //# sourceMappingURL=constants.d.ts.map