feat: reuse Daytona sandbox leases (#8513)

Add opt-in reusable Daytona sandbox lease support, including retryable pending cleanup handling.\n\nPR: https://github.com/paperclipai/paperclip/pull/8513
This commit is contained in:
Devin Foley authored and GitHub committed 2026-06-22 19:35:53 -07:00
1 parent 2e2da3bc2f
commit cd38c150b0
15 files changed
+1106 -79

No files matched your search

+1 -1
View File
@@ -421,7 +421,7 @@ export type EnvironmentDriver = (typeof ENVIRONMENT_DRIVERS)[number];
export const ENVIRONMENT_STATUSES = ["active", "archived"] as const;
export type EnvironmentStatus = (typeof ENVIRONMENT_STATUSES)[number];
export const ENVIRONMENT_LEASE_STATUSES = ["active", "released", "expired", "failed", "retained"] as const;
export const ENVIRONMENT_LEASE_STATUSES = ["active", "released", "expired", "failed", "retained", "pending_cleanup"] as const;
export type EnvironmentLeaseStatus = (typeof ENVIRONMENT_LEASE_STATUSES)[number];
export const ENVIRONMENT_LEASE_POLICIES = [
+6
View File
@@ -138,6 +138,12 @@ export interface PluginEnvironmentDriverDeclaration {
displayName: string;
/** Optional description for operator-facing docs or UI affordances. */
description?: string;
/**
* Sandbox providers must opt in before the host retains and resumes provider
* leases across runs. Providers without this flag keep per-run acquire/release
* behavior even if their config schema exposes a reuse-like setting.
*/
supportsReusableLeases?: boolean;
/** JSON Schema describing the driver's provider-specific configuration. */
configSchema: JsonSchema;
}
+1
View File
@@ -124,6 +124,7 @@ export const pluginEnvironmentDriverDeclarationSchema = z.object({
kind: z.enum(["environment_driver", "sandbox_provider"]).optional(),
displayName: z.string().min(1).max(100),
description: z.string().max(500).optional(),
supportsReusableLeases: z.boolean().optional(),
configSchema: jsonSchemaSchema,
});