import { Event, EventType, BaseEvent, EventStream as IEventStream, EventStreamOptions, AgentSingleLoopReponse, AssistantStreamingMessageEvent, AssistantStreamingThinkingMessageEvent } from '@multimodal/agent-interface'; /** * Implementation of the EventStream */ export declare class EventStream implements IEventStream { private events; private options; private subscribers; private logger; constructor(options?: EventStreamOptions); /** * Create a new event with default properties * @param type The event type * @param data Additional event data */ createEvent(type: T, data: Omit, keyof BaseEvent>): Extract; /** * Seed an event to the stream * @param event The event to add or event data to create an event from */ sendEvent(event: Event): void; /** * Get all events in the stream * @param filter Optional filter for event types * @param limit Optional limit on number of events to return */ getEvents(filter?: EventType[], limit?: number): Event[]; /** * Get events by their type * @param types The event types to filter by * @param limit Optional limit on number of events to return */ getEventsByType(types: EventType[], limit?: number): Event[]; /** * Get the latest assistant response to be used for the next message */ getLatestAssistantResponse(): AgentSingleLoopReponse | null; /** * Get tool results since the last assistant message * This method is used to collect all tool results that need to be processed * for the next message in the conversation */ getLatestToolResults(): { toolCallId: string; toolName: string; content: any; }[]; /** * Clear all events from the stream */ clear(): void; /** * Subscribe to new events * @param callback Function to call when a new event is added * @returns Function to unsubscribe */ subscribe(callback: (event: Event) => void): () => void; /** * Subscribe to specific event types * @param types Array of event types to subscribe to * @param callback Function to call when a matching event is added * @returns Function to unsubscribe */ subscribeToTypes(types: EventType[], callback: (event: Event) => void): () => void; /** * Subscribe to streaming events only * @param callback Function to call when a streaming event is added * @returns Function to unsubscribe */ subscribeToStreamingEvents(callback: (event: AssistantStreamingMessageEvent | AssistantStreamingThinkingMessageEvent) => void): () => void; } //# sourceMappingURL=event-stream.d.ts.map