import { EventEmitter } from "node:events";
import type { VisionClawConfig } from "../config/types.js";
import type { ChannelAdapter, CommandMessage, MessageAttachment, ReplyContext } from "./interface.js";
import type { PaymentRequiredPayload, BundlePurchasePayload } from "../billing/types.js";
import type { MessageQueue } from "./queue.js";
/**
 * Manages all enabled channel adapters.
 * Routes incoming messages to the message queue and provides
 * a unified sendMessage interface for the agent.
 */
export declare class ChannelManager extends EventEmitter {
    private adapters;
    private config;
    private queue;
    constructor(config: VisionClawConfig, queue: MessageQueue);
    /**
     * Register a channel adapter.
     */
    registerAdapter(adapter: ChannelAdapter): void;
    /**
     * Start all registered adapters.
     */
    startAll(): Promise<void>;
    /**
     * Enqueue an internal/system message and emit the normal message event.
     * This lets non-channel subsystems reuse the existing idle wake / busy
     * interrupt path without pretending to be a real external adapter.
     */
    enqueueInternalMessage(msg: CommandMessage): void;
    /**
     * Send a message through a specific channel.
     */
    sendMessage(channel: string, to: string, message: string, attachments?: MessageAttachment[], replyTo?: ReplyContext): Promise<void>;
    /**
     * Send a typing indicator through a specific channel (best-effort).
     */
    sendTypingIndicator(channel: string, to: string): Promise<void>;
    /**
     * Get a registered adapter by name.
     */
    getAdapter(name: string): ChannelAdapter | undefined;
    /**
     * Get the names of all registered (started) adapters.
     */
    getEnabledChannels(): string[];
    /**
     * Set the owner's Telegram user ID on the adapter so Telegram admin commands
     * are only accepted from the owner.
     */
    setTelegramOwnerUserId(id: number): void;
    /**
     * Drop all Telegram access-control state accumulated before the owner was
     * established. Invoked once at the tail end of the onboarding flow so
     * pre-owner traffic does not bleed into normal operation.
     */
    clearTelegramPreOwnerAccessState(): void;
    /**
     * Send a payment prompt via the Telegram adapter.
     * Shows inline keyboard with plan choices from the backend.
     */
    sendTelegramPaymentPrompt(chatId: number, payload: PaymentRequiredPayload): Promise<void>;
    /**
     * Send a Stripe Checkout link via the Telegram adapter.
     */
    sendTelegramCheckoutLink(chatId: number, planName: string, checkoutUrl: string): Promise<void>;
    /**
     * Send a bundle amount selection prompt via the Telegram adapter.
     */
    sendTelegramBundlePrompt(chatId: number, payload: BundlePurchasePayload): Promise<void>;
    /**
     * Send a Telegram Mini App (Web App) button.
     */
    sendTelegramMiniAppButton(chatId: number, text: string, buttonLabel: string, webAppUrl: string): Promise<void>;
    /**
     * Send the /settings top-level settings menu via the Telegram adapter.
     */
    sendTelegramSetMenu(chatId: number): Promise<void>;
    /**
     * Update the Discord adapter's allowed channel IDs.
     * Called after owner onboarding completes with IDs from owner.json.
     */
    setDiscordAllowedChannelIds(ids: string[]): void;
    /**
     * Stop all channel adapters.
     */
    stopAll(): Promise<void>;
}
//# sourceMappingURL=manager.d.ts.map