/** * Authentication Manager * Handles API key generation, validation, and agent authentication */ export interface ApiKey { key: string; agentId: string; name: string; createdAt: number; expiresAt?: number; permissions: string[]; rateLimit?: { requestsPerMinute: number; requestsPerHour: number; }; } export interface AuthConfig { enabled: boolean; requireApiKey: boolean; allowedOrigins?: string[]; defaultRateLimit?: { requestsPerMinute: number; requestsPerHour: number; }; } export declare class AuthManager { private apiKeys; private config; constructor(config: AuthConfig); /** * Generate a new API key for an agent */ generateApiKey(agentId: string, name: string, options?: { expiresIn?: number; permissions?: string[]; rateLimit?: { requestsPerMinute: number; requestsPerHour: number; }; }): string; /** * Validate an API key */ validateApiKey(key: string): { valid: boolean; apiKey?: ApiKey; reason?: string; }; /** * Revoke an API key */ revokeApiKey(key: string): boolean; /** * List all API keys for an agent */ listApiKeys(agentId?: string): ApiKey[]; /** * Check if agent has permission */ hasPermission(apiKey: ApiKey, permission: string): boolean; /** * Validate origin (CORS) */ validateOrigin(origin: string): boolean; /** * Get rate limit for API key */ getRateLimit(apiKey: ApiKey): { requestsPerMinute: number; requestsPerHour: number; }; } //# sourceMappingURL=AuthManager.d.ts.map