export interface CompanionPairingResult {
    readonly token: string;
    readonly peerId: string;
    readonly createdAt: number;
}
export interface CompanionConnectionInfo {
    readonly url: string;
    readonly token: string;
    readonly username: string;
    readonly version: string;
    readonly surface: string;
    /** Bootstrap password for companion authentication (omitted if not applicable). */
    readonly password?: string;
}
export interface CompanionTokenRecord {
    readonly token: string;
    readonly peerId: string;
    readonly createdAt: number;
}
/**
 * Load the stored companion token for a surface, or generate and persist a new one.
 */
export declare function getOrCreateCompanionToken(surface: string, options?: {
    basePath?: string;
    regenerate?: boolean;
}): CompanionPairingResult;
/**
 * Regenerate the companion token for a surface, replacing any existing token.
 */
export declare function regenerateCompanionToken(surface: string, options?: {
    basePath?: string;
}): CompanionPairingResult;
/**
 * Build a CompanionConnectionInfo object from raw parameters.
 */
export declare function buildCompanionConnectionInfo(options: {
    daemonUrl: string;
    token: string;
    username?: string;
    password?: string;
    version?: string;
    surface?: string;
}): CompanionConnectionInfo;
/**
 * Encode a CompanionConnectionInfo as a JSON string suitable for QR encoding.
 */
export declare function encodeConnectionPayload(info: CompanionConnectionInfo): string;
//# sourceMappingURL=companion-token.d.ts.map