/** Canonical secret names, accepted aliases, and model-provider mappings. */ /** * List of all canonical secret key names. * These are the "official" key names that should be used throughout the codebase. */ export declare const CANONICAL_SECRET_KEYS: readonly ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GOOGLE_API_KEY", "GROQ_API_KEY", "XAI_API_KEY", "OPENROUTER_API_KEY", "MISTRAL_API_KEY", "COHERE_API_KEY", "TOGETHER_API_KEY", "FIREWORKS_API_KEY", "PERPLEXITY_API_KEY", "DEEPSEEK_API_KEY", "ZAI_API_KEY", "MOONSHOT_API_KEY", "NEARAI_API_KEY", "CEREBRAS_API_KEY", "DISCORD_BOT_TOKEN", "DISCORD_APPLICATION_ID", "TELEGRAM_BOT_TOKEN", "SLACK_BOT_TOKEN", "SLACK_APP_TOKEN", "WHATSAPP_TOKEN", "TWITTER_USERNAME", "TWITTER_PASSWORD", "TWITTER_EMAIL", "TWITTER_2FA_SECRET", "ELEVENLABS_API_KEY", "ELEVENLABS_VOICE_ID", "ENCRYPTION_SALT", "DATABASE_URL", "OLLAMA_BASE_URL"]; /** * Type for canonical secret keys */ export type CanonicalSecretKey = (typeof CANONICAL_SECRET_KEYS)[number]; /** Maps accepted secret-key aliases to canonical names. */ export declare const SECRET_KEY_ALIASES: Record; /** * Comprehensive mapping of model provider names to their API key environment variables. * Used for detecting which AI provider is configured and for auto-enabling provider plugins. */ export declare const MODEL_PROVIDER_SECRETS: Record; /** * Model providers that don't require API keys (local inference). * These are validated differently (check for URL availability). */ export declare const LOCAL_MODEL_PROVIDERS: readonly ["ollama"]; /** * Required secrets for each communication channel. * Used to determine if a channel can be enabled. */ export declare const CHANNEL_SECRETS: Record; /** * Optional secrets for channels (enhance functionality but not required). */ export declare const CHANNEL_OPTIONAL_SECRETS: Record; /** * Resolve a secret key alias to its canonical name. * If the key is not an alias, returns the original key. */ export declare function resolveSecretKeyAlias(key: string): string; /** Get all aliases that map to a canonical key. */ export declare function getAliasesForKey(canonicalKey: string): string[]; /** * Check if a key is a canonical secret key. * * @param key - The key to check * @returns true if the key is in the canonical keys list */ export declare function isCanonicalSecretKey(key: string): key is CanonicalSecretKey; export declare function isSecretKey(key: string): boolean; export declare function deriveKnownSecrets(sources: Record): Record; /** * Get the model provider name for a given API key. * * @param apiKey - The API key environment variable name * @returns The provider name, or null if not found */ export declare function getProviderForApiKey(apiKey: string): string | null; /** Canonical validation patterns for secrets accepted by core and plugins. */ /** * Validation pattern definition */ export interface SecretValidationPattern { /** Regular expression to validate the secret format */ pattern: RegExp; /** Human-readable description of the expected format */ description: string; /** Minimum length requirement */ minLength?: number; /** Maximum length requirement */ maxLength?: number; /** * Redacted format hint. This table ships in browser bundles, so a * credential-shaped placeholder trips release secret audits. */ example?: string; } /** * Consolidated validation patterns for all secret types. * These patterns validate the format of secrets without making API calls. */ export declare const SECRET_VALIDATION_PATTERNS: Record; /** * Result of a secret validation */ export interface SecretValidationResult { /** Whether the secret is valid */ isValid: boolean; /** Error message if invalid */ error?: string; /** Warning message (valid but with caveats) */ warning?: string; /** Additional details */ details?: string; /** Timestamp of validation */ validatedAt: number; } /** * Validate a secret key/value pair. * * @param key - The secret key name * @param value - The secret value to validate * @returns Validation result */ export declare function validateSecretKey(key: string, value: string): SecretValidationResult; /** * Validate multiple secrets at once. * * @param secrets - Record of key-value pairs to validate * @returns Record of validation results */ export declare function validateSecrets(secrets: Record): Record; /** * Check if all required secrets are present and valid. * * @param secrets - Record of secrets to check * @param requiredKeys - Array of required key names * @returns Object with missing and invalid keys */ export declare function checkRequiredSecrets(secrets: Record, requiredKeys: string[]): { valid: boolean; missing: string[]; invalid: string[]; results: Record; }; /** * Infer the validation pattern key from a secret key name. * Useful for keys that might have slight variations. * * @param key - The secret key name * @returns The inferred pattern key, or the original key */ export declare function inferValidationPatternKey(key: string): string;