/** * Leveled run logs on disk, alongside the console voice (log.ts). The console * is for watching a run live; these files are for reading one back — tracking * progress and hunting problems after the fact, at the detail you choose. * * Three files under the run's .farketari directory, each a superset of the one * below it: * - error.log — errors only (stops, crashes, decided-without-you dilemmas): * the "what went wrong" file, short enough to read top to bottom. * - info.log — errors PLUS progress (phases, sessions starting/finishing, * commands): the "what happened" file, no per-turn detail. * - debug.log — everything, including full prompts, every session sentence * and every tool call: the firehose. * * Best-effort and never fatal: if the directory is unwritable the run proceeds * with console output alone. The files are gitignored (a .gitignore is seeded * in the directory) so a run's logs never land in a commit. */ export type LogLevel = "debug" | "info" | "error"; /** * Point file logging at a run's .farketari directory. Seeds a .gitignore so * the logs stay out of git wherever farketari runs, and writes a run-boundary * marker so a resumed run's lines are separable in the appended files. Safe to * call more than once; failure disables file logging rather than breaking the run. */ export declare function initFileLogging(dir: string): void; /** * Append one line to every file at or above this level: an error line lands in * all three, an info line in info.log and debug.log, a debug line in debug.log * only. ANSI colors from the console formatting are stripped. No-op until * initFileLogging has run (e.g. in unit tests). */ export declare function logToFiles(level: LogLevel, message: string): void;