@luxorai/sandbox
Version:
TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud
14 lines • 569 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.dataPlaneReadyBackoffMs = dataPlaneReadyBackoffMs;
exports.sleepReadyBackoff = sleepReadyBackoff;
function dataPlaneReadyBackoffMs(attempt) {
return Math.min(50 * (attempt + 1), 750);
}
async function sleepReadyBackoff(attempt, deadline) {
const remaining = deadline - Date.now();
if (remaining <= 0)
return;
await new Promise((resolve) => setTimeout(resolve, Math.min(dataPlaneReadyBackoffMs(attempt), remaining)));
}
//# sourceMappingURL=ready-backoff.js.map