import { openTarget } from "./observer.js"; export declare const TUI_ACTION_SCHEMA = "humanish.tui-action.v1"; export interface TuiActionResult { schema: typeof TUI_ACTION_SCHEMA; ok: boolean; /** What to tell the operator. Always set: an action that appears to do nothing is a bug. */ message: string; } /** A TUI owns one evidence server, shared by its open browser tabs and closed when it exits. */ export interface TuiObserverSession { open(cwd: string, observerPath: string): Promise; close(): Promise; } /** * The library server projects the latest contained bundle on each browser poll. It can follow * captures written by another process without starting a study or recovering desktop credentials. * Keeping it in this process avoids detached viewers accumulating each time Open Observer is used. */ export declare function createTuiObserverSession(cwdInput: string, options?: { openTarget?: typeof openTarget; }): TuiObserverSession; /** * Stop a run that is still going. * * The counterpart to starting one: a study that is going nowhere costs money every turn, and until * now the only way to end it was to find the pid yourself. * * It signals the PROCESS GROUP, not the process. A run is spawned detached — its own group — and it * has children: the CLI, and whatever it spawned to reach the sandbox. Signalling only the parent * leaves those orphaned and still working. * * SIGTERM, never SIGKILL: the run's own handlers get the chance to finalize its record and release * what it holds. A killed run leaves a `running` record to go stale, which reads as interrupted — * true, but strictly less informative than a run that was told to stop. * * This stops the PROCESS. Sandboxes it created are a separate resource with their own receipts, and * `Reclaim` is what stops those — the run screen offers it as soon as this succeeds. */ export declare function stopRun(cwd: string, runId: string, intent?: "run" | "analysis"): Promise;