import { type HarnessName, type SpawnOpts } from './harness-adapter'; export type LogFn = (text: string, level?: 'stdout' | 'stderr') => void; /** * Kill a spawned harness AND its whole descendant tree. Plain child.kill() * only terminates the shell wrapper (cmd.exe / sh) - npm/vitest/LSP * grandchildren survive as orphans racing future sessions (2026-08-23 * Dealership incident). * * The kill is SELECTIVE (`killTreeExcept`): browser processes are never * terminated. A harness that escalated to the browser (browser_open) must not * have that window closed when its session ends - the human closes it. * * Graceful-then-force: WM_CLOSE/SIGTERM first (allows finally blocks and lock * cleanup to run), then a force kill after 3s. This prevents stale locks from * force-killed sessions that never get a chance to call releaseLock(). */ export declare function killTree(pid: number | undefined): void; export declare function spawnHarness(harness: HarnessName, prompt: string, log: LogFn, settings?: SpawnOpts): Promise;