export type HistoryEntry = { event: "start" | "success" | "error"; command: string; args: string[]; cwd: string; error?: string; timestamp?: string; }; export declare const recordHistory: (entry: HistoryEntry) => Promise; export declare const getHistoryPath: () => string; /** One entry returned by {@link readHistory}. */ export type HistoryReadEntry = { /** The raw recorded line. */ raw: string; /** Parsed entry, or `null` when the line is not valid JSON. */ entry: HistoryEntry | null; }; /** Options for {@link readHistory}. */ export type ReadHistoryOptions = { /** Override the history log path. */ path?: string; /** Maximum number of (most-recent) entries to return. 0 or negative = all. */ limit?: number; /** Return newest-first instead of file order. */ reverse?: boolean; }; /** * Read recorded CLI history. * * A missing log file is treated as empty (nothing recorded yet), not an * error — only an unexpected read failure propagates. Entries come back * in file order (oldest first) unless `reverse` is set; `limit` keeps * the most recent N. */ export declare const readHistory: (options?: ReadHistoryOptions) => Promise; export declare const ensureHistoryFile: () => Promise;