import type { SpawnOptions } from 'node:child_process'; import { type ProcessPort } from '../platform/process.js'; interface TerminalEntry { id: string; label: string; isDefault: boolean; /** Short human-friendly description of how the launcher will spawn it. */ launchHint: string; } /** Detect every terminal emulator the launcher can target on this host. */ export declare function detectTerminals(deps?: { process?: ProcessPort; }): TerminalEntry[]; interface LaunchOptions { /** Terminal id from detectTerminals(). Required. */ terminalId: string; /** Working directory the new window should start in. Defaults to home. */ cwd?: string; /** Environment overrides — typically CLAUDE_CONFIG_DIR for profile isolation. */ env?: Record; /** Command to execute in the new window, e.g. ["claude"] or ["claude", "--resume"]. */ command: string[]; } /** * Spawn a fresh window of `opts.terminalId` running `opts.command`. The * window inherits `opts.cwd` and the merged `opts.env`. Returns * synchronously after the helper process exits; the new terminal window * stays open until the user closes it. * * Throws when the terminal id is not recognised on this platform. */ export declare function launchInTerminal(opts: LaunchOptions, deps?: { process?: ProcessPort; }): void; /** * Build exe / argv / spawn options for a Windows terminal launch. Pure, so the * shaping is unit-testable without a Windows host. `opts.env` (carries * CLAUDE_CONFIG_DIR for profile isolation) and `cwd` ride on the spawn OPTIONS * — dropping env, as the prior inline version did, opened the DEFAULT profile. * argv stays as separate elements (wt's `-d `, command trailing) instead * of one glued, quoted string wt.exe could not parse. Per-terminal command * semantics (powershell `-NoExit`, cmd `/K`) are deferred to the Windows work. */ export declare function buildWindowsLaunch(opts: LaunchOptions): { exe: string; args: string[]; options: SpawnOptions; }; export {};