import type { VisorConfig } from '../types/config';
import { StateMachineExecutionEngine } from '../state-machine-execution-engine';
import { Scheduler } from '../scheduler/scheduler';
type SlackSocketConfig = {
    appToken?: string;
    endpoint?: string;
    mentions?: 'direct' | 'all';
    threads?: 'required' | 'any';
    channel_allowlist?: string[];
    allowBotMessages?: boolean;
    allowGuests?: boolean;
};
export declare class SlackSocketRunner {
    private appToken;
    private endpoint;
    private mentions;
    private threads;
    private allow;
    private ws?;
    private engine;
    private cfg;
    private client?;
    private limiter?;
    private botUserId?;
    private allowBotMessages;
    private allowGuests;
    private processedKeys;
    private userInfoCache;
    private adapter?;
    private retryCount;
    private genericScheduler?;
    constructor(engine: StateMachineExecutionEngine, cfg: VisorConfig, opts: SlackSocketConfig);
    /** Hot-swap the config used for future requests (does not affect in-flight ones). */
    updateConfig(cfg: VisorConfig): void;
    /**
     * Lazily initialize the SlackClient if not already set.
     * Called by both start() and handleMessage() to ensure the client is available.
     */
    private ensureClient;
    start(): Promise<void>;
    private openConnection;
    private connect;
    private restart;
    private send;
    private matchesAllowlist;
    /**
     * Fetch and cache user info including guest status, email, and name.
     * Results are cached for 5 minutes to avoid excessive API calls.
     */
    private fetchUserInfo;
    /**
     * Check if user is a guest (single-channel or multi-channel guest).
     */
    private isGuestUser;
    private handleMessage;
    /**
     * Stop the socket runner and clean up resources
     */
    stop(): Promise<void>;
    /**
     * Get the scheduler instance
     */
    getScheduler(): Scheduler | undefined;
    /** Lazily construct a SlackAdapter for conversation context (cache-first thread fetch) */
    private getSlackAdapter;
}
export {};
//# sourceMappingURL=socket-runner.d.ts.map