/**
 * Unified Environment Variable Configuration Loader
 *
 * Centralizes all environment variable definitions for the Crewly backend.
 * Provides typed access, sensible defaults, and startup validation.
 *
 * Priority order:
 * 1. Environment variables (highest — for Docker/cloud deployment)
 * 2. Hardcoded defaults (for local development convenience)
 *
 * Usage:
 * ```ts
 * import { getEnvConfig, validateEnvConfig } from './env.config.js';
 *
 * const config = getEnvConfig();
 * console.log(config.supabase.url);
 *
 * // At startup, validate and fail fast:
 * const { valid, errors } = validateEnvConfig();
 * if (!valid) process.exit(1);
 * ```
 *
 * @module services/core/env.config
 */
/** Server configuration. */
export interface ServerEnvConfig {
    /** HTTP port (default: 3000) */
    port: number;
    /** Bind host (default: 'localhost') */
    host: string;
    /** Node environment (default: 'development') */
    nodeEnv: string;
}
/** Supabase project configuration. */
export interface SupabaseEnvConfig {
    /** Supabase project URL */
    url: string;
    /** Supabase anonymous key (public, RLS-protected) */
    anonKey: string;
}
/** Authentication and secrets configuration. */
export interface AuthEnvConfig {
    /** JWT signing secret for local auth */
    jwtSecret: string;
    /** Encryption key for stored OAuth tokens */
    tokenEncryptionKey: string;
}
/** Slack integration configuration. */
export interface SlackEnvConfig {
    /** Bot token (xoxb-...) */
    botToken: string;
    /** App-level token (xapp-...) */
    appToken: string;
    /** Signing secret for request verification */
    signingSecret: string;
    /** Default channel for notifications */
    defaultChannel: string;
    /** Comma-separated allowed user IDs */
    allowedUsers: string;
}
/** Google OAuth configuration. */
export interface GoogleOAuthEnvConfig {
    /** OAuth client ID */
    clientId: string;
    /** OAuth client secret */
    clientSecret: string;
    /** OAuth redirect URI */
    redirectUri: string;
}
/** WhatsApp integration configuration. */
export interface WhatsAppEnvConfig {
    /** Enable WhatsApp integration */
    enabled: boolean;
    /** Phone number for WhatsApp */
    phoneNumber: string;
    /** Auth state persistence path */
    authPath: string;
    /** Comma-separated allowed contacts */
    allowedContacts: string;
}
/** AI provider API keys. */
export interface AIEnvConfig {
    /** Gemini API key (for embeddings and Gemini CLI agents) */
    geminiApiKey: string;
}
/** CrewlyAI Cloud configuration. */
export interface CloudEnvConfig {
    /** Cloud API base URL */
    apiUrl: string;
    /** Crewly home directory */
    crewlyHome: string;
    /** Backend API URL (used by bash skills) */
    crewlyApiUrl: string;
}
/** Complete environment configuration. */
export interface EnvConfig {
    server: ServerEnvConfig;
    supabase: SupabaseEnvConfig;
    auth: AuthEnvConfig;
    slack: SlackEnvConfig;
    google: GoogleOAuthEnvConfig;
    whatsapp: WhatsAppEnvConfig;
    ai: AIEnvConfig;
    cloud: CloudEnvConfig;
}
/** Validation result. */
export interface EnvValidationResult {
    /** Whether all validations passed */
    valid: boolean;
    /** List of validation error messages */
    errors: string[];
    /** List of warning messages (non-fatal) */
    warnings: string[];
}
/**
 * Load and return the unified environment configuration.
 *
 * Reads from environment variables with sensible defaults for
 * local development. The result is cached after the first call.
 *
 * @returns Complete environment configuration
 */
export declare function getEnvConfig(): EnvConfig;
/**
 * Reset the cached config (for testing).
 */
export declare function resetEnvConfig(): void;
/**
 * Validate the current environment configuration.
 *
 * Checks for required variables in production, warns about
 * insecure defaults, and verifies value formats.
 *
 * Call at application startup and exit if `valid` is false.
 *
 * @returns Validation result with errors and warnings
 */
export declare function validateEnvConfig(): EnvValidationResult;
/**
 * Log validation results to console.
 *
 * Intended to be called once at application startup.
 *
 * @param result - Validation result from validateEnvConfig()
 */
export declare function logEnvValidation(result: EnvValidationResult): void;
//# sourceMappingURL=env.config.d.ts.map