@luxorai/sandbox
Version:
TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud
22 lines • 680 B
JavaScript
import { SandboxUsageUnit } from "./internal/proto/tenki/sandbox/v1/sandbox_pb.js";
function usageUnitFromProto(unit) {
switch (unit) {
case SandboxUsageUnit.COUNT:
return "count";
case SandboxUsageUnit.BYTES:
return "bytes";
default:
return "unspecified";
}
}
export function workspaceUsageLimitFromProto(limit) {
return {
key: limit.key,
label: limit.label,
unit: usageUnitFromProto(limit.unit),
current: Number(limit.current),
max: limit.max === undefined ? undefined : Number(limit.max),
helpText: limit.helpText,
};
}
//# sourceMappingURL=usage.js.map