import type { NotificationManager } from "./manager.ts"; export interface NotificationEventHandlers { onSessionIdle(sessionID: string, agent?: string): void; onSessionError(sessionID: string, agent?: string, error?: unknown): void; onSessionDeleted(sessionID: string): void; onMessageUpdated(sessionID: string, agent?: string): void; onChatMessage(sessionID: string, agent?: string): void; onToolBefore(sessionID: string, tool: string, args?: unknown, agent?: string): void; onDispatchComplete(sessionID: string, agent?: string): void; onLoopComplete(sessionID: string, agent?: string): void; } /** * Create thin handler functions that map rolebox events to notification * manager methods. Each handler is wrapped in try/catch and logs errors * at debug level — they are fire-and-forget and must never throw. */ export declare function createNotificationEventHandlers(manager: NotificationManager): NotificationEventHandlers; /** * Create the notification hook — an object shaped for rolebox's event * handler system. Provides: * * - `event`: async dispatcher that routes lifecycle events to the * appropriate handler based on event type string. * - `chatMessage`: direct handler for chat.message hook. * - `toolBefore`: direct handler for tool.execute.before hook. * - `dispatchComplete`: invoked from the dispatch manager. * - `loopComplete`: invoked from the loop coordinator. */ export declare function createNotificationHook(manager: NotificationManager): { event: (input: { event: { type: string; properties?: Record | undefined; }; }) => Promise; /** Handler for chat.message hook. */ chatMessage: (input: { sessionID: string; agent?: string; }) => void; /** Handler for tool.execute.before hook. */ toolBefore: (input: { tool: string; sessionID: string; callID: string; args?: unknown; agent?: string; }) => void; /** Called from the dispatch manager on completion. */ dispatchComplete: (sessionID: string, agent?: string) => void; /** Called from the loop coordinator on completion. */ loopComplete: (sessionID: string, agent?: string) => void; }; //# sourceMappingURL=hook.d.ts.map