/** A launchpad SSO token: 64 hex characters. A bearer is a JWT, far longer and with dots. */ export declare function isSsoToken(value: string): boolean; /** * Turn an SSO token into the session it stands for. IOSense answers each SSO token once; the * exchange is shared per token (React's StrictMode runs effects twice), and only a failed one is * forgotten. Resolves with the bearer, without its `Bearer ` prefix. */ export declare function exchangeSsoToken(sso: string): Promise; /** The SSO token the URL handed over, once. */ export declare function takePendingSsoToken(): string | null; /** The bearer of the signed-in viewer, or null. */ export declare function getToken(): string | null; export declare function setToken(token: string): void; /** Sign out in this browser: the session is forgotten. */ export declare function clearToken(): void; /** True when this page runs inside another page's frame — the IOSense launchpad, normally. */ export declare function isEmbedded(): boolean; export declare const isTrustedHostOrigin: (origin: string) => boolean; /** * Ask the page this app is framed in for the viewer's session. Inside IOSense the parent answers at * once with the bearer it already has, sent to this app's origin only; anywhere else nobody answers * and this resolves null after `timeoutMs`. The question carries no secret, so it may go to any parent. */ export declare function requestHostSession(timeoutMs?: number): Promise; /** * Take the session the host handed over, and take the token out of the URL. Called once, before * the first render (`` does it). Returns how the session arrived. */ export declare function adoptHostSession(): 'sso' | 'url' | 'cookie' | 'stored' | 'none';