/** Remote mode: connect to a BoxRun REST API */ export interface BoxLiteRemoteConfig { mode?: 'remote'; /** BoxRun REST API base URL, e.g. 'http://localhost:8090' */ apiUrl: string; /** Multi-tenant prefix (e.g. 'default') */ prefix?: string; /** Bearer token (if already obtained) */ apiToken?: string; /** OAuth2 client ID (for automatic token acquisition) */ clientId?: string; /** OAuth2 client secret (for automatic token acquisition) */ clientSecret?: string; } /** Local mode: use the official BoxLite Node.js SDK directly on this machine */ export interface BoxLiteLocalConfig { mode: 'local'; /** * @deprecated Ignored. Local mode now uses the official BoxLite Node.js SDK, * not the Python SDK bridge. */ pythonPath?: string; /** BoxLite home directory passed to the official SDK as `homeDir` */ boxliteHome?: string; } /** BoxLite adapter configuration — remote (Sandbank/BoxLite REST API) or local (Node.js SDK) */ export type BoxLiteAdapterConfig = BoxLiteRemoteConfig | BoxLiteLocalConfig; export interface BoxLiteClient { createBox(params: BoxLiteCreateParams): Promise; getBox(boxId: string): Promise; listBoxes(status?: string, pageSize?: number): Promise; deleteBox(boxId: string, force?: boolean): Promise; startBox(boxId: string): Promise; stopBox(boxId: string): Promise; exec(boxId: string, req: BoxLiteExecRequest): Promise<{ stdout: string; stderr: string; exitCode: number; }>; execStream(boxId: string, req: BoxLiteExecRequest): Promise>; uploadFiles(boxId: string, path: string, tarData: Uint8Array): Promise; downloadFiles(boxId: string, path: string): Promise>; createSnapshot(boxId: string, name: string): Promise; restoreSnapshot(boxId: string, name: string): Promise; listSnapshots(boxId: string): Promise; deleteSnapshot(boxId: string, name: string): Promise; cloneBox(boxId: string, name?: string): Promise; exportBox?(boxId: string): Promise>; importBox?(data: Uint8Array): Promise; execAsync?(boxId: string, req: BoxLiteExecRequest): Promise; getExecOutput?(boxId: string, execId: string): Promise>; sendExecInput?(boxId: string, execId: string, data: string): Promise; signalExec?(boxId: string, execId: string, signal: number): Promise; resizeExec?(boxId: string, execId: string, cols: number, rows: number): Promise; getMetrics?(): Promise>; getBoxMetrics?(boxId: string): Promise>; getConfig?(): Promise>; /** Dispose of the client (cleanup subprocess, etc.) */ dispose?(): Promise; } export interface BoxLiteBox { id: string; boxlite_id?: string; name: string | null; status: BoxStatus; created_at: string; started_at?: string | null; stopped_at?: string | null; image: string; cpu: number; memory_mb: number; disk_size_gb?: number; workdir?: string; env?: Record | null; network?: boolean | BoxLiteNetworkConfig; error_code?: string | null; error_message?: string | null; volumes?: unknown; } export type BoxStatus = 'configured' | 'running' | 'stopping' | 'stopped' | 'paused' | 'unknown'; export interface BoxLiteExecRequest { cmd: string[]; env?: Record; timeout_seconds?: number; working_dir?: string; tty?: boolean; } export interface BoxLiteExecution { id: string; box_id?: string; cmd?: string[]; status: string; exit_code: number | null; stdout?: string; stderr?: string; } export interface BoxLiteSnapshot { id: string; box_id: string; name: string; created_at: number; size_bytes: number; guest_disk_bytes?: number; container_disk_bytes?: number; } export interface BoxLiteNetworkConfig { mode: 'enabled' | 'disabled'; allow_net?: string[]; } export interface BoxLiteSecretSpec { name: string; value: string; target?: string; } export interface BoxLiteCreateParams { image?: string; /** Path to a local OCI layout directory. When set, overrides `image` (no registry pull). */ rootfs_path?: string; name?: string; cpu?: number; memory_mb?: number; disk_size_gb?: number; working_dir?: string; env?: Record; auto_remove?: boolean; security?: string; /** Port mappings [hostPort, guestPort][] for local mode */ ports?: [number, number][]; network?: BoxLiteNetworkConfig; secrets?: BoxLiteSecretSpec[]; entrypoint?: string; cmd?: string[]; user?: string; labels?: Record; } export interface BoxLiteTokenResponse { access_token: string; token_type: string; expires_in: number; } //# sourceMappingURL=types.d.ts.map