import type { TailscaleConnectStateStorage } from '@agent-wasm/tailscale-connect';
export declare const TAILSCALE_SESSION_STORAGE_KEY = "__almostnodeTailscaleState";
export type TailscaleStateSnapshot = Record<string, string>;
export interface StorageLike {
    getItem(key: string): string | null;
    setItem(key: string, value: string): void;
    removeItem(key: string): void;
}
export interface TailscaleSessionStateStore extends TailscaleConnectStateStorage {
    clear(): void;
    replace(snapshot: TailscaleStateSnapshot | null): void;
    snapshot(): TailscaleStateSnapshot | null;
}
export declare function parseTailscaleStateSnapshot(raw: string | null | undefined): TailscaleStateSnapshot | null;
export declare function serializeTailscaleStateSnapshot(snapshot: TailscaleStateSnapshot): string;
export declare function createTailscaleSessionPersistence(storage: StorageLike | null | undefined, key?: string): {
    clear(): void;
    load(): TailscaleStateSnapshot | null;
    save(snapshot: TailscaleStateSnapshot): void;
};
export declare function createTailscaleSessionStateStore(initialSnapshot: TailscaleStateSnapshot | null, onSnapshotChange?: (snapshot: TailscaleStateSnapshot | null) => void): TailscaleSessionStateStore;
//# sourceMappingURL=tailscale-session-storage.d.ts.map