import { type ConversationState } from "#client/conversation-state.js"; import type { ClientSession } from "#client/session.js"; import type { MessageStreamEvent } from "#protocol/message.js"; export interface AgentStreamFollowerOptions { /** The session whose stream announced the agents; reads use its host and credentials. */ readonly session: ClientSession; readonly getState: () => ConversationState; readonly onFollowing: (sessionId: string) => void; readonly onEvent: (sessionId: string, event: MessageStreamEvent) => void; readonly onIdle: (sessionId: string) => void; readonly onUnavailable: (sessionId: string) => void; /** Retained by the transport owner across detach and reattach. */ readonly cursors: Map; } /** * Follows each agent tool's session while its task has content the conversation has not shown. * The conversation decides when a session is caught up; this class only owns transport. */ export declare class AgentStreamFollower { #private; constructor(options: AgentStreamFollowerOptions); acceptParentEvent(event: MessageStreamEvent): void; /** Starts, resumes, or pauses subscriptions to match the conversation. */ reconcile(): void; abortAll(): void; }