import { Command } from 'commander'; type ExitFn = (code: number) => never; interface RelaycastMessage { id: string; text: string; agentName?: string; createdAt?: string; agent_name?: string; created_at?: string; } interface RelaycastUnreadChannel { channelName?: string; unreadCount?: number; channel_name?: string; unread_count?: number; } interface RelaycastMention { id: string; text: string; channelName?: string; agentName?: string; createdAt?: string; channel_name?: string; agent_name?: string; created_at?: string; } interface RelaycastLastMessage { id: string; text: string; agentName?: string; agent_name?: string; createdAt?: string; created_at?: string; direction?: DmDirection; unread?: boolean; isUnread?: boolean; is_unread?: boolean; read?: boolean; isRead?: boolean; is_read?: boolean; } interface RelaycastUnreadDm { from: string; conversationId?: string; unreadCount?: number; lastMessage?: RelaycastLastMessage | null; messages?: RelaycastLastMessage[]; conversation_id?: string; unread_count?: number; last_message?: RelaycastLastMessage | null; } interface RelaycastRecentReaction { emoji: string; messageId?: string; channelName?: string; agentName?: string; createdAt?: string; message_id?: string; channel_name?: string; agent_name?: string; created_at?: string; } interface RelaycastInbox { unreadChannels?: RelaycastUnreadChannel[]; mentions?: RelaycastMention[]; unreadDms?: RelaycastUnreadDm[]; recentReactions?: RelaycastRecentReaction[]; unread_channels?: RelaycastUnreadChannel[]; unread_dms?: RelaycastUnreadDm[]; recent_reactions?: RelaycastRecentReaction[]; } interface DmConversationParticipant { agentName: string; agent_name?: string; } interface DmConversationSummary { id: string; type?: string; dm_type?: string; participants: DmConversationParticipant[]; lastMessage?: { id: string; text: string; agentName?: string; agent_name?: string; createdAt?: string; created_at?: string; } | null; last_message?: { id: string; text: string; agentName?: string; agent_name?: string; createdAt?: string; created_at?: string; } | null; unreadCount?: number; unread_count?: number; createdAt?: string; created_at?: string; } interface DmMessageItem { id: string; agentName?: string; agent_name?: string; text: string; createdAt?: string; created_at?: string; unread?: boolean; isUnread?: boolean; is_unread?: boolean; read?: boolean; isRead?: boolean; is_read?: boolean; } type DmDirection = 'inbound' | 'outbound'; export interface MessagingRelaycastClient { message(id: string): Promise; messages(channel: string, options?: { limit?: number; before?: string; after?: string; }): Promise; inbox(): Promise; dm(to: string, text: string): Promise; post(channel: string, text: string): Promise; markRead?: (messageId: string) => Promise | unknown; markMessagesRead?: (conversationId: string, messageIds: string[]) => Promise | unknown; dms: { conversations(): Promise; messages(conversationId: string, opts?: { limit?: number; }): Promise; markRead?: (conversationId: string, messageIds: string[]) => Promise | unknown; markMessagesRead?: (conversationId: string, messageIds: string[]) => Promise | unknown; }; disconnect?: () => Promise | unknown; } export interface MessagingBrokerClient { sendMessage(input: { to: string; text: string; from?: string; threadId?: string; }): Promise; shutdown(): Promise; } export interface MessagingDependencies { getProjectRoot: () => string; createClient: (cwd: string) => MessagingBrokerClient | Promise; createRelaycastClient: (options: { agentName: string; cwd: string; }) => Promise; log: (...args: unknown[]) => void; error: (...args: unknown[]) => void; exit: ExitFn; } export declare function wrapRelaycastAgentClient(agentClient: any): MessagingRelaycastClient; export declare function registerMessagingCommands(program: Command, overrides?: Partial): void; export {}; //# sourceMappingURL=messaging.d.ts.map