import type { OpenGoatPaths } from "../../domain/opengoat-paths.js"; import type { CommandRunnerPort } from "../../ports/command-runner.port.js"; import type { FileSystemPort } from "../../ports/file-system.port.js"; import type { PathPort } from "../../ports/path.port.js"; import { type SessionHistoryItem, type SessionRemoveResult, type SessionRunInfo, type SessionSummary } from "../domain/session.js"; interface SessionServiceDeps { fileSystem: FileSystemPort; pathPort: PathPort; commandRunner?: CommandRunnerPort; nowIso?: () => string; nowMs?: () => number; } export interface PrepareSessionRunRequest { sessionRef?: string; forceNew?: boolean; disableSession?: boolean; userMessage: string; } export type PreparedSessionRun = { enabled: false; } | { enabled: true; info: SessionRunInfo; compactionApplied: boolean; }; export interface SessionHistoryResult { sessionKey: string; sessionId?: string; transcriptPath?: string; messages: SessionHistoryItem[]; } export interface SessionCompactionResult { sessionKey: string; sessionId: string; transcriptPath: string; applied: boolean; summary?: string; compactedMessages: number; } export interface AgentLastAction { agentId: string; sessionKey: string; sessionId: string; transcriptPath: string; timestamp: number; } export declare class SessionService { private readonly fileSystem; private readonly pathPort; private readonly commandRunner?; private readonly nowIso; private readonly nowMs; constructor(deps: SessionServiceDeps); prepareRunSession(paths: OpenGoatPaths, agentId: string, request: PrepareSessionRunRequest): Promise; recordAssistantReply(paths: OpenGoatPaths, info: SessionRunInfo, content: string): Promise; listSessions(paths: OpenGoatPaths, agentId: string, options?: { activeMinutes?: number; }): Promise; getLastAgentAction(paths: OpenGoatPaths, agentId: string): Promise; renameSession(paths: OpenGoatPaths, agentId: string, title: string, sessionRef?: string): Promise; removeSession(paths: OpenGoatPaths, agentId: string, sessionRef?: string): Promise; getSessionHistory(paths: OpenGoatPaths, agentId: string, options?: { sessionRef?: string; limit?: number; includeCompaction?: boolean; }): Promise; resetSession(paths: OpenGoatPaths, agentId: string, sessionRef?: string): Promise; compactSession(paths: OpenGoatPaths, agentId: string, sessionRef?: string): Promise; private compactSessionInternal; private appendMessage; private ensureTranscriptHeader; private readStore; private persistStore; private readTranscriptRecords; private writeTranscriptRecords; private readSessionConfig; } export {};