import type { EventEmitter } from "node:events";
/**
 * Attachment on a command message (image, file, etc.)
 */
export interface MessageAttachment {
    type: "image" | "file" | "document" | "audio" | "video";
    url?: string;
    localPath?: string;
    base64?: string;
    mimeType?: string;
    filename?: string;
}
/**
 * A normalized incoming message from any channel.
 */
export interface CommandMessage {
    id: string;
    channel: string;
    sender: string;
    text: string;
    attachments: MessageAttachment[];
    timestamp: string;
    /** Raw channel-specific metadata */
    meta?: Record<string, unknown>;
}
/**
 * Threading context for replies, carrying channel-specific metadata
 * from the original inbound message.
 */
export interface ReplyContext {
    messageId: string;
    meta?: Record<string, unknown>;
}
/**
 * Interface that all channel adapters must implement.
 */
export interface ChannelAdapter extends EventEmitter {
    readonly name: string;
    /** Start listening for messages */
    start(): Promise<void>;
    /** Stop listening and clean up */
    stop(): Promise<void>;
    /** Send a message to a recipient on this channel, optionally with attachments and reply threading */
    sendMessage(to: string, message: string, attachments?: MessageAttachment[], replyTo?: ReplyContext): Promise<void>;
    /** Send a typing / "working on it" indicator to the recipient (optional). */
    sendTypingIndicator?(to: string): Promise<void>;
}
/**
 * Payload emitted when a user sends a stop command (e.g. /stop on Telegram).
 */
export interface StopRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when a user sends a sleep command (e.g. /sleep 10 on Telegram).
 */
export interface SleepRequest {
    channel: string;
    sender: string;
    minutes: number;
}
/**
 * Payload emitted when a user sends a console command (e.g. /console on Telegram).
 */
export interface ConsoleRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when a user sends a restart command (e.g. /restart on Telegram).
 */
export interface RestartRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when a user sends a tunnel command (e.g. /tunnel on Telegram).
 */
export interface TunnelRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when a user sends a help command (e.g. /help on Telegram).
 */
export interface HelpRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when a user sends a status command (e.g. /status on Telegram).
 */
export interface StatusRequest {
    channel: string;
    sender: string;
    forceRefresh: boolean;
    /** Telegram chat ID for Mini App button (only set when channel is telegram). */
    chatId?: number;
}
/**
 * Payload emitted when the owner requests a backup (e.g. /backup on Telegram).
 */
export interface BackupRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when the owner toggles silent compaction mode.
 */
export interface SilentModeRequest {
    channel: string;
    sender: string;
    enabled: boolean;
}
/**
 * Payload emitted when the owner requests WeChat QR login (e.g. /weixin on Telegram).
 */
export interface WeixinLoginRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when the owner requests a tool-usage report (e.g. /usage on Telegram).
 */
export interface UsageRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when a user requests a desktop screenshot (e.g. /screenshot on Telegram).
 */
export interface ScreenshotRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when the owner requests a beta upgrade (e.g. /upgrade_beta on Telegram).
 */
export interface UpgradeBetaRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when the owner requests a dev upgrade (e.g. /upgrade_dev <tag> on Telegram).
 */
export interface UpgradeDevRequest {
    channel: string;
    sender: string;
    /** npm dist-tag to install from (e.g. "dev-feat-rdp"). */
    tag: string;
}
/**
 * Payload emitted when the owner requests a task report (e.g. /tasks on Telegram).
 */
export interface TasksRequest {
    channel: string;
    sender: string;
    /** Telegram chat ID for Mini App button (only set when channel is telegram). */
    chatId?: number;
}
/**
 * Payload emitted when the owner sends /subscribe to check subscription status.
 */
export interface SubscribeRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when the owner toggles android-use tools via /android-use on|off.
 */
export interface AndroidUseRequest {
    channel: string;
    sender: string;
    enabled: boolean;
}
/**
 * Payload emitted when the owner requests a temporary remote desktop link (e.g. /rdp on Telegram).
 */
