export type AliasResult = { ok: true; } | { ok: false; error: string; }; export declare function deviceAliasesFilePath(): string; /** Read the serial→name map. A missing or malformed file yields an empty map. */ export declare function readDeviceAliases(): Record; export declare function getDeviceAlias(serialNumber: string | undefined): string | undefined; /** Alias for a firmware-reported device id, matched back to an aliased serial * via deviceIdFromSerial — no live USB serial needed. */ export declare function getDeviceAliasByDeviceId(deviceId: string | null | undefined): string | undefined; /** * The intrinsic, generated name (no alias): a stable suggested name derived * from the device id, so every identifiable board always has one. Undefined * only when there's nothing to seed from. This never changes when an alias is * set — the alias shadows it for display, but the name stays. Pass the * firmware-reported deviceId to resolve bridge boards whose serial isn't the * chip MAC. */ export declare function deviceGeneratedName(serialNumber: string | undefined, deviceId?: string | null): string | undefined; /** * What to show for a board: its alias if set, else the generated name, else * "(unknown)". The alias takes precedence but doesn't replace the name (see * deviceGeneratedName). */ export declare function deviceDisplayName(serialNumber: string | undefined, deviceId?: string | null): string; /** Names must be unique so they can stand in for `--port`. */ export declare function setDeviceAlias(serialNumber: string, name: string): AliasResult; /** Remove an alias by name or by serial. */ export declare function removeDeviceAlias(token: string): AliasResult; /** Resolve a `--port` token, in order: exact path, displayed name, raw serial, * then derived/cached device id. Undefined if nothing matches. */ export declare function matchPortToken(devices: T[], token: string): T | undefined; //# sourceMappingURL=deviceAliases.d.ts.map