···346346 "redactedModalTokenSecret": {
347347 "type": "string",
348348 "description": "The redacted token secret for Modal, returned in API responses when the sandbox provider is Modal. This can be used to identify which Modal token secret is being used without exposing the actual token secret."
349349+ },
350350+ "e2bAccessToken": {
351351+ "type": "string",
352352+ "description": "The access token for E2B, if the sandbox provider is E2B. This is used to determine which E2B token to use when creating the sandbox."
353353+ },
354354+ "redactedE2bAccessToken": {
355355+ "type": "string",
356356+ "description": "The redacted access token for E2B, returned in API responses when the sandbox provider is E2B. This can be used to identify which E2B token is being used without exposing the actual access token."
349357 }
350358 }
351359 },
···2828 }
2929 ["provider"] = new StringType {
3030 type = "string"
3131- enum = List("daytona", "vercel", "cloudflare", "deno", "sprites", "modal")
3131+ enum = List("daytona", "vercel", "cloudflare", "deno", "sprites", "modal", "e2b")
3232 description =
3333 "The provider to create the sandbox on, e.g. 'daytona', 'vercel', 'cloudflare', etc."
3434 }
···139139 ["redactedModalTokenSecret"] = new StringType {
140140 type = "string"
141141 description = "A redacted token for accessing Modal resources"
142142+ }
143143+ ["e2bAccessToken"] = new StringType {
144144+ type = "string"
145145+ description = "A token (encrypted) for accessing E2B resources"
146146+ }
147147+ ["redactedE2bAccessToken"] = new StringType {
148148+ type = "string"
149149+ description = "A redacted token for accessing E2B resources"
142150 }
143151 }
144152 }
+10
apps/api/pkl/defs/sandbox/defs.pkl
···355355 description =
356356 "The redacted token secret for Modal, returned in API responses when the sandbox provider is Modal. This can be used to identify which Modal token secret is being used without exposing the actual token secret."
357357 }
358358+ ["e2bAccessToken"] = new StringType {
359359+ type = "string"
360360+ description =
361361+ "The access token for E2B, if the sandbox provider is E2B. This is used to determine which E2B token to use when creating the sandbox."
362362+ }
363363+ ["redactedE2bAccessToken"] = new StringType {
364364+ type = "string"
365365+ description =
366366+ "The redacted access token for E2B, returned in API responses when the sandbox provider is E2B. This can be used to identify which E2B token is being used without exposing the actual access token."
367367+ }
358368 }
359369 }
360370 ["preferences"] = new Array {
···584584 "deno",
585585 "sprites",
586586 "modal",
587587+ "e2b",
587588 ],
588589 },
589590 topics: {
···705706 redactedModalTokenSecret: {
706707 type: "string",
707708 description: "A redacted token for accessing Modal resources",
709709+ },
710710+ e2bAccessToken: {
711711+ type: "string",
712712+ description: "A token (encrypted) for accessing E2B resources",
713713+ },
714714+ redactedE2bAccessToken: {
715715+ type: "string",
716716+ description: "A redacted token for accessing E2B resources",
708717 },
709718 },
710719 },
···10871096 type: "string",
10881097 description:
10891098 "The redacted token secret for Modal, returned in API responses when the sandbox provider is Modal. This can be used to identify which Modal token secret is being used without exposing the actual token secret.",
10991099+ },
11001100+ e2bAccessToken: {
11011101+ type: "string",
11021102+ description:
11031103+ "The access token for E2B, if the sandbox provider is E2B. This is used to determine which E2B token to use when creating the sandbox.",
11041104+ },
11051105+ redactedE2bAccessToken: {
11061106+ type: "string",
11071107+ description:
11081108+ "The redacted access token for E2B, returned in API responses when the sandbox provider is E2B. This can be used to identify which E2B token is being used without exposing the actual access token.",
10901109 },
10911110 },
10921111 },
···237237 redactedModalTokenId?: string;
238238 /** The redacted token secret for Modal, returned in API responses when the sandbox provider is Modal. This can be used to identify which Modal token secret is being used without exposing the actual token secret. */
239239 redactedModalTokenSecret?: string;
240240+ /** The access token for E2B, if the sandbox provider is E2B. This is used to determine which E2B token to use when creating the sandbox. */
241241+ e2bAccessToken?: string;
242242+ /** The redacted access token for E2B, returned in API responses when the sandbox provider is E2B. This can be used to identify which E2B token is being used without exposing the actual access token. */
243243+ redactedE2bAccessToken?: string;
240244 [k: string]: unknown;
241245}
242246
···11+CREATE TABLE "e2b_auth" (
22+ "id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
33+ "sandbox_id" text NOT NULL,
44+ "user_id" text NOT NULL,
55+ "access_token" text NOT NULL,
66+ "redacted_access_token" text NOT NULL,
77+ "created_at" timestamp DEFAULT now() NOT NULL
88+);
99+--> statement-breakpoint
1010+ALTER TABLE "e2b_auth" ADD CONSTRAINT "e2b_auth_sandbox_id_sandboxes_id_fk" FOREIGN KEY ("sandbox_id") REFERENCES "public"."sandboxes"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
1111+ALTER TABLE "e2b_auth" ADD CONSTRAINT "e2b_auth_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
1212+CREATE UNIQUE INDEX "unique_e2b_auth" ON "e2b_auth" USING btree ("sandbox_id","user_id");