/** * Node-only readline prompt for the default approval handler. Lives * in its own file so the browser bundle can swap it for a stub via * package.json's `"browser"` field (mirroring the existing * `transport.browser.ts` / `manager.browser.ts` pattern). Keeping * the `readline` import in this file means the rest of * `approval.ts` — types, normalization, annotation merging, * `resolveApproval` — stays bundler-safe. * * The Node version reads `process.stdin` when `isTTY` is true and * deterministic-denies otherwise. The browser stub * (`_readlineApprovalPrompt.browser.ts`) always deterministic-denies * with a message explaining that the consumer must register an * explicit `ApprovalHandler`. */ import type { ApprovalDecision } from './approval.js'; /** * Prompt for a yes/no approval on stdin. Returns the resolved * {@link ApprovalDecision}. In non-TTY contexts (daemon, web worker, * CI), returns `{ decision: 'deny' }` with a typed reason explaining * how to register a custom handler. * * Concurrent invocations queue on a module-level mutex so multiple * `requireApproval`-gated tools in one `tool.request` batch don't * interleave on the shared stdin (see comment on `promptQueue`). * * The Node `readline` import is statically resolvable in this file — * which is intentional: bundlers walking `approval.ts` see the * import path (via the per-file alias in `package.json#browser`) and * substitute the browser stub instead. */ export declare function readlineApprovalPrompt(toolName: string, prompt: string): Promise; //# sourceMappingURL=_readlineApprovalPrompt.d.ts.map