export interface GatewayConfig { gateway_id: string | null; instance_id: string; created_at: string; last_started_at: string; server_assigned: boolean; } /** * Gateway Configuration Manager * Manages persistent gateway and instance IDs with server-assigned ID support * * Flow: * 1. First connection: gateway_id = null, server assigns UUID * 2. auth_confirmed message contains assigned gateway_id and gateway_name * 3. Store received IDs locally for reconnections * 4. Subsequent connections: send stored gateway_id */ export declare class GatewayConfigManager { private configPath; private config; constructor(configPath?: string); /** * Get or create gateway configuration * If GATEWAY_ID env var is set, uses that (for Docker containers) * If config exists with gateway_id, returns existing IDs (reconnection) * If config doesn't exist or has no gateway_id, returns null gateway_id (first connection) */ getOrCreateConfig(): GatewayConfig; /** * Update configuration with server-assigned gateway_id * Called when auth_confirmed message is received from Type 1 server * NOTE: gateway_name is NOT stored locally - it's managed server-side only */ updateServerAssignedId(gatewayId: string): void; /** * Check if this is a first connection (no stored gateway_id) */ isFirstConnection(): boolean; /** * Load configuration from file * Returns null if file doesn't exist or is invalid */ private loadConfig; /** * Save configuration to file */ private saveConfig; /** * Get current configuration * Returns null if config hasn't been loaded/generated */ getConfig(): GatewayConfig | null; /** * Get gateway ID */ getGatewayId(): string | null; /** * Get instance ID */ getInstanceId(): string | null; /** * Reset configuration (delete config file) * Use with caution - this will force regeneration of IDs on next start */ resetConfig(): void; /** * Clear the stored gateway_id to request a new server-assigned ID * Used when ownership conflict is detected (gateway_id owned by different user) * This allows reconnection with the same API key but a fresh gateway ID */ clearGatewayId(): void; } //# sourceMappingURL=gateway-config.d.ts.map