import { ConversationManager } from '../core/conversation.js'; import { KVState } from '../state/kv-state.js'; import { type AtRestPolicy } from '../runtime/at-rest-persistence.js'; export interface AgentSessionPaths { readonly sessionsDir: string; readonly stateDir: string; } /** * AgentSession, Isolated session context for a spawned agent. * * Each agent gets its own ConversationManager, KVState namespace, * and JSONL message log file. */ export declare class AgentSession { /** The agent's unique identifier. */ readonly agentId: string; /** Guard to ensure session directory is only created once. */ private dirCreated; /** Isolated conversation history for this agent. */ readonly conversation: ConversationManager; /** KV state namespaced under agentId. */ readonly kvState: KVState; /** Path to the agent's JSONL message log. */ readonly sessionFile: string; /** The at-rest redaction + retention policy for this journal. */ private readonly atRestPolicy; constructor(agentId: string, model: string, provider: string, paths: AgentSessionPaths, atRestPolicy?: AtRestPolicy); /** * Append a message record to the agent's JSONL log. * Each record is written as a single JSON line. */ appendMessage(msg: Record): void; /** * Clean up resources held by this session. * Flushes and disposes the KV state. */ dispose(): Promise; private _ensureSessionDir; } //# sourceMappingURL=session.d.ts.map