import { type BoardInfo } from './boards.js'; import { type FlasherArgs } from './esptool.js'; import { type Chip } from './firmware.js'; export declare const DEFAULT_FLASH_BAUD = 460800; export interface FlashPlanOptions { /** Serial port of the device to flash. */ port: string; /** Local ESP-IDF build directory. Mutually exclusive with `from`. */ buildDir?: string; /** Firmware source ref (release tag, branch, commit, repo, or archive URL). */ from?: string; /** Board name; auto-discovered from project dependencies if omitted. */ board?: string; /** Target chip; auto-detected via esptool if omitted. */ target?: Chip; /** Progress callback for the resolution/flash phases. */ onProgress?: (message: string) => void; } export interface FlashPlan { esptoolPath: string; flasherArgs: FlasherArgs; } /** Detect the chip type of the device on `port` via `esptool chip-id`. */ export declare function detectChip(esptoolPath: string, port: string): Promise; /** Resolve a board package from project dependencies, honoring an explicit * `--board` flag. Returns undefined when no flag is given and the project * has zero or several boards (the caller falls back to chip detection). */ export declare function discoverBoard(boardFlag: string | undefined): Promise; /** * Resolve everything needed to flash, without running esptool: the esptool * binary plus the per-chip flasher arguments (firmware files, flash mode, * etc.). Mirrors the three source modes of `mikro flash`: * - `buildDir`: a local ESP-IDF build * - `from`: a downloaded firmware ref * - neither: the prebuilt firmware bundled with this CLI version */ export declare function resolveFlashPlan(opts: FlashPlanOptions): Promise; /** * Resolve and flash firmware to completion, headlessly. Resolves on success, * rejects with the esptool failure on error. The serial port must be free * (no open session) before calling — esptool needs exclusive bootloader * access. Used by the auto-reflash flow; the interactive `mikro flash` * command renders its own live progress and only shares `resolveFlashPlan`. */ export declare function flashFirmware(opts: FlashPlanOptions & { baudRate?: number; }): Promise; //# sourceMappingURL=flashFirmware.d.ts.map