UNPKG

@luxorai/sandbox

Version:

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

28 lines (27 loc) • 1.13 kB
import type { Volume as ProtoVolume, VolumeAttachment as ProtoVolumeAttachment } from "./internal/proto/tenki/sandbox/v1/sandbox_pb.js"; import { VolumeState as ProtoVolumeState } from "./internal/proto/tenki/sandbox/v1/sandbox_pb.js"; export type VolumeState = "UNSPECIFIED" | "AVAILABLE" | "DELETING" | "DELETED" | "IN_USE"; export interface VolumeAttachment { id: string; volumeId: string; sessionId: string; mountPath: string; readOnly: boolean; state: string; } export interface Volume { id: string; workspaceId: string; name: string; sizeBytes: number; state: VolumeState; createdAt: Date; updatedAt: Date; tags: string[]; activeAttachments?: VolumeAttachment[]; } export declare function volumeStateFromProto(state: ProtoVolumeState): VolumeState; export declare function volumeIsReady(state: VolumeState): boolean; export declare function volumeIsTerminal(state: VolumeState): boolean; export declare function volumeIsDeletable(v: Volume): boolean; export declare function volumeFromProto(proto: ProtoVolume, activeAttachments?: ProtoVolumeAttachment[]): Volume;