/**
 * Remote Approval Forwarding
 *
 * Forward tool execution approval requests to messaging channels
 * (Telegram, Discord, Slack) for remote /approve or /deny.
 * OpenClaw-inspired remote authorization flow.
 */
import { EventEmitter } from 'events';
export interface ApprovalRequest {
    /** Unique request ID */
    id: string;
    /** Tool name requiring approval */
    toolName: string;
    /** Human-readable summary of what's being approved */
    summary: string;
    /** When the request was created */
    requestedAt: Date;
    /** When the request expires */
    expiresAt: Date;
    /** Current status */
    status: 'pending' | 'approved' | 'denied' | 'expired';
}
export type ChannelSendFn = (message: string) => Promise<void>;
export declare class RemoteApprovalService extends EventEmitter {
    private pending;
    private resolvers;
    private channels;
    private nextId;
    private defaultTimeoutMs;
    /**
     * Register a messaging channel for forwarding approvals
     */
    registerChannel(channelType: string, sendFn: ChannelSendFn): void;
    /**
     * Unregister a channel
     */
    unregisterChannel(channelType: string): void;
    /**
     * Check if any channels are registered
     */
    hasChannels(): boolean;
    /**
     * Request approval via remote channels.
     * Returns a promise that resolves to true (approved) or false (denied/expired).
     */
    requestApproval(req: {
        toolName: string;
        summary: string;
        timeoutMs?: number;
    }): Promise<boolean>;
    /**
     * Handle an approval response (called when user sends /approve or /deny)
     */
    handleResponse(requestId: string, approved: boolean): void;
    /**
     * Get all pending approval requests
     */
    getPending(): ApprovalRequest[];
    /**
     * Format the approval message for channels
     */
    private formatApprovalMessage;
}
export declare function getRemoteApprovalService(): RemoteApprovalService;
export declare function resetRemoteApprovalService(): void;
