import type { ToolResult } from "../types.js"; import type { BackgroundSpawnSpec } from "./jobs.js"; import type { ToolRunOptions } from "./tool-types.js"; import { spawnArgv } from "./shell.js"; export { formatSudoStdinPassword } from "./sudo-session.js"; export type PreparedElevation = { prepared: true; spec: BackgroundSpawnSpec; } | { prepared: false; result: ToolResult; }; export declare function preparePrivilegedBackgroundArgv(command: string, argv: string[], options: { signal?: AbortSignal | undefined; onOutput?: ToolRunOptions["onOutput"]; requestSecret?: ToolRunOptions["requestSecret"]; title?: string | undefined; prompt?: string | undefined; }, dependencies?: { available?: ((command: string) => Promise) | undefined; runAuth?: (typeof spawnArgv) | undefined; isRoot?: (() => boolean) | undefined; }): Promise; export declare function prepareElevatedBackgroundCommand(shellCommand: string, options: Parameters[2], dependencies?: Parameters[3]): Promise; export declare function tryRunElevatedWithoutTty(command: string, options: { cwd?: string | undefined; timeoutMs?: number | undefined; signal?: AbortSignal | undefined; onOutput?: ToolRunOptions["onOutput"]; requestSecret?: ToolRunOptions["requestSecret"]; }, dependencies?: { available?: ((command: string) => Promise) | undefined; run?: (typeof spawnArgv) | undefined; isRoot?: (() => boolean) | undefined; }): Promise;