import type { ConfigManager } from '../config/manager.js';
import type { SecretsManager } from '../config/secrets.js';
import type { ServiceRegistry } from '../config/service-registry.js';
import type { AgentManager } from '../tools/agent/index.js';
import type { SharedSessionBroker } from '../control-plane/index.js';
import type { ChannelPluginRegistry, ChannelReplyPipeline, RouteBindingManager } from '../channels/index.js';
import type { SharedApprovalRecord } from '../control-plane/index.js';
import type { PendingSurfaceReply } from './types.js';
type DeliverySurface = 'slack' | 'discord' | 'ntfy' | 'webhook' | 'homeassistant' | 'telegram' | 'google-chat' | 'signal' | 'whatsapp' | 'imessage' | 'msteams' | 'bluebubbles' | 'mattermost' | 'matrix';
type RouteBinding = import('../automation/routes.js').AutomationRouteBinding;
interface SurfaceReplyInput {
    readonly agentId: string;
    readonly task: string;
    readonly agentTask?: string | undefined;
    readonly workflowChainId?: string | undefined;
    readonly sessionId?: string | undefined;
}
interface WebhookReplyInput extends SurfaceReplyInput {
    readonly routeId?: string | undefined;
    readonly callbackUrl?: string | undefined;
    readonly callbackCorrelationId?: string | undefined;
    readonly callbackSignature?: PendingSurfaceReply['callbackSignature'] | undefined;
}
interface DaemonSurfaceDeliveryContext {
    readonly pendingSurfaceReplies: Map<string, PendingSurfaceReply>;
    readonly channelReplyPipeline: ChannelReplyPipeline;
    readonly configManager: ConfigManager;
    readonly secretsManager?: Pick<SecretsManager, 'get' | 'getGlobalHome'> | undefined;
    readonly serviceRegistry: ServiceRegistry;
    readonly agentManager: AgentManager;
    readonly sessionBroker: SharedSessionBroker;
    readonly routeBindings: RouteBindingManager;
    readonly channelPlugins: ChannelPluginRegistry;
    readonly authToken: () => string | null;
    readonly surfaceDeliveryEnabled: (surface: DeliverySurface) => boolean;
}
export declare class DaemonSurfaceDeliveryHelper {
    private readonly context;
    constructor(context: DaemonSurfaceDeliveryContext);
    queueSurfaceReplyFromBinding(binding: RouteBinding | undefined, input: SurfaceReplyInput): void;
    queueWebhookReply(input: WebhookReplyInput): void;
    pollPendingSurfaceReplies(syncFinishedAgentTask: (record: import('../tools/agent/index.js').AgentRecord) => void): Promise<void>;
    deliverSurfaceProgress(pending: PendingSurfaceReply, progress: string): Promise<void>;
    deliverSlackAgentReply(pending: PendingSurfaceReply, message: string): Promise<void>;
    deliverDiscordAgentReply(pending: PendingSurfaceReply, message: string): Promise<void>;
    deliverNtfyAgentReply(pending: PendingSurfaceReply, message: string): Promise<void>;
    deliverWebhookAgentReply(pending: PendingSurfaceReply, message: string): Promise<void>;
    notifyApprovalUpdate(approval: SharedApprovalRecord): Promise<void>;
    controlPlaneWebUrl(input: {
        readonly approvalId?: string;
        readonly sessionId?: string | undefined;
    }): string | undefined;
    signWebhookPayload(body: string, secret: string): string;
    private buildPendingSurfaceReply;
    deliverSlackApprovalUpdate(approval: SharedApprovalRecord, binding: RouteBinding): Promise<void>;
    deliverDiscordApprovalUpdate(approval: SharedApprovalRecord, binding: RouteBinding): Promise<void>;
    deliverNtfyApprovalUpdate(approval: SharedApprovalRecord, binding: RouteBinding): Promise<void>;
    deliverWebhookApprovalUpdate(approval: SharedApprovalRecord, binding: RouteBinding): Promise<void>;
    private resolveSlackWebhookUrl;
    private resolveSlackBotToken;
    private resolveConfigSecret;
    private renderAgentCompletionForSurface;
}
export {};
//# sourceMappingURL=surface-delivery.d.ts.map