/**
 * Per-Session State Manager
 *
 * Manages per-session directory isolation under `.specweave/state/sessions/<id>/`.
 * Each Claude Code session gets its own directory with a lock.json and optionally
 * per-session auto-mode.json for session-scoped auto mode state.
 *
 * @module core/session/session-state-manager
 */
/**
 * Validate and sanitize session ID to prevent path traversal.
 * Rejects IDs containing path separators, '..' sequences, or null bytes.
 * @throws Error if session ID is invalid
 */
export declare function validateSessionId(sessionId: string): string;
export interface SessionLock {
    pid: number;
    started_at: string;
    last_heartbeat: string;
    increments: string[];
}
/**
 * Get the sessions directory path
 */
export declare function getSessionsDir(projectRoot: string): string;
/**
 * Get the directory for a specific session
 */
export declare function getSessionDir(sessionId: string, projectRoot: string): string;
/**
 * Get the auto-mode.json path for a session, falling back to global
 */
export declare function getAutoModePath(sessionId: string | undefined, projectRoot: string): string;
/**
 * Create per-session directory with lock.json
 */
export declare function createSessionDir(sessionId: string, projectRoot: string): string;
/**
 * Bridge session ID to environment via CLAUDE_ENV_FILE
 */
export declare function bridgeSessionId(sessionId: string, envFile: string): void;
/**
 * Garbage collect dead sessions
 * Removes session directories where:
 * 1. The PID in lock.json is no longer running
 * 2. The lock.json is older than maxAgeSeconds (default 300s = 5min)
 */
export declare function gcDeadSessions(projectRoot: string, maxAgeSeconds?: number): number;
/**
 * Update heartbeat timestamp for a session
 */
export declare function touchSession(sessionId: string, projectRoot: string): void;
/**
 * Add increment claim to session
 */
export declare function claimIncrement(sessionId: string, projectRoot: string, incrementId: string): void;
//# sourceMappingURL=session-state-manager.d.ts.map