import * as nanostores from 'nanostores'; type SessionProjectKey = string | number; type ActiveSessionStatus = "idle" | "running" | "attention-needed" | "error"; type ActiveSessionReconnectState = "idle" | "reconnecting" | "failed"; type ActiveSessionConnectionState = "disconnected" | "connecting" | "connected" | "reconnecting" | "error"; type ActiveSessionTransportMode = "websocket" | "sse" | "polling" | "custom"; interface ActiveSessionRecord { sessionId: string; projectId: SessionProjectKey | null; projectLabel?: string; title?: string; href?: string; registeredAt: number; lastActivityAt: number; lastEventAt: number | null; status: ActiveSessionStatus; isRunning: boolean; isForeground: boolean; needsAttention: boolean; connectionState: ActiveSessionConnectionState; reconnectState: ActiveSessionReconnectState; transportMode: ActiveSessionTransportMode | null; lastError: string | null; metadata?: Record; } interface ActiveSessionsState { sessions: Record; lastUpdatedAt: number; } interface RegisterActiveSessionOptions { sessionId: string; projectId?: SessionProjectKey | null; projectLabel?: string; title?: string; href?: string; metadata?: Record; } interface ActiveSessionConnectionOptions { connectionState: ActiveSessionConnectionState; reconnectState?: ActiveSessionReconnectState; transportMode?: ActiveSessionTransportMode | null; lastError?: string | null; lastEventAt?: number | null; } interface ActiveSessionActivityOptions { lastEventAt?: number | null; } interface ActiveProjectActivity { projectId: SessionProjectKey; projectLabel?: string; activeSessionCount: number; runningSessionIds: string[]; lastActivityAt: number; } declare const activeSessionsAtom: nanostores.PreinitializedWritableAtom & object; declare function registerActiveSession(options: RegisterActiveSessionOptions): void; declare function unregisterActiveSession(sessionId: string): void; declare function setForegroundActiveSession(sessionId: string | null): void; declare function updateActiveSessionMeta(sessionId: string, meta: Partial>): void; declare function setActiveSessionConnection(sessionId: string, options: ActiveSessionConnectionOptions): void; declare function setActiveSessionRunning(sessionId: string, isRunning: boolean, options?: ActiveSessionActivityOptions): void; declare function setActiveSessionAttention(sessionId: string, needsAttention: boolean, options?: ActiveSessionActivityOptions): void; declare function setActiveSessionError(sessionId: string, error: string | null): void; declare function bumpActiveSessionActivity(sessionId: string, options?: ActiveSessionActivityOptions): void; declare function resetActiveSessions(): void; declare function getAllActiveSessions(state: ActiveSessionsState): ActiveSessionRecord[]; declare function getActiveSession(state: ActiveSessionsState, sessionId: string): ActiveSessionRecord | null; declare function getSessionsForProject(state: ActiveSessionsState, projectId: SessionProjectKey): ActiveSessionRecord[]; declare function getSessionsForNavbar(state: ActiveSessionsState, projectId?: SessionProjectKey | null): ActiveSessionRecord[]; declare function getSessionsByActivity(state: ActiveSessionsState): ActiveSessionRecord[]; declare function getTotalRunningSessionCount(state: ActiveSessionsState): number; declare function hasBackgroundRunningSessions(state: ActiveSessionsState): boolean; declare function getAllProjectActivity(state: ActiveSessionsState): ActiveProjectActivity[]; declare function useActiveSessionsState(): ActiveSessionsState; declare function useActiveSessions(): ActiveSessionRecord[]; declare function useActiveSession(sessionId: string | null): ActiveSessionRecord | null; declare function useProjectSessions(projectId: SessionProjectKey | null): ActiveSessionRecord[]; declare function useNavbarSessions(projectId?: SessionProjectKey | null): ActiveSessionRecord[]; declare function useSessionsByActivity(): ActiveSessionRecord[]; declare function useProjectActivity(): ActiveProjectActivity[]; declare function useTotalRunningSessions(): number; declare function useHasBackgroundRunningSessions(): boolean; export { type ActiveProjectActivity as A, updateActiveSessionMeta as B, useActiveSession as C, useActiveSessions as D, useActiveSessionsState as E, useHasBackgroundRunningSessions as F, useNavbarSessions as G, useProjectActivity as H, useProjectSessions as I, useSessionsByActivity as J, useTotalRunningSessions as K, type RegisterActiveSessionOptions as R, type SessionProjectKey as S, type ActiveSessionActivityOptions as a, type ActiveSessionConnectionOptions as b, type ActiveSessionConnectionState as c, type ActiveSessionReconnectState as d, type ActiveSessionRecord as e, type ActiveSessionStatus as f, type ActiveSessionTransportMode as g, type ActiveSessionsState as h, activeSessionsAtom as i, bumpActiveSessionActivity as j, getActiveSession as k, getAllActiveSessions as l, getAllProjectActivity as m, getSessionsByActivity as n, getSessionsForNavbar as o, getSessionsForProject as p, getTotalRunningSessionCount as q, hasBackgroundRunningSessions as r, registerActiveSession as s, resetActiveSessions as t, setActiveSessionAttention as u, setActiveSessionConnection as v, setActiveSessionError as w, setActiveSessionRunning as x, setForegroundActiveSession as y, unregisterActiveSession as z };