import type { CallbackRouteV1 } from "./callback-transport.js"; export interface DesktopCreationRequest { codexHome: string; project?: string; cwd?: string; title: string; request?: string; timeoutMs: number; callbackRoute?: CallbackRouteV1; } export interface DesktopCreationRecord { schema: "agent-knock-knock/desktop-creation"; version: 1; id: string; controllerSession: string; input: DesktopCreationRequest; status: "prepared" | "creating" | "created" | "opening" | "ready" | "uncertain" | "failed"; createdAt: string; updatedAt: string; threadId?: string; cwd?: string; projectId?: string | null; projectName?: string; openedAt?: string; errorCode?: string; watchId?: string; requestState?: "not_sent" | "uncertain" | "accepted"; nativeTitle?: string | null; /** Reservation for one live invocation; dead workers are reconciled, never blindly replayed. */ worker?: { pid: number; token: string; startedAt: string; }; } export interface DesktopCreationStore { load(id: string): DesktopCreationRecord | undefined; update(id: string, change: (record: DesktopCreationRecord | undefined) => DesktopCreationRecord): DesktopCreationRecord; } export declare function assertDesktopCreationId(value: string): void; /** Short synchronous store leases protect reservations; no lock is held across native I/O. */ export declare function createDesktopCreationStore(storeDir: string): DesktopCreationStore;