/**
 * Session persistence for Clawx.
 *
 * EXTRACTION NOTE:
 * OpenClaw's session store (config/sessions/store.ts, 400+ lines) handles:
 * - TTL-based in-memory caching (45s)
 * - Atomic disk writes with lock acquisition
 * - Legacy session key migration
 * - Delivery context normalization
 * - Entry count capping, stale pruning, disk budget enforcement
 * - File rotation on size limits
 *
 * pi-coding-agent provides a SessionManager that handles session persistence
 * with file-based storage, entries, compaction, and branching.
 *
 * For Clawx, we use a SIMPLER approach:
 * - JSON file per session in ~/.clawx/sessions/
 * - Session = id + messages + metadata
 * - Load/save by session ID
 * - List recent sessions
 * - No caching, no TTL, no locking, no rotation
 *
 * This replaces the OpenClaw session store with ~100 lines.
 */
import type { AgentMessage } from "./types.js";
import type { ClawxSession } from "../types/index.js";
interface SessionData {
    session: ClawxSession;
    messages: AgentMessage[];
}
export declare function createSessionId(): string;
export declare function saveSession(sessionDir: string, session: ClawxSession, messages: AgentMessage[]): void;
export declare function loadSession(sessionDir: string, id: string): SessionData | null;
export declare function listSessions(sessionDir: string): ClawxSession[];
export declare function getLatestSession(sessionDir: string): SessionData | null;
export {};
//# sourceMappingURL=session.d.ts.map