/** * Prompt resolution utilities for q/x commands. * * Supports three input channels: * 1. --prompt-file — read content from a file * 2. stdin pipe/redirect — read from process.stdin when not a TTY * 3. argv prompt — positional argument passed directly on the command line * * When multiple sources are present, argv is used as a short label/prefix * and the file/stdin content is appended after a blank line. */ /** * Read all bytes from stdin (pipe or redirect). * Returns empty string when stdin is a TTY (interactive terminal). */ export declare function readStdin(): Promise; /** * Resolve the final prompt from argv, stdin pipe, or --prompt-file. * * Priority: * 1. promptFile is specified → read file content * 2. argv is present → use argv (stdin is NOT read — prevents hang in child processes) * 3. argv is empty, no promptFile → read stdin pipe/redirect * 4. argv + promptFile both present → `${argv}\n\n${fileContent}` * 5. Neither present → return '' (caller decides error handling) * * @param _readStdin - injectable stdin reader, defaults to the module-level * readStdin. Exposed as a parameter so unit tests can substitute a stub * without fighting ESM module binding rules. */ export declare function resolvePrompt(argvPrompt: string, promptFile?: string, _readStdin?: () => Promise): Promise;