import { GitSync } from '../git/sync.js'; export interface SessionMeta { sessionId: string; deviceId: string; username: string; projectPath: string; createdAt: string; updatedAt: string; messageCount: number; summary: string; } export interface SessionData { meta: SessionMeta; conversation: Buffer; } /** * Manages session storage — full sessions encrypted in the git repo. * * Personal mode: * sessions/{device-id}/{session-hash}.enc * sessions/latest.enc * * Team mode — all sessions visible to all members: * sessions/{username}/{device-id}/{session-hash}.enc * sessions/latest.enc — global latest (any team member) */ export declare class SessionManager { private sync; private key; private username; private deviceId; private isTeam; constructor(sync: GitSync, key: Buffer, username: string, deviceId: string, isTeam: boolean); private sessionDir; /** * Save a full Claude Code session. */ save(projectPath: string, conversationData: Buffer, summary: string, messageCount?: number): Promise; /** * Load the latest session — in team mode this could be from any team member. */ loadLatest(): Promise; /** * Load a specific session by repo-relative path. */ load(sessionPath: string): Promise; /** * List all sessions — in team mode, across all users and devices. */ list(): Promise; /** * Recursively find and decrypt all .enc session files. */ private collectSessions; /** * List sessions filtered by username (useful in team mode). */ listByUser(username: string): Promise; /** * List sessions filtered by project path. */ listByProject(projectPath: string): Promise; /** * Purge sessions older than N days (based on meta.updatedAt). * Returns an array of purged session metas (useful for dry-run reporting). * If dryRun is true, no files are actually deleted. */ purge(olderThanDays?: number, dryRun?: boolean): Promise<{ deleted: SessionMeta[]; bytesFreed: number; }>; /** * Recursively find session files older than the cutoff date. */ private collectPurgeCandidates; } //# sourceMappingURL=manager.d.ts.map