import { createDesktopCreationRpc } from "./desktop-creation-rpc.js"; import type { DesktopCompatibility } from "./desktop-types.js"; /** Recorded test evidence only; creation authorization comes from the live bundled protocol. */ export declare const VERIFIED_DESKTOP_CREATION_BUILD: Readonly<{ version: "26.1007.30912"; build: "20156"; backendVersion: "0.162.0-alpha.17.2"; }>; export declare const VERIFIED_DESKTOP_CREATION_BUILDS: readonly (Readonly<{ version: "26.1007.30912"; build: "20156"; backendVersion: "0.162.0-alpha.17.2"; }> | Readonly<{ version: "26.1007.71326"; build: "20398"; backendVersion: "0.162.0-alpha.17.2"; }>)[]; export type DesktopCreationDispatchState = "not_sent" | "unknown" | "created"; export declare class DesktopCreationNativeError extends Error { readonly code: string; readonly dispatchState: DesktopCreationDispatchState; readonly threadId?: string | undefined; readonly requestId?: number | undefined; readonly method?: string | undefined; readonly rpcCode?: number | undefined; constructor(code: string, message: string, dispatchState?: DesktopCreationDispatchState, threadId?: string | undefined, requestId?: number | undefined, method?: string | undefined, rpcCode?: number | undefined); } export interface DesktopCreationProject { id: string; name: string; roots: string[]; } export interface DesktopCreatedThread { threadId: string; cwd: string; projectId: string | null; title: string | null; } export interface DesktopCreationMetadata { appPath: string; binaryPath: string; codexHome: string; backendVersion: string; appVersion: string; appBuild: string; /** Historical test evidence, never permission to create a thread. */ testedBuild?: boolean; } export interface DesktopCreationNativeOptions { codexHome: string; /** Discovery snapshot; the bundled process supplies the live identity evidence. */ compatibility: DesktopCompatibility; appPath?: string; timeoutMs?: number; /** Dependency seams for isolated protocol tests; production uses the actual bundle and process. */ inspectApplication?: (appPath: string) => Omit; rpcFactory?: typeof createDesktopCreationRpc; } export interface DesktopCreationInput { cwd: string; projectId?: string; title?: string; beforeDispatch?: () => void | Promise; onCreated?: (receipt: DesktopCreatedThread) => void | Promise; approvalPolicy?: "on-request" | "untrusted"; sandbox?: "read-only" | "workspace-write"; } export interface DesktopCreationNative { metadata: DesktopCreationMetadata; projects(): Promise; resolveProject(selector: { projectId?: string; projectName?: string; cwd?: string; }): Promise<{ project: DesktopCreationProject; cwd: string; }>; create(input: DesktopCreationInput): Promise; read(threadId: string): Promise; close(): Promise; } /** Creates metadata only. A user task must be sent through the original Desktop owner after handoff. */ export declare function createDesktopCreationNative(options: DesktopCreationNativeOptions): Promise;