export interface RemoteDesktopRequest {
    channel: string;
    sender: string;
    /** Optional TTL in minutes (parsed from /rdp <minutes>). Defaults to 30. */
    ttlMinutes?: number;
}
/**
 * Payload emitted when the owner requests the realtime voice Mini App (e.g. /realtime on Telegram).
 */
export interface RealtimeRequest {
    channel: string;
    sender: string;
    /** Telegram chat ID for Mini App button (only set when channel is telegram). */
    chatId?: number;
}
/**
 * Payload emitted when the owner selects a billing plan via inline keyboard.
 * The payment handler uses this to create a Stripe Checkout Session.
 */
export interface BillingPlanSelectedEvent {
    chatId: number;
    planId: string;
    planName: string;
}
/**
 * Payload emitted when the owner selects a bundle amount via inline keyboard.
 * The billing handler uses this to create a one-time Stripe Checkout Session.
 */
export interface BillingBundleSelectedEvent {
    chatId: number;
    amount: number;
}
/**
 * Payload emitted when the owner requests a context refresh (compaction) via /refresh.
 */
export interface RefreshRequest {
    channel: string;
    sender: string;
}
/**
 * Payload emitted when the owner toggles the chat monitor via /chat-monitor on|off.
 */
export interface ChatMonitorRequest {
    channel: string;
    sender: string;
    enabled: boolean;
}
/**
 * Payload emitted when the owner sends /settings to open the settings menu.
 */
export interface SetRequest {
    channel: string;
    sender: string;
    chatId: number;
}
/**
 * Payload emitted when the owner selects a language via /settings inline keyboard.
 */
export interface SetLanguageSelectedEvent {
    chatId: number;
    language: string;
}
/**
 * Payload emitted when the owner selects a timezone via /settings inline keyboard.
 */
export interface SetTimezoneSelectedEvent {
    chatId: number;
    timezone: string;
}
/**
 * Payload emitted when the owner sends a hidden /e2e command.
 */
export interface E2ERequest {
    channel: string;
    sender: string;
    rawText: string;
}
/**
 * Events emitted by channel adapters.
 */
export interface ChannelEvents {
    message: (msg: CommandMessage) => void;
    stop_request: (req: StopRequest) => void;
    sleep_request: (req: SleepRequest) => void;
    console_request: (req: ConsoleRequest) => void;
    restart_request: (req: RestartRequest) => void;
    tunnel_request: (req: TunnelRequest) => void;
    help_request: (req: HelpRequest) => void;
    status_request: (req: StatusRequest) => void;
    backup_request: (req: BackupRequest) => void;
    silent_mode_request: (req: SilentModeRequest) => void;
    weixin_login_request: (req: WeixinLoginRequest) => void;
    usage_request: (req: UsageRequest) => void;
    screenshot_request: (req: ScreenshotRequest) => void;
    upgrade_beta_request: (req: UpgradeBetaRequest) => void;
    upgrade_dev_request: (req: UpgradeDevRequest) => void;
    tasks_request: (req: TasksRequest) => void;
    subscribe_request: (req: SubscribeRequest) => void;
    android_use_request: (req: AndroidUseRequest) => void;
    refresh_request: (req: RefreshRequest) => void;
    chat_monitor_request: (req: ChatMonitorRequest) => void;
    billing_plan_selected: (event: BillingPlanSelectedEvent) => void;
    billing_bundle_selected: (event: BillingBundleSelectedEvent) => void;
    remote_desktop_request: (req: RemoteDesktopRequest) => void;
    set_request: (req: SetRequest) => void;
    set_language_selected: (event: SetLanguageSelectedEvent) => void;
    set_timezone_selected: (event: SetTimezoneSelectedEvent) => void;
    e2e_request: (req: E2ERequest) => void;
    error: (err: Error) => void;
}
//# sourceMappingURL=interface.d.ts.map