import { DesktopSessionCatalog } from "./desktop-session-catalog.js"; import type { DesktopCompatibility, DesktopThreadIdentity, DesktopTransportPort } from "./desktop-types.js"; export interface DesktopRuntimeOptions { storeDir: string; codexHomes: string[]; openclawBin?: string; } /** Read the installed application, never substitute the globally installed CLI version. */ export declare function installedDesktopCompatibility(): DesktopCompatibility; export declare function desktopWritesVerified(version: DesktopCompatibility): boolean; /** A command owns one connection per thread. No CLI resume or owner acquisition fallback. */ export declare function createDesktopRuntime(options: DesktopRuntimeOptions): { catalog: DesktopSessionCatalog; compatibility: DesktopCompatibility; tasks: import("./desktop-task-service.js").DesktopTaskService; responses: { respond: (input: import("./desktop-response-types.js").DesktopResponseInput) => Promise; reconcile: (id: string) => Promise; status: (id: string) => import("./desktop-response-store.js").DesktopResponseRecord; list: () => import("./desktop-response-store.js").DesktopResponseRecord[]; respondWatch(watchId: string, input: Omit): Promise; }; transport: DesktopTransportPort; controls: { permissionOptions: (identity: DesktopThreadIdentity) => Promise<{ scope: string; current: import("./desktop-session-controls.js").DesktopPermissionMode | null; defaults_changed: boolean; settings: { activePermissionProfile: { id: string; extends?: string | null; } | null | undefined; approvalPolicy: string | Record | undefined; approvalsReviewer: string | undefined; sandboxPolicy: Record | undefined; runtimeWorkspaceRoots: string[] | undefined; } | undefined; applies_to: string; choices: { id: import("./desktop-session-controls.js").DesktopPermissionMode; mode: import("./desktop-session-controls.js").DesktopPermissionMode; label: "Default" | "Full Access" | "Read Only"; description: string; }[]; }>; setPermissions: (identity: DesktopThreadIdentity, mode: import("./desktop-session-controls.js").DesktopPermissionMode) => Promise<{ scope: string; defaults_changed: boolean; requested: { mode: import("./desktop-session-controls.js").DesktopPermissionMode; }; applied: boolean; do_not_retry: boolean; outcome: string; effective: { mode: import("./desktop-session-controls.js").DesktopPermissionMode; }; } | { scope: string; defaults_changed: boolean; requested: { mode: import("./desktop-session-controls.js").DesktopPermissionMode; }; applied: boolean; do_not_retry: boolean; outcome: string; error_code: string; } | { scope: string; defaults_changed: boolean; requested: { mode: import("./desktop-session-controls.js").DesktopPermissionMode; }; applied: boolean; do_not_retry: boolean; outcome: string; effective: { mode: import("./desktop-session-controls.js").DesktopPermissionMode; }; applies_to: string; settings: { activePermissionProfile: { id: string; extends?: string | null; } | null | undefined; approvalPolicy: string | Record | undefined; approvalsReviewer: string | undefined; sandboxPolicy: Record | undefined; runtimeWorkspaceRoots: string[] | undefined; } | undefined; }>; modelOptions: (identity: DesktopThreadIdentity) => Promise<{ scope: string; current: { model: string | null; reasoning_effort: string | null; collaboration_mode: string | null; }; model_provider: string | null | undefined; catalog_available: boolean; selection_mode: string; collaboration_modes: string[]; limitations: string[]; }>; setModel: (identity: DesktopThreadIdentity, selection: import("./desktop-session-controls.js").DesktopModelSelection) => Promise<{ scope: string; defaults_changed: boolean; requested: { model: string; reasoning_effort: string; collaboration_mode?: "default" | "plan" | undefined; }; applied: boolean; do_not_retry: boolean; outcome: string; effective: { model: string | null; reasoning_effort: string | null; collaboration_mode: string | null; }; } | { scope: string; defaults_changed: boolean; requested: { model: string; reasoning_effort: string; collaboration_mode?: "default" | "plan" | undefined; }; applied: boolean; do_not_retry: boolean; outcome: string; error_code: string; }>; interrupt: (identity: DesktopThreadIdentity, expectedTurnId: string) => Promise<{ error_code?: undefined; native_turn_id: string; interrupted: boolean; state: import("./desktop-types.js").DesktopTurnStatus; outcome: string; do_not_retry: boolean; } | { native_turn_id: string; interrupted: boolean; state: string; outcome: string; do_not_retry: boolean; error_code: string; }>; }; close(): Promise; }; export type DesktopRuntime = ReturnType;