export interface OnboardingResult {
    needsOnboarding: boolean;
    availableMessengers: MessengerInfo[];
    warnings?: string[];
}
export interface MessengerInfo {
    id: string;
    displayName: string;
    description: string;
}
export interface AgentCheckResult {
    available: string[];
    missing: string[];
    allMissing: boolean;
}
export interface AgentInstallHint {
    agent: string;
    /** Default install path = `npm i -g <npmPackage>`. Empty when the agent
     *  ships outside the npm registry (e.g. Antigravity's curl install) — in
     *  that case set `installCmd` to the canonical one-liner. */
    npmPackage: string;
    command: string;
    /** Optional override for the install hint string. When set, formatters
     *  use this verbatim instead of synthesising `npm i -g <npmPackage>`. */
    installCmd?: string;
}
export interface Config {
    messengers: string[];
    agents: string[];
    defaultAgent: string;
    telegram?: {
        botToken: string;
        channelId?: string;
    };
    feishu?: {
        appId: string;
        appSecret: string;
        channelId?: string;
    };
    dingtalk?: {
        clientId: string;
        clientSecret: string;
        channelId?: string;
        dmPolicy?: 'open' | 'pairing' | 'allowlist';
        groupPolicy?: 'open' | 'allowlist' | 'disabled';
        allowFrom?: string[];
        groupAllowFrom?: string[];
        ackReaction?: 'off' | 'emoji' | 'kaomoji';
        accounts?: Record<string, {
            name?: string;
            clientId?: string;
            clientSecret?: string;
            dmPolicy?: 'open' | 'pairing' | 'allowlist';
            groupPolicy?: 'open' | 'allowlist' | 'disabled';
            allowFrom?: string[];
            groupAllowFrom?: string[];
            ackReaction?: 'off' | 'emoji' | 'kaomoji';
            enabled?: boolean;
        }>;
    };
    discord?: {
        botToken: string;
        channelId?: string;
        allowedGuilds?: string[];
        allowedChannels?: string[];
    };
    acpAgents?: Array<{
        name: string;
        aliases?: string[];
        endpoint: string;
        auth?: {
            type: 'none' | 'apikey' | 'bearer';
            token?: string;
        };
        enabled?: boolean;
    }>;
    [key: string]: unknown;
}
export declare function loadConfig(): Promise<Config>;
export declare function saveConfig(config: Config): Promise<void>;
/**
 * Check if messengers are configured.
 * IMPORTANT: This checks the config.messengers array BEFORE any default fill.
 */
export declare function checkMessengerConfig(config: Config): OnboardingResult;
/**
 * Check which agents are available.
 * Result is cached with a 2-minute TTL.
 */
export declare function checkAgentAvailability(): Promise<AgentCheckResult>;
/**
 * Check if a specific agent is available.
 *
 * Uses the bulk cache when present, but falls through to a one-off probe
 * if the agent name isn't represented (e.g. agent registered after the
 * last bulk refresh). The probe result is itself cached for the TTL.
 */
export declare function isAgentAvailableCached(agentName: string): Promise<boolean>;
/**
 * Clear the agent availability caches. Useful for tests that change the
 * registry state, and for the future `/router refresh` ops command.
 */
export declare function clearAgentCache(): void;
/**
 * Generate friendly install message for missing agents
 */
export declare function formatAgentInstallHint(missing: string[]): string;
/**
 * Format error message when agent is not available
 */
export declare function formatAgentNotAvailableError(agentName: string): string;
/**
 * Interactive onboarding flow.
 * Returns updated config on success, null on failure/cancel.
 */
export declare function runMessengerOnboarding(config: Config): Promise<Config | null>;
/**
 * Format a user-friendly error message for messenger startup failures
 */
export declare function formatMessengerStartError(messengerName: string, error: unknown): string;
//# sourceMappingURL=onboarding.d.ts.map