type LastSessionStorage = Pick; export declare function lastSessionMemoryId(subjectId: string, workspaceId: string): string; export declare function readLastSessionId(memoryId: string, storage?: LastSessionStorage | null): string | null; export declare function rememberLastSessionId(memoryId: string, sessionId: string, storage?: LastSessionStorage | null): void; /** Forget the remembered session; with `sessionId`, only while it is still that one. */ export declare function forgetLastSessionId(memoryId: string, sessionId?: string, storage?: LastSessionStorage | null): void; /** The new-session page is now the open view: Back from Settings returns to it. */ export declare function useForgetLastSession(subjectId: string, workspaceId: string): void; /** * Remembers the session route's session once it opens and forgets it once it * is gone (not found or no longer accessible), so Back can't lead there again. * When the Back link itself brought the person to a gone session, calls * `leave` (open a new session instead of a not-found page) and returns true * so the route can skip that page. Transient load failures change nothing. */ export declare function useSessionRouteMemory(input: { subjectId: string; workspaceId: string; sessionId: string; openedSessionId: string | null; loadError: unknown; restoredSessionId: string | undefined; leave: () => void; }): boolean; export {};