/** * Shared contract between the bundled stub (`humanbehavior-js/auto`, frozen in * the customer's build) and the CDN loader (`/v1/loader.js`, which we can * republish at any time). * * The stub is the half we can never fix after the fact, so everything that may * need to change later - version selection, canary split, recorder URL - lives * on the CDN side. The stub only creates this object and appends to `q`. */ export declare const GLOBAL_KEY = "__humanbehaviorLoader"; export declare const DEFAULT_CDN_URL = "https://cdn.humanbehavior.co"; /** Bump only for a change the CDN loader cannot handle compatibly. */ export declare const CONTRACT_VERSION = 1; export interface QueuedCall { /** Method name on the tracker. */ m: string; a: unknown[]; res: (value: unknown) => void; rej: (reason: unknown) => void; } export interface LoaderConfig { apiKey: string; options: Record; cdnUrl: string; /** Pin an exact recorder build instead of following the channel. */ version?: string; } export interface LoaderGlobal { v: number; q: QueuedCall[]; cfg: LoaderConfig | null; /** Real tracker instance, set by the CDN loader once the recorder is up. */ real: Record | null; /** Recorder could not be loaded (blocked, offline, bad publish). */ failed: boolean; /** * Settles once the recorder is up, or once we have given up on it. This is * what the proxy hands back for `initializationPromise`, so callers that * wait on init before calling `start()` behave the same as on a bundled * install. */ ready: Promise; /** Resolves `ready`. Called by the CDN loader, never by the host page. */ settle: () => void; } export declare function getLoaderGlobal(): LoaderGlobal; //# sourceMappingURL=globals.d.ts.map