import type { Message } from "@kenkaiiii/gg-ai"; import type { SessionHeader, SessionEntry, SessionInfo } from "./types.js"; import { type SessionHeader as ManagedSessionHeader, type SessionSummary } from "./core/session-manager.js"; export interface Session { id: string; path: string; append(entry: SessionEntry): Promise; } export declare function createSession(cwd: string, provider: string, model: string, sessionsDir?: string): Promise; export declare function loadSession(sessionPath: string, sessionsDir?: string): Promise<{ header: SessionHeader; messages: Message[]; }>; /** Load every readable checkpoint generation for display replay, oldest first. */ export declare function loadSessionCheckpointChain(sessionPath: string, sessionsDir?: string): Promise>; export declare function listSessions(cwd: string, sessionsDir?: string): Promise; /** * One project's sessions, newest first, as lightweight summaries. * * Early-exit reads instead of full parses — the right call for list UIs and * remote clients, which need titles and recency rather than exact counts. */ export declare function listSessionSummaries(cwd: string, sessionsDir?: string): Promise; /** * Every session on this machine, across every project, newest first. * * Returns lightweight {@link SessionSummary}s — early-exit reads, mtime for * activity — because this scans hundreds of transcripts and callers here * (remote clients) need titles and recency, not exact message counts. */ export declare function listAllSessions(sessionsDir?: string): Promise; /** * Find a stored session anywhere on this machine by its id. * * `cwd` narrows the search to the likely directory first; a remote client that * listed sessions from one directory and reopens them from another still * resolves, which a cwd-scoped lookup cannot do. */ export declare function findSessionById(sessionId: string, cwd?: string, sessionsDir?: string): Promise; export declare function getMostRecentSession(cwd: string, sessionsDir?: string): Promise; export declare function persistMessage(session: Session, message: Message): Promise; //# sourceMappingURL=session.d.ts.map