import type { AgentToolResult } from "@earendil-works/pi-agent-core";
import type { ReplyPayload } from "../../auto-reply/reply-payload.js";
import type { InboundEventKind } from "../../channels/inbound-event/kind.js";
import type { ChannelId, ChannelThreadingToolContext } from "../../channels/plugins/types.public.js";
import type { DaoCoreConfig } from "../../config/types.daocore.js";
import type { OutboundMediaAccess, OutboundMediaReadFile } from "../../media/load-options.js";
import type { GatewayClientMode, GatewayClientName } from "../../utils/message-channel.js";
import type { OutboundSendDeps } from "./deliver.js";
import type { MessagePollResult, MessageSendResult } from "./message.js";
import type { OutboundMirror } from "./mirror.js";
export type OutboundGatewayContext = {
    url?: string;
    token?: string;
    timeoutMs?: number;
    clientName: GatewayClientName;
    clientDisplayName?: string;
    mode: GatewayClientMode;
};
export type OutboundSendContext = {
    cfg: DaoCoreConfig;
    channel: ChannelId;
    params: Record<string, unknown>;
    /** Active agent id for per-agent outbound media root scoping. */
    agentId?: string;
    sessionKey?: string;
    requesterAccountId?: string;
    requesterSenderId?: string;
    requesterSenderName?: string;
    requesterSenderUsername?: string;
    requesterSenderE164?: string;
    senderIsOwner?: boolean;
    mediaAccess?: OutboundMediaAccess;
    mediaReadFile?: OutboundMediaReadFile;
    accountId?: string | null;
    sessionId?: string;
    inboundEventKind?: InboundEventKind;
    gateway?: OutboundGatewayContext;
    toolContext?: ChannelThreadingToolContext;
    deps?: OutboundSendDeps;
    dryRun: boolean;
    mirror?: OutboundMirror;
    abortSignal?: AbortSignal;
    silent?: boolean;
};
export declare function executeSendAction(params: {
    ctx: OutboundSendContext;
    to: string;
    message: string;
    payload?: ReplyPayload;
    mediaUrl?: string;
    mediaUrls?: string[];
    asVoice?: boolean;
    gifPlayback?: boolean;
    forceDocument?: boolean;
    bestEffort?: boolean;
    replyToId?: string;
    threadId?: string | number;
}): Promise<{
    handledBy: "plugin" | "core";
    payload: unknown;
    toolResult?: AgentToolResult<unknown>;
    sendResult?: MessageSendResult;
}>;
export declare function executePollAction(params: {
    ctx: OutboundSendContext;
    resolveCorePoll: () => {
        to: string;
        question: string;
        options: string[];
        maxSelections: number;
        durationSeconds?: number;
        durationHours?: number;
        threadId?: string;
        isAnonymous?: boolean;
    };
}): Promise<{
    handledBy: "plugin" | "core";
    payload: unknown;
    toolResult?: AgentToolResult<unknown>;
    pollResult?: MessagePollResult;
}>;
