/** * Where runtime state lives: under `.pi/` in the project the session runs in, * never in the repository source tree. * * @author mystery4f <40482524+mystery4f@users.noreply.github.com> */ /** Runtime state root, relative to the session's working directory. */ export declare const RUNTIME_STATE_DIRECTORY: string; /** * One directory per session holds that session's task records and output * files. The session id alone names it: adding the pi process id would split a * session's history across restarts. */ export declare function sessionTaskDirectory(cwd: string, sessionId: string): string; /** One record file per session holds both kinds; `.prev` is its previous generation. */ export declare const TASK_RECORD_FILE = "tasks.json"; export declare const PREVIOUS_TASK_RECORD_FILE = "tasks.json.prev"; /** Which session's tasks are meant. Both fields come from the turn. */ export interface TaskScope { /** Directory the session runs in; its `.pi/` holds runtime state. */ cwd: string; sessionId: string; } /** The record file of one session's tasks, next to their output files. */ export declare function taskRecordPath(directory: string): string; /** The previous generation of the record file, read when the current one is corrupt. */ export declare function previousTaskRecordPath(directory: string): string; /** Output file of one process task: both streams, one file, appended in order. */ export declare function processOutputPath(directory: string, taskId: string): string;