export type WebhookEvent = 'agent_online' | 'agent_offline' | 'agent_idle' | 'loop_start' | 'loop_complete' | 'task_start' | 'task_done' | 'task_fail' | 'task_progress' | 'task_checkin' | 'task_output' | 'all_tasks_done' | 'rate_limit' | 'reauth_required' | 'claude_output'; export declare class WebhookClient { private readonly baseUrl; private readonly apiKey; private readonly contextId; private currentTaskId; private currentArtifactId; private meta; private _wsSender; constructor(baseUrl: string, apiKey: string, contextId?: string); setMeta(meta: Record): void; /** * Provide a WebSocket sender function. When set and connected, events will * be sent over the WS connection instead of HTTP POST — avoiding the * mismatch of POSTing to a ws:// URL. */ setWsSender(sender: (frame: unknown) => boolean): void; send(event: WebhookEvent, payload?: Record): void; private toStreamResponse; private buildMessage; } export interface DiscordEmbed { title?: string; description?: string; color?: number; footer?: { text: string; }; } /** * Send a message via the Discord bot REST API. * Uses `Authorization: Bot {token}` targeting a specific channel. * Fire-and-forget. */ export declare function sendDiscordBotMessage(botToken: string, channelId: string, content: string): void; /** POST a message to a plain Discord webhook URL. Fire-and-forget. */ export declare function sendDiscordWebhook(webhookUrl: string, content: string, embed?: DiscordEmbed): void;