UNPKG

@vfarcic/dot-ai

Version:

AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance

51 lines 1.66 kB
/** * Session Event Bus - Real-time event infrastructure for session lifecycle changes * * Interface-based event bus that broadcasts session state changes for any tool. * Default implementation uses in-memory Node.js EventEmitter. * Can be swapped to NATS or another external bus via setSessionEventBus(). * * PRD #425: Session List API and SSE Streaming for Remediation Events */ /** * Event payload for session state changes */ export interface SessionEvent { sessionId: string; toolName: string; status: string; issue: string; timestamp: string; } /** * Supported event types */ export type SessionEventType = 'session-created' | 'session-updated'; /** * Event handler function signature */ export type SessionEventHandler = (event: SessionEvent) => void; /** * Event name constants */ export declare const SESSION_EVENTS: { readonly SESSION_CREATED: SessionEventType; readonly SESSION_UPDATED: SessionEventType; }; /** * Abstract event bus interface. Swap implementations by calling setSessionEventBus(). */ export interface SessionEventBus { publish(eventType: SessionEventType, event: SessionEvent): void; subscribe(eventType: SessionEventType, handler: SessionEventHandler): void; unsubscribe(eventType: SessionEventType, handler: SessionEventHandler): void; } /** * Get the active session event bus singleton */ export declare function getSessionEventBus(): SessionEventBus; /** * Replace the session event bus implementation (for testing or switching to external bus) */ export declare function setSessionEventBus(bus: SessionEventBus): void; //# sourceMappingURL=session-events.d.ts.map