UNPKG

@luxorai/sandbox

Version:

TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud

36 lines (35 loc) • 1.42 kB
import type { Snapshot as ProtoSnapshot } from "./internal/proto/tenki/sandbox/v1/sandbox_pb.js"; import { SnapshotState as ProtoSnapshotState, SnapshotType as ProtoSnapshotType } from "./internal/proto/tenki/sandbox/v1/sandbox_pb.js"; export type SnapshotState = "UNSPECIFIED" | "CREATING" | "READY" | "FAILED" | "DELETING" | "DELETED"; export type SnapshotType = "UNSPECIFIED" | "USER" | "PAUSE" | "TEMPLATE"; export interface SnapshotDownloadURL { url: string; expiresAt?: Date; } export interface Snapshot { id: string; sessionId: string; workspaceId: string; name: string; state: SnapshotState; sizeBytes: number; compressedBytes: number; memoryBytes: number; baseImageId: string; createdAt: Date; expiresAt?: Date; tags: string[]; type: SnapshotType; cpuCores: number; memoryMb: number; diskSizeGb: number; rawImageAvailable: boolean; readonly hasRuntimeSecrets: boolean; /** Set when state is FAILED. */ failureReason?: string; } export declare function snapshotStateFromProto(state: ProtoSnapshotState): SnapshotState; export declare function snapshotIsReady(state: SnapshotState): boolean; export declare function snapshotIsTerminal(state: SnapshotState): boolean; export declare function snapshotTypeFromProto(type: ProtoSnapshotType): SnapshotType; export declare function snapshotFromProto(proto: ProtoSnapshot): Snapshot;