export type SessionMode = 'sprint' | 'adhoc'; interface SessionState { /** Session ID for the briefing guard */ briefing_session_id?: string; /** Session ID for the post-push guard (legacy — kept for backward compat) */ push_prompted_session_id?: string; /** Number of pushes in current session (stored as string) */ push_count?: string; /** Last push command string (dedup repeated retries) */ last_push_command?: string; /** Session ID for the claim-required guard */ claim_warned_session_id?: string; /** Session ID for handoff read in explore guard */ handoff_read_session_id?: string; /** Current session mode — adhoc skips sprint-workflow guards */ session_mode?: SessionMode; /** Session ID that set the mode (mode expires when session changes) */ session_mode_id?: string; } /** Load consolidated session state. Returns empty object if missing/corrupt. */ export declare function loadSessionState(cwd: string): SessionState; /** Save consolidated session state atomically via unique tmp + rename. */ export declare function saveSessionState(cwd: string, state: SessionState): void; /** Update a single field in session state and save atomically. */ export declare function updateSessionState(cwd: string, field: keyof SessionState, value: string): void; /** Set the session mode (adhoc or sprint) for a given session. */ export declare function setSessionMode(cwd: string, sessionId: string, mode: SessionMode): void; /** Check if the current session is in adhoc mode. * Returns true if mode is explicitly 'adhoc' for this session. * Returns false if mode is 'sprint', unset, or set by a different session. */ export declare function isAdhocSession(cwd: string, sessionId: string): boolean; /** Keep pinned session mode aligned with live sprint-state. * If a sprint starts after a session was pinned adhoc, promote the session * back to sprint mode so sprint-workflow guards do not stay suppressed. */ export declare function syncSessionModeWithSprintState(cwd: string, sessionId: string): SessionMode | null; /** * Check if context has already been injected this session. * Returns null if new (caller should inject full context). * Returns a compressed reference string if duplicate. */ export declare function dedupGuardContext(cwd: string, sessionId: string, guardName: string, context: string): string | null; export {}; //# sourceMappingURL=session-state.d.ts.map