/** * What is left of the conversation when the console closes (operator-console/AC-5). * * The full-screen app has no scroll-back to copy from, so the conversation is printed * to the normal screen on the way out — or, past 200 lines, saved to a file only the * user can read and named instead. The file may hold code or secrets the user pasted: * it is opened `wx` with mode 0600, so an existing file or a symlink planted at the * path is refused rather than followed (design §7). * * @module */ /** Longer than this, the conversation goes to a file. */ export declare const PRINT_MAX_LINES = 200; export type Leaving = { kind: 'none'; } | { kind: 'print'; text: string; } | { kind: 'saved'; path: string; }; /** The file name for a conversation saved at `now`: sortable, and unique per process. */ export declare function transcriptName(now: Date, pid: number, attempt?: number): string; /** Write `text` to a new 0600 file in `dir`, never over an existing one. */ export declare function saveTranscript(text: string, dir?: string, now?: Date, pid?: number): string; /** Print it, save it, or say nothing (operator-console/AC-5). */ export declare function leaveConversation(lines: readonly string[], save?: (text: string) => string): Leaving; /** What `leaveConversation`'s answer prints on the normal screen. */ export declare function leavingText(l: Leaving): string; //# sourceMappingURL=transcript.d.ts.map