import type { AgentTool } from '@earendil-works/pi-agent-core'; import type { MessageBus, OutboundMessage } from '../../infra/bus/index.js'; import type { CrossChannelTargetResolution } from '../../channels/outbound-targets.js'; interface MessageContext { channel: string; chatId: string; metadata?: Record; } export interface MessageToolOptions { /** Resolve an unambiguous default recipient when `channel` is given without `chat_id`. */ resolveDefaultTarget?: (params: { channel: string; accountId?: string; }) => Promise; /** Authorizes default recipient lookup (authenticated owner endpoint or local CLI). */ canResolveDefaultTarget?: () => boolean; /** Direct verified delivery for proactive external-channel sends (surfaces channel errors). */ deliverOutbound?: (msg: OutboundMessage) => Promise; } /** * Create the send_message tool. * * NOTE: TTS (Text-to-Speech) is NOT handled by this tool. * TTS is applied at the dispatch layer via maybeApplyTtsToPayload(), not at the tool layer. * * This prevents duplicate messages (text + voice) being sent. */ export declare function createMessageTool(bus: MessageBus, getContext: () => MessageContext | null, options?: MessageToolOptions): AgentTool; export {};