/** * Types for Peach sync — full encrypted vault blob transfer over Noise NK. * * The wire protocol (SYNC_VAULT_SEND / SYNC_VAULT_ACK / SYNC_ERROR / * PAIR_REQUEST / PAIR_ACCEPT / PAIR_REJECT) lives on the native peer * (peach-android SyncPlugin) and is no longer modeled in the extension — * the desktop side only owns the in-popup pairing UI plus the device * registry. */ export interface TrustedNetwork { ssid?: string; bssid?: string; isTailscale: boolean; addedAt: number; } export interface PairedDevice { deviceId: string; displayName: string; x25519PublicKey: string; pairedAt: number; lastSeenAt?: number; lastSyncAt?: number; } export type SyncStatus = "synced" | "syncing" | "no_peers" | "not_trusted" | "offline"; /** * Pairing request received from a peer that needs user confirmation. * * The banner expires after 60 seconds (`expiresAt - receivedAt = 60_000`); * after that the popup hides the banner and the background drops the * request. The publicKeyHex is the peer's static X25519 identity — it * gets written to trusted devices on accept and discarded on reject. */ export interface IncomingPairingRequest { deviceName: string; publicKeyHex: string; receivedAt: number; expiresAt: number; /** * Connection id of the still-open pairing-only socket. The background's * RESPOND_INCOMING_PAIRING handler sends PAIR_ACCEPT or PAIR_REJECT over * this connection then disconnects. May be absent for synthetic test * injections that do not have a real connection behind them. */ connectionId?: string; }