import type { ModelMessage } from 'ai'; import type { Session, WorkingMemory } from '../types/index.js'; import type { SessionStore } from '../session/SessionStore.js'; import type { ConversationState } from './ConversationState.js'; export interface DefaultConversationStateConfig { sessionStore: SessionStore; defaultAgentId: string; } /** * Default conversation state implementation extracted from Runtime. * * Handles: * - Session load/create/save/delete via SessionStore * - Message appending with normalization * - Turn counting * - Working memory access */ export declare class DefaultConversationState implements ConversationState { private sessionStore; private defaultAgentId; constructor(config: DefaultConversationStateConfig); load(sessionId: string, userId?: string): Promise; save(session: Session): Promise; delete(sessionId: string): Promise; workingMemory(session: Session): WorkingMemory; appendUserMessage(session: Session, text: string): void; appendAssistantMessage(session: Session, text: string): void; appendMessage(session: Session, message: ModelMessage): void; getSessionTurn(session: Session): number; bumpSessionTurn(session: Session): number; touchSession(session: Session): void; createSession(id: string, defaultAgentId: string, userId?: string): Session; }