import { networkInterfaces } from "node:os"; /** * Stable per-installation identifier, persisted on first run. * * Read from `~/.jdcodec/machine-id` if present. Otherwise derive from * the hostname and the first non-internal network MAC, hash, persist * (mode 0600), and return. Persisting matters because the MAC-lookup * fallback can shift between runs in sandboxed environments — without * the file, the derivation would re-randomise on the affected systems * and defeat client-side dedup. * * The `py-node-` prefix is part of the file format and stays stable * across releases. Other JD Codec clients on the same machine read the * same file; rebranding the prefix would invalidate existing IDs and * fragment a single user across multiple identifiers. * * Telemetry-only — not a credential. The file is written 0600 as a * defensive default; on Windows `chmod` is a no-op (acceptable). */ export declare const MACHINE_ID_PATH: string; export interface MachineIdSource { /** Override for tests. */ path?: string; /** Override hostname for tests. */ hostname?: () => string; /** Override network interfaces for tests. */ networkInterfaces?: () => ReturnType; } export declare function stableMachineId(source?: MachineIdSource): string;