/**
 * ADHDev State Store — Runtime state persistence
 *
 * Separates volatile runtime state (sessions, activity, read markers)
 * from static configuration (config.json).
 *
 * State is stored in ~/.adhdev/state.json
 */
import type { RecentActivityEntry } from './recent-activity.js';
import type { SavedProviderSessionEntry } from './saved-sessions.js';
export interface DaemonState {
    /** Unified recent activity across IDE / CLI / ACP launch flows */
    recentActivity: RecentActivityEntry[];
    /** Persistent resume-capable provider sessions keyed by providerSessionId */
    savedProviderSessions: SavedProviderSessionEntry[];
    /** Last seen timestamps for live sessions, keyed by sessionId */
    sessionReads: Record<string, number>;
    /** Last seen completion marker for live sessions, keyed by sessionId */
    sessionReadMarkers: Record<string, string>;
    /** Current notification dismissal ids keyed by stable session target */
    sessionNotificationDismissals: Record<string, string>;
    /** Current notification unread override ids keyed by stable session target */
    sessionNotificationUnreadOverrides: Record<string, string>;
    /**
     * Resolved provider-native conversation id for a live session, keyed by the
     * ADHDev/mesh session id. Persisted so it survives a daemon restart: a
     * provider whose on-disk store is keyed by an internally-generated id it
     * never exposes on the CLI (antigravity — no --session-id) can then exact-bind
     * its conversation .db after restart instead of re-running the mtime/recency
     * heuristic, which drops the store once idle and collapses read_chat to the
     * PTY parse (user echo only, assistant tail lost). Mirrors the in-memory read
     * pin (chat-commands-read lastBoundProviderSessionIdByMeshSession).
     */
    sessionProviderSessionPins: Record<string, string>;
}
/**
 * Load runtime state from disk
 */
export declare function loadState(): DaemonState;
/**
 * Save runtime state to disk
 */
export declare function saveState(state: DaemonState): void;
/**
 * Reset runtime state
 */
export declare function resetState(): void;
/**
 * Load the full persisted session→provider-conversation pin map (sessionId →
 * provider-native conversation id). Survives daemon restart. Empty object when
 * none recorded or the state file is unreadable.
 */
export declare function loadPersistedProviderSessionPins(): Record<string, string>;
/**
 * Persist one session→provider-conversation pin. Load-mutate-save against the
 * on-disk state so it survives a daemon restart; a no-op when the value already
 * matches (avoids rewriting state.json on every read). Never clears a pin with an
 * empty value.
 */
export declare function recordPersistedProviderSessionPin(sessionId: string, providerSessionId: string): void;
/**
 * Test-only: drop all persisted session→provider-conversation pins from disk.
 * Used by tests that assert a clean "no pin" state so a sibling test's write to
 * the shared per-process ADHDEV_CONFIG_DIR does not leak in.
 */
export declare function clearPersistedProviderSessionPins(): void;
