/** * Headless editable-TTY sudo backend. * * When there's no GUI but the node-server has a controlling terminal, the * approval gesture is a keystroke on stdin: `[a]llow once / [d]eny / [A]lways`. * Choosing "Always" then reads an editable pattern line (blank keeps the * suggested default). Fail closed: a closed stream, EOF, or any error denies. */ import type { Interface as ReadlineInterface } from 'readline'; import type { SudoBackend } from './types.js'; /** Seam for tests: build a question-asking interface over arbitrary streams. */ export interface TtyDeps { output?: NodeJS.WritableStream; createRl?: () => Pick; } /** Create the editable-TTY backend. */ export declare function createTtyBackend(deps?: TtyDeps): SudoBackend;