import { type LocalTerminalCommand } from "./local-terminal.js"; import { type SessionLifecycleState } from "./session-lifecycle.js"; export type NativeTerminalBackend = "iterm" | "native-terminal-app"; export type NativeTerminalSession = Readonly<{ agentSessionId: string; backend: NativeTerminalBackend; state: SessionLifecycleState; }>; export type NativeSessionIdleProof = Readonly<{ observedAtMs: number; source: string; turn: "idle"; }>; export type NativeSessionResolution = Readonly<{ proof: NativeSessionIdleProof; session: NativeTerminalSession; }>; export type NativeTerminalApplication = "iterm" | "terminal"; /** * Host-only local terminal capability for embedders. * * The public surface contains durable agent session ids and semantic state only. * Native window ids, tty paths, process ids, AppleScript references, and tmux * handles remain private to this process. */ export declare class NativeTerminalSessionHost { private readonly lifecycleStore; private readonly rollTracker; private observationPending; private readonly claudeConfigDir; private readonly resolvedSessionIds; private sessions; constructor(options?: { home?: string; claudeConfigDir?: string; }); listSessions(): Promise; private observeSessions; captureSession(agentSessionId: string, options?: { lines?: number; }): Promise; openSession(command: LocalTerminalCommand, options: { application: NativeTerminalApplication; }): Promise; hasSessionCandidate(agentSessionId: string, options: { cwd: string; }): boolean; resolveSession(agentSessionId: string, options: { cwd: string; }): Promise; relinquishSession(agentSessionId: string, proof: NativeSessionIdleProof): Promise<{ agentSessionId: string; released: true; }>; private requireSession; private observeSurfaces; }