export interface MonitorConfig {
    /** Endpoint to POST batches to. Cleared on stop(). */
    url: string;
    /** If true, capture successful network calls in addition to failures. Default false. */
    verbose?: boolean;
    /** Hard session cap. Auto-stops monitoring at this point. Default 30 minutes. */
    maxSessionMs?: number;
}
type Listener = (active: boolean, url: string | null) => void;
export declare function start(config: MonitorConfig): void;
/**
 * Stop the session AND forget it. Used when the user explicitly clicks Stop or
 * the deadline expires — clears sessionStorage so the next page load doesn't
 * resume. For host-driven teardown (AppHeader unmount, HMR) call suspend()
 * instead so resume can rehydrate.
 */
export declare function stop(): void;
/**
 * Tear down capture + transport BUT keep sessionStorage intact so the next
 * init() can resumeIfPersisted(). Used when the host (e.g. AppHeader) unmounts
 * mid-session due to a layout swap — without this, crossing Next.js route
 * groups kills the session permanently because destroy() → abort → stop()
 * would clear the persistence keys we rely on for rehydrate.
 */
export declare function suspend(): void;
export declare function probe(label: string, data?: unknown): void;
export declare function isActive(): boolean;
export declare function currentUrl(): string | null;
/**
 * Subscribe to active-state changes. Used by the panel UI to update its
 * display when start()/stop() fires.
 */
export declare function subscribe(fn: Listener): () => void;
/**
 * Resume a persisted session if one exists in sessionStorage. Called from the
 * plugin's setupOnce so an SPA reload during active monitoring doesn't drop
 * capture. No-op when no session was persisted or the deadline has passed.
 */
export declare function resumeIfPersisted(): void;
export {};
//# sourceMappingURL=session.d.ts.map