export interface SendResult { result: string; costUsd: number; turns: number; /** Optional channel-level signal for transports with richer UI than plain text. */ signal?: "provider_down"; /** DB message ID for delivery status tracking (only set for agent replies) */ messageId?: number; /** Validated object, when the engine was opened with an `outputSchema`. */ structured?: unknown; } export type StreamCallback = (textSoFar: string) => void; export type ActivityCallback = (status: string) => void; export interface SendCallbacks { onStream?: StreamCallback; onActivity?: ActivityCallback; } export interface ChatEngine { sessionId: string | null; room: string; send( userMessage: string, callbacks?: SendCallbacks, attachments?: import("./attachment").Attachment[], ): Promise; close(): Promise; } export interface EngineOptions { room: string; channel: string; /** true = resume latest session, or pass a specific session ID */ resume: boolean | string; mcpServers?: Record; employee?: string; agent?: string; job?: string; /** Watch channel behavior — injected into system prompt for watch-mode engines. */ watchBehavior?: { channel: string; behavior: string }; /** JSON Schema the final answer must satisfy, enforced by whichever backend runs. */ outputSchema?: Record; }