import type { ConversationState } from "#client/conversation-state.js"; import type { EveAgentReducer, EveAgentReducerEvent } from "#client/reducer.js"; import type { MessageStreamEvent } from "#protocol/message.js"; /** * Transport facts about followed agent sessions. Only the canonical conversation receives them; * custom reducers see their results in `conversation.agents`. */ export type ClientAgentEvent = { readonly data: { readonly sessionId: string; }; readonly type: "client.agent.following" | "client.agent.idle" | "client.agent.unavailable"; } | { readonly data: { readonly event: MessageStreamEvent; readonly sessionId: string; }; readonly type: "client.agent.observed"; }; export type ConversationEvent = EveAgentReducerEvent | ClientAgentEvent; export declare function initialConversationState(): ConversationState; /** Pure reduction of accepted root and agent-session observations; followers own transport. */ export declare function reduceConversation(state: ConversationState, event: ConversationEvent): ConversationState; /** The canonical conversation's reducer, which also folds in followed agent sessions. */ export declare const canonicalConversationReducer: { initial: typeof initialConversationState; reduce: typeof reduceConversation; }; export declare const conversationReducer: EveAgentReducer;