the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename E2B access token fields to API key

+2312 -103
+4 -4
apps/api/lexicons/sandbox/createSandbox.json
··· 145 145 "type": "string", 146 146 "description": "A redacted token for accessing Modal resources" 147 147 }, 148 - "e2bAccessToken": { 148 + "e2bApiKey": { 149 149 "type": "string", 150 - "description": "A token (encrypted) for accessing E2B resources" 150 + "description": "An API KEY (encrypted) for accessing E2B resources" 151 151 }, 152 - "redactedE2bAccessToken": { 152 + "redactedE2bApiKey": { 153 153 "type": "string", 154 - "description": "A redacted token for accessing E2B resources" 154 + "description": "A redacted API KEY for accessing E2B resources" 155 155 } 156 156 } 157 157 }
+4 -4
apps/api/lexicons/sandbox/defs.json
··· 347 347 "type": "string", 348 348 "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." 349 349 }, 350 - "e2bAccessToken": { 350 + "e2bApiKey": { 351 351 "type": "string", 352 - "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." 352 + "description": "The API KEY for E2B, if the sandbox provider is E2B. This is used to determine which E2B API KEY to use when creating the sandbox." 353 353 }, 354 - "redactedE2bAccessToken": { 354 + "redactedE2bApiKey": { 355 355 "type": "string", 356 - "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." 356 + "description": "The redacted API KEY for E2B, returned in API responses when the sandbox provider is E2B. This can be used to identify which E2B API KEY is being used without exposing the actual API KEY." 357 357 } 358 358 } 359 359 },
+4 -4
apps/api/pkl/defs/sandbox/createSandbox.pkl
··· 140 140 type = "string" 141 141 description = "A redacted token for accessing Modal resources" 142 142 } 143 - ["e2bAccessToken"] = new StringType { 143 + ["e2bApiKey"] = new StringType { 144 144 type = "string" 145 - description = "A token (encrypted) for accessing E2B resources" 145 + description = "An API KEY (encrypted) for accessing E2B resources" 146 146 } 147 - ["redactedE2bAccessToken"] = new StringType { 147 + ["redactedE2bApiKey"] = new StringType { 148 148 type = "string" 149 - description = "A redacted token for accessing E2B resources" 149 + description = "A redacted API KEY for accessing E2B resources" 150 150 } 151 151 } 152 152 }
+4 -4
apps/api/pkl/defs/sandbox/defs.pkl
··· 355 355 description = 356 356 "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." 357 357 } 358 - ["e2bAccessToken"] = new StringType { 358 + ["e2bApiKey"] = new StringType { 359 359 type = "string" 360 360 description = 361 - "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." 361 + "The API KEY for E2B, if the sandbox provider is E2B. This is used to determine which E2B API KEY to use when creating the sandbox." 362 362 } 363 - ["redactedE2bAccessToken"] = new StringType { 363 + ["redactedE2bApiKey"] = new StringType { 364 364 type = "string" 365 365 description = 366 - "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." 366 + "The redacted API KEY for E2B, returned in API responses when the sandbox provider is E2B. This can be used to identify which E2B API KEY is being used without exposing the actual API KEY." 367 367 } 368 368 } 369 369 }
+9 -8
apps/api/src/lexicon/lexicons.ts
··· 707 707 type: "string", 708 708 description: "A redacted token for accessing Modal resources", 709 709 }, 710 - e2bAccessToken: { 710 + e2bApiKey: { 711 711 type: "string", 712 - description: "A token (encrypted) for accessing E2B resources", 712 + description: 713 + "An API KEY (encrypted) for accessing E2B resources", 713 714 }, 714 - redactedE2bAccessToken: { 715 + redactedE2bApiKey: { 715 716 type: "string", 716 - description: "A redacted token for accessing E2B resources", 717 + description: "A redacted API KEY for accessing E2B resources", 717 718 }, 718 719 }, 719 720 }, ··· 1097 1098 description: 1098 1099 "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.", 1099 1100 }, 1100 - e2bAccessToken: { 1101 + e2bApiKey: { 1101 1102 type: "string", 1102 1103 description: 1103 - "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.", 1104 + "The API KEY for E2B, if the sandbox provider is E2B. This is used to determine which E2B API KEY to use when creating the sandbox.", 1104 1105 }, 1105 - redactedE2bAccessToken: { 1106 + redactedE2bApiKey: { 1106 1107 type: "string", 1107 1108 description: 1108 - "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.", 1109 + "The redacted API KEY for E2B, returned in API responses when the sandbox provider is E2B. This can be used to identify which E2B API KEY is being used without exposing the actual API KEY.", 1109 1110 }, 1110 1111 }, 1111 1112 },
+4 -4
apps/api/src/lexicon/types/io/pocketenv/sandbox/createSandbox.ts
··· 73 73 modalTokenSecret?: string; 74 74 /** A redacted token for accessing Modal resources */ 75 75 redactedModalTokenSecret?: string; 76 - /** A token (encrypted) for accessing E2B resources */ 77 - e2bAccessToken?: string; 78 - /** A redacted token for accessing E2B resources */ 79 - redactedE2bAccessToken?: string; 76 + /** An API KEY (encrypted) for accessing E2B resources */ 77 + e2bApiKey?: string; 78 + /** A redacted API KEY for accessing E2B resources */ 79 + redactedE2bApiKey?: string; 80 80 [k: string]: unknown; 81 81 } 82 82
+4 -4
apps/api/src/lexicon/types/io/pocketenv/sandbox/defs.ts
··· 237 237 redactedModalTokenId?: string; 238 238 /** 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. */ 239 239 redactedModalTokenSecret?: string; 240 - /** 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. */ 241 - e2bAccessToken?: string; 242 - /** 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. */ 243 - redactedE2bAccessToken?: string; 240 + /** The API KEY for E2B, if the sandbox provider is E2B. This is used to determine which E2B API KEY to use when creating the sandbox. */ 241 + e2bApiKey?: string; 242 + /** The redacted API KEY for E2B, returned in API responses when the sandbox provider is E2B. This can be used to identify which E2B API KEY is being used without exposing the actual API KEY. */ 243 + redactedE2bApiKey?: string; 244 244 [k: string]: unknown; 245 245 } 246 246
+3 -5
apps/api/src/schema/e2b-auth.ts
··· 6 6 const e2bAuth = pgTable( 7 7 "e2b_auth", 8 8 { 9 - id: text("id") 10 - .primaryKey() 11 - .default(sql`xata_id()`), 9 + id: text("id").primaryKey().default(sql`xata_id()`), 12 10 sandboxId: text("sandbox_id") 13 11 .notNull() 14 12 .references(() => sandboxes.id, { onDelete: "cascade" }), 15 13 userId: text("user_id") 16 14 .notNull() 17 15 .references(() => users.id), 18 - accessToken: text("access_token").notNull(), 19 - redactedAccessToken: text("redacted_access_token").notNull(), 16 + apiKey: text("api_key").notNull(), 17 + redactedApiKey: text("redacted_api_key").notNull(), 20 18 createdAt: timestamp("created_at").defaultNow().notNull(), 21 19 }, 22 20 (t) => [uniqueIndex("unique_e2b_auth").on(t.sandboxId, t.userId)],
+1 -1
apps/api/src/xrpc/io/pocketenv/sandbox/getPreferences.ts
··· 119 119 (e2b && { 120 120 $type: "io.pocketenv.sandbox.defs#sandboxProviderPref" as const, 121 121 name: "e2b" as const, 122 - redactedE2bAccessToken: e2b.redactedAccessToken, 122 + redactedE2bApiKey: e2b.redactedApiKey, 123 123 }))!; 124 124 125 125 return [provider satisfies SandboxProviderPref];
+4 -4
apps/api/src/xrpc/io/pocketenv/sandbox/putPreferences.ts
··· 246 246 .values({ 247 247 userId: user.id, 248 248 sandboxId: input.body.sandboxId, 249 - accessToken: pref.e2bAccessToken!, 250 - redactedAccessToken: pref.redactedE2bAccessToken!, 249 + apiKey: pref.e2bApiKey!, 250 + redactedApiKey: pref.redactedE2bApiKey!, 251 251 } satisfies InsertE2BAuth) 252 252 .onConflictDoUpdate({ 253 253 target: [modalAuth.sandboxId, e2bAuth.userId], 254 254 set: { 255 - accessToken: pref.e2bAccessToken!, 256 - redactedAccessToken: pref.redactedE2bAccessToken!, 255 + apiKey: pref.e2bApiKey!, 256 + redactedApiKey: pref.redactedApiKey!, 257 257 }, 258 258 }) 259 259 .execute();
+2
apps/cf-sandbox/drizzle/0045_windy_sinister_six.sql
··· 1 + ALTER TABLE "e2b_auth" RENAME COLUMN "access_token" TO "api_key";--> statement-breakpoint 2 + ALTER TABLE "e2b_auth" RENAME COLUMN "redacted_access_token" TO "redacted_api_key";
+2193
apps/cf-sandbox/drizzle/meta/0045_snapshot.json
··· 1 + { 2 + "id": "6d8b3f4b-ebed-47dc-b77d-3d0b6a95c883", 3 + "prevId": "948aa757-749a-4da1-b0f9-8d2a7d58e3d5", 4 + "version": "7", 5 + "dialect": "postgresql", 6 + "tables": { 7 + "public.authorized_keys": { 8 + "name": "authorized_keys", 9 + "schema": "", 10 + "columns": { 11 + "id": { 12 + "name": "id", 13 + "type": "text", 14 + "primaryKey": true, 15 + "notNull": true, 16 + "default": "xata_id()" 17 + }, 18 + "sandbox_id": { 19 + "name": "sandbox_id", 20 + "type": "text", 21 + "primaryKey": false, 22 + "notNull": false 23 + }, 24 + "public_key": { 25 + "name": "public_key", 26 + "type": "text", 27 + "primaryKey": false, 28 + "notNull": true 29 + }, 30 + "created_at": { 31 + "name": "created_at", 32 + "type": "timestamp", 33 + "primaryKey": false, 34 + "notNull": true, 35 + "default": "now()" 36 + } 37 + }, 38 + "indexes": {}, 39 + "foreignKeys": { 40 + "authorized_keys_sandbox_id_sandboxes_id_fk": { 41 + "name": "authorized_keys_sandbox_id_sandboxes_id_fk", 42 + "tableFrom": "authorized_keys", 43 + "tableTo": "sandboxes", 44 + "columnsFrom": [ 45 + "sandbox_id" 46 + ], 47 + "columnsTo": [ 48 + "id" 49 + ], 50 + "onDelete": "no action", 51 + "onUpdate": "no action" 52 + } 53 + }, 54 + "compositePrimaryKeys": {}, 55 + "uniqueConstraints": {}, 56 + "policies": {}, 57 + "checkConstraints": {}, 58 + "isRLSEnabled": false 59 + }, 60 + "public.backups": { 61 + "name": "backups", 62 + "schema": "", 63 + "columns": { 64 + "id": { 65 + "name": "id", 66 + "type": "text", 67 + "primaryKey": true, 68 + "notNull": true, 69 + "default": "xata_id()" 70 + }, 71 + "sandbox_id": { 72 + "name": "sandbox_id", 73 + "type": "text", 74 + "primaryKey": false, 75 + "notNull": true 76 + }, 77 + "backup_id": { 78 + "name": "backup_id", 79 + "type": "text", 80 + "primaryKey": false, 81 + "notNull": true 82 + }, 83 + "directory": { 84 + "name": "directory", 85 + "type": "text", 86 + "primaryKey": false, 87 + "notNull": true 88 + }, 89 + "description": { 90 + "name": "description", 91 + "type": "text", 92 + "primaryKey": false, 93 + "notNull": false 94 + }, 95 + "expires_at": { 96 + "name": "expires_at", 97 + "type": "timestamp", 98 + "primaryKey": false, 99 + "notNull": false 100 + }, 101 + "created_at": { 102 + "name": "created_at", 103 + "type": "timestamp", 104 + "primaryKey": false, 105 + "notNull": true, 106 + "default": "now()" 107 + } 108 + }, 109 + "indexes": {}, 110 + "foreignKeys": { 111 + "backups_sandbox_id_sandboxes_id_fk": { 112 + "name": "backups_sandbox_id_sandboxes_id_fk", 113 + "tableFrom": "backups", 114 + "tableTo": "sandboxes", 115 + "columnsFrom": [ 116 + "sandbox_id" 117 + ], 118 + "columnsTo": [ 119 + "id" 120 + ], 121 + "onDelete": "cascade", 122 + "onUpdate": "no action" 123 + } 124 + }, 125 + "compositePrimaryKeys": {}, 126 + "uniqueConstraints": {}, 127 + "policies": {}, 128 + "checkConstraints": {}, 129 + "isRLSEnabled": false 130 + }, 131 + "public.daytona_auth": { 132 + "name": "daytona_auth", 133 + "schema": "", 134 + "columns": { 135 + "id": { 136 + "name": "id", 137 + "type": "text", 138 + "primaryKey": true, 139 + "notNull": true, 140 + "default": "xata_id()" 141 + }, 142 + "sandbox_id": { 143 + "name": "sandbox_id", 144 + "type": "text", 145 + "primaryKey": false, 146 + "notNull": true 147 + }, 148 + "user_id": { 149 + "name": "user_id", 150 + "type": "text", 151 + "primaryKey": false, 152 + "notNull": true 153 + }, 154 + "api_key": { 155 + "name": "api_key", 156 + "type": "text", 157 + "primaryKey": false, 158 + "notNull": true 159 + }, 160 + "organization_id": { 161 + "name": "organization_id", 162 + "type": "text", 163 + "primaryKey": false, 164 + "notNull": true 165 + }, 166 + "redacted_api_key": { 167 + "name": "redacted_api_key", 168 + "type": "text", 169 + "primaryKey": false, 170 + "notNull": true 171 + }, 172 + "created_at": { 173 + "name": "created_at", 174 + "type": "timestamp", 175 + "primaryKey": false, 176 + "notNull": true, 177 + "default": "now()" 178 + } 179 + }, 180 + "indexes": { 181 + "unique_daytona_auth": { 182 + "name": "unique_daytona_auth", 183 + "columns": [ 184 + { 185 + "expression": "sandbox_id", 186 + "isExpression": false, 187 + "asc": true, 188 + "nulls": "last" 189 + }, 190 + { 191 + "expression": "user_id", 192 + "isExpression": false, 193 + "asc": true, 194 + "nulls": "last" 195 + } 196 + ], 197 + "isUnique": true, 198 + "concurrently": false, 199 + "method": "btree", 200 + "with": {} 201 + } 202 + }, 203 + "foreignKeys": { 204 + "daytona_auth_sandbox_id_sandboxes_id_fk": { 205 + "name": "daytona_auth_sandbox_id_sandboxes_id_fk", 206 + "tableFrom": "daytona_auth", 207 + "tableTo": "sandboxes", 208 + "columnsFrom": [ 209 + "sandbox_id" 210 + ], 211 + "columnsTo": [ 212 + "id" 213 + ], 214 + "onDelete": "cascade", 215 + "onUpdate": "no action" 216 + }, 217 + "daytona_auth_user_id_users_id_fk": { 218 + "name": "daytona_auth_user_id_users_id_fk", 219 + "tableFrom": "daytona_auth", 220 + "tableTo": "users", 221 + "columnsFrom": [ 222 + "user_id" 223 + ], 224 + "columnsTo": [ 225 + "id" 226 + ], 227 + "onDelete": "no action", 228 + "onUpdate": "no action" 229 + } 230 + }, 231 + "compositePrimaryKeys": {}, 232 + "uniqueConstraints": {}, 233 + "policies": {}, 234 + "checkConstraints": {}, 235 + "isRLSEnabled": false 236 + }, 237 + "public.deno_auth": { 238 + "name": "deno_auth", 239 + "schema": "", 240 + "columns": { 241 + "id": { 242 + "name": "id", 243 + "type": "text", 244 + "primaryKey": true, 245 + "notNull": true, 246 + "default": "xata_id()" 247 + }, 248 + "sandbox_id": { 249 + "name": "sandbox_id", 250 + "type": "text", 251 + "primaryKey": false, 252 + "notNull": true 253 + }, 254 + "deploy_token": { 255 + "name": "deploy_token", 256 + "type": "text", 257 + "primaryKey": false, 258 + "notNull": true 259 + }, 260 + "user_id": { 261 + "name": "user_id", 262 + "type": "text", 263 + "primaryKey": false, 264 + "notNull": true 265 + }, 266 + "redacted_deno_token": { 267 + "name": "redacted_deno_token", 268 + "type": "text", 269 + "primaryKey": false, 270 + "notNull": true 271 + }, 272 + "created_at": { 273 + "name": "created_at", 274 + "type": "timestamp", 275 + "primaryKey": false, 276 + "notNull": true, 277 + "default": "now()" 278 + } 279 + }, 280 + "indexes": { 281 + "unique_deno_auth": { 282 + "name": "unique_deno_auth", 283 + "columns": [ 284 + { 285 + "expression": "sandbox_id", 286 + "isExpression": false, 287 + "asc": true, 288 + "nulls": "last" 289 + }, 290 + { 291 + "expression": "user_id", 292 + "isExpression": false, 293 + "asc": true, 294 + "nulls": "last" 295 + } 296 + ], 297 + "isUnique": true, 298 + "concurrently": false, 299 + "method": "btree", 300 + "with": {} 301 + } 302 + }, 303 + "foreignKeys": { 304 + "deno_auth_sandbox_id_sandboxes_id_fk": { 305 + "name": "deno_auth_sandbox_id_sandboxes_id_fk", 306 + "tableFrom": "deno_auth", 307 + "tableTo": "sandboxes", 308 + "columnsFrom": [ 309 + "sandbox_id" 310 + ], 311 + "columnsTo": [ 312 + "id" 313 + ], 314 + "onDelete": "cascade", 315 + "onUpdate": "no action" 316 + }, 317 + "deno_auth_user_id_users_id_fk": { 318 + "name": "deno_auth_user_id_users_id_fk", 319 + "tableFrom": "deno_auth", 320 + "tableTo": "users", 321 + "columnsFrom": [ 322 + "user_id" 323 + ], 324 + "columnsTo": [ 325 + "id" 326 + ], 327 + "onDelete": "no action", 328 + "onUpdate": "no action" 329 + } 330 + }, 331 + "compositePrimaryKeys": {}, 332 + "uniqueConstraints": {}, 333 + "policies": {}, 334 + "checkConstraints": {}, 335 + "isRLSEnabled": false 336 + }, 337 + "public.e2b_auth": { 338 + "name": "e2b_auth", 339 + "schema": "", 340 + "columns": { 341 + "id": { 342 + "name": "id", 343 + "type": "text", 344 + "primaryKey": true, 345 + "notNull": true, 346 + "default": "xata_id()" 347 + }, 348 + "sandbox_id": { 349 + "name": "sandbox_id", 350 + "type": "text", 351 + "primaryKey": false, 352 + "notNull": true 353 + }, 354 + "user_id": { 355 + "name": "user_id", 356 + "type": "text", 357 + "primaryKey": false, 358 + "notNull": true 359 + }, 360 + "api_key": { 361 + "name": "api_key", 362 + "type": "text", 363 + "primaryKey": false, 364 + "notNull": true 365 + }, 366 + "redacted_api_key": { 367 + "name": "redacted_api_key", 368 + "type": "text", 369 + "primaryKey": false, 370 + "notNull": true 371 + }, 372 + "created_at": { 373 + "name": "created_at", 374 + "type": "timestamp", 375 + "primaryKey": false, 376 + "notNull": true, 377 + "default": "now()" 378 + } 379 + }, 380 + "indexes": { 381 + "unique_e2b_auth": { 382 + "name": "unique_e2b_auth", 383 + "columns": [ 384 + { 385 + "expression": "sandbox_id", 386 + "isExpression": false, 387 + "asc": true, 388 + "nulls": "last" 389 + }, 390 + { 391 + "expression": "user_id", 392 + "isExpression": false, 393 + "asc": true, 394 + "nulls": "last" 395 + } 396 + ], 397 + "isUnique": true, 398 + "concurrently": false, 399 + "method": "btree", 400 + "with": {} 401 + } 402 + }, 403 + "foreignKeys": { 404 + "e2b_auth_sandbox_id_sandboxes_id_fk": { 405 + "name": "e2b_auth_sandbox_id_sandboxes_id_fk", 406 + "tableFrom": "e2b_auth", 407 + "tableTo": "sandboxes", 408 + "columnsFrom": [ 409 + "sandbox_id" 410 + ], 411 + "columnsTo": [ 412 + "id" 413 + ], 414 + "onDelete": "cascade", 415 + "onUpdate": "no action" 416 + }, 417 + "e2b_auth_user_id_users_id_fk": { 418 + "name": "e2b_auth_user_id_users_id_fk", 419 + "tableFrom": "e2b_auth", 420 + "tableTo": "users", 421 + "columnsFrom": [ 422 + "user_id" 423 + ], 424 + "columnsTo": [ 425 + "id" 426 + ], 427 + "onDelete": "no action", 428 + "onUpdate": "no action" 429 + } 430 + }, 431 + "compositePrimaryKeys": {}, 432 + "uniqueConstraints": {}, 433 + "policies": {}, 434 + "checkConstraints": {}, 435 + "isRLSEnabled": false 436 + }, 437 + "public.files": { 438 + "name": "files", 439 + "schema": "", 440 + "columns": { 441 + "id": { 442 + "name": "id", 443 + "type": "text", 444 + "primaryKey": true, 445 + "notNull": true, 446 + "default": "xata_id()" 447 + }, 448 + "content": { 449 + "name": "content", 450 + "type": "text", 451 + "primaryKey": false, 452 + "notNull": true 453 + }, 454 + "created_at": { 455 + "name": "created_at", 456 + "type": "timestamp", 457 + "primaryKey": false, 458 + "notNull": true, 459 + "default": "now()" 460 + }, 461 + "updated_at": { 462 + "name": "updated_at", 463 + "type": "timestamp", 464 + "primaryKey": false, 465 + "notNull": true, 466 + "default": "now()" 467 + } 468 + }, 469 + "indexes": {}, 470 + "foreignKeys": {}, 471 + "compositePrimaryKeys": {}, 472 + "uniqueConstraints": {}, 473 + "policies": {}, 474 + "checkConstraints": {}, 475 + "isRLSEnabled": false 476 + }, 477 + "public.modal_auth": { 478 + "name": "modal_auth", 479 + "schema": "", 480 + "columns": { 481 + "id": { 482 + "name": "id", 483 + "type": "text", 484 + "primaryKey": true, 485 + "notNull": true, 486 + "default": "xata_id()" 487 + }, 488 + "sandbox_id": { 489 + "name": "sandbox_id", 490 + "type": "text", 491 + "primaryKey": false, 492 + "notNull": true 493 + }, 494 + "user_id": { 495 + "name": "user_id", 496 + "type": "text", 497 + "primaryKey": false, 498 + "notNull": true 499 + }, 500 + "token_id": { 501 + "name": "token_id", 502 + "type": "text", 503 + "primaryKey": false, 504 + "notNull": true 505 + }, 506 + "redacted_token_id": { 507 + "name": "redacted_token_id", 508 + "type": "text", 509 + "primaryKey": false, 510 + "notNull": true 511 + }, 512 + "token_secret": { 513 + "name": "token_secret", 514 + "type": "text", 515 + "primaryKey": false, 516 + "notNull": true 517 + }, 518 + "redacted_token_secret": { 519 + "name": "redacted_token_secret", 520 + "type": "text", 521 + "primaryKey": false, 522 + "notNull": true 523 + }, 524 + "created_at": { 525 + "name": "created_at", 526 + "type": "timestamp", 527 + "primaryKey": false, 528 + "notNull": true, 529 + "default": "now()" 530 + } 531 + }, 532 + "indexes": { 533 + "unique_modal_auth": { 534 + "name": "unique_modal_auth", 535 + "columns": [ 536 + { 537 + "expression": "sandbox_id", 538 + "isExpression": false, 539 + "asc": true, 540 + "nulls": "last" 541 + }, 542 + { 543 + "expression": "user_id", 544 + "isExpression": false, 545 + "asc": true, 546 + "nulls": "last" 547 + } 548 + ], 549 + "isUnique": true, 550 + "concurrently": false, 551 + "method": "btree", 552 + "with": {} 553 + } 554 + }, 555 + "foreignKeys": { 556 + "modal_auth_sandbox_id_sandboxes_id_fk": { 557 + "name": "modal_auth_sandbox_id_sandboxes_id_fk", 558 + "tableFrom": "modal_auth", 559 + "tableTo": "sandboxes", 560 + "columnsFrom": [ 561 + "sandbox_id" 562 + ], 563 + "columnsTo": [ 564 + "id" 565 + ], 566 + "onDelete": "cascade", 567 + "onUpdate": "no action" 568 + }, 569 + "modal_auth_user_id_users_id_fk": { 570 + "name": "modal_auth_user_id_users_id_fk", 571 + "tableFrom": "modal_auth", 572 + "tableTo": "users", 573 + "columnsFrom": [ 574 + "user_id" 575 + ], 576 + "columnsTo": [ 577 + "id" 578 + ], 579 + "onDelete": "no action", 580 + "onUpdate": "no action" 581 + } 582 + }, 583 + "compositePrimaryKeys": {}, 584 + "uniqueConstraints": {}, 585 + "policies": {}, 586 + "checkConstraints": {}, 587 + "isRLSEnabled": false 588 + }, 589 + "public.sandbox_cp": { 590 + "name": "sandbox_cp", 591 + "schema": "", 592 + "columns": { 593 + "id": { 594 + "name": "id", 595 + "type": "text", 596 + "primaryKey": true, 597 + "notNull": true, 598 + "default": "xata_id()" 599 + }, 600 + "copy_uuid": { 601 + "name": "copy_uuid", 602 + "type": "text", 603 + "primaryKey": false, 604 + "notNull": true 605 + }, 606 + "created_at": { 607 + "name": "created_at", 608 + "type": "timestamp", 609 + "primaryKey": false, 610 + "notNull": true, 611 + "default": "now()" 612 + } 613 + }, 614 + "indexes": {}, 615 + "foreignKeys": {}, 616 + "compositePrimaryKeys": {}, 617 + "uniqueConstraints": { 618 + "sandbox_cp_copy_uuid_unique": { 619 + "name": "sandbox_cp_copy_uuid_unique", 620 + "nullsNotDistinct": false, 621 + "columns": [ 622 + "copy_uuid" 623 + ] 624 + } 625 + }, 626 + "policies": {}, 627 + "checkConstraints": {}, 628 + "isRLSEnabled": false 629 + }, 630 + "public.sandbox_files": { 631 + "name": "sandbox_files", 632 + "schema": "", 633 + "columns": { 634 + "id": { 635 + "name": "id", 636 + "type": "text", 637 + "primaryKey": true, 638 + "notNull": true, 639 + "default": "file_id()" 640 + }, 641 + "sandbox_id": { 642 + "name": "sandbox_id", 643 + "type": "text", 644 + "primaryKey": false, 645 + "notNull": true 646 + }, 647 + "file_id": { 648 + "name": "file_id", 649 + "type": "text", 650 + "primaryKey": false, 651 + "notNull": true 652 + }, 653 + "path": { 654 + "name": "path", 655 + "type": "text", 656 + "primaryKey": false, 657 + "notNull": true 658 + }, 659 + "created_at": { 660 + "name": "created_at", 661 + "type": "timestamp", 662 + "primaryKey": false, 663 + "notNull": true, 664 + "default": "now()" 665 + }, 666 + "updated_at": { 667 + "name": "updated_at", 668 + "type": "timestamp", 669 + "primaryKey": false, 670 + "notNull": true, 671 + "default": "now()" 672 + } 673 + }, 674 + "indexes": { 675 + "unique_sandbox_file_path": { 676 + "name": "unique_sandbox_file_path", 677 + "columns": [ 678 + { 679 + "expression": "sandbox_id", 680 + "isExpression": false, 681 + "asc": true, 682 + "nulls": "last" 683 + }, 684 + { 685 + "expression": "path", 686 + "isExpression": false, 687 + "asc": true, 688 + "nulls": "last" 689 + } 690 + ], 691 + "isUnique": true, 692 + "concurrently": false, 693 + "method": "btree", 694 + "with": {} 695 + } 696 + }, 697 + "foreignKeys": { 698 + "sandbox_files_sandbox_id_sandboxes_id_fk": { 699 + "name": "sandbox_files_sandbox_id_sandboxes_id_fk", 700 + "tableFrom": "sandbox_files", 701 + "tableTo": "sandboxes", 702 + "columnsFrom": [ 703 + "sandbox_id" 704 + ], 705 + "columnsTo": [ 706 + "id" 707 + ], 708 + "onDelete": "cascade", 709 + "onUpdate": "no action" 710 + }, 711 + "sandbox_files_file_id_files_id_fk": { 712 + "name": "sandbox_files_file_id_files_id_fk", 713 + "tableFrom": "sandbox_files", 714 + "tableTo": "files", 715 + "columnsFrom": [ 716 + "file_id" 717 + ], 718 + "columnsTo": [ 719 + "id" 720 + ], 721 + "onDelete": "no action", 722 + "onUpdate": "no action" 723 + } 724 + }, 725 + "compositePrimaryKeys": {}, 726 + "uniqueConstraints": {}, 727 + "policies": {}, 728 + "checkConstraints": {}, 729 + "isRLSEnabled": false 730 + }, 731 + "public.sandbox_ports": { 732 + "name": "sandbox_ports", 733 + "schema": "", 734 + "columns": { 735 + "id": { 736 + "name": "id", 737 + "type": "text", 738 + "primaryKey": true, 739 + "notNull": true, 740 + "default": "xata_id()" 741 + }, 742 + "sandbox_id": { 743 + "name": "sandbox_id", 744 + "type": "text", 745 + "primaryKey": false, 746 + "notNull": true 747 + }, 748 + "exposed_port": { 749 + "name": "exposed_port", 750 + "type": "integer", 751 + "primaryKey": false, 752 + "notNull": true 753 + }, 754 + "preview_url": { 755 + "name": "preview_url", 756 + "type": "text", 757 + "primaryKey": false, 758 + "notNull": false 759 + }, 760 + "description": { 761 + "name": "description", 762 + "type": "text", 763 + "primaryKey": false, 764 + "notNull": false 765 + }, 766 + "service_id": { 767 + "name": "service_id", 768 + "type": "text", 769 + "primaryKey": false, 770 + "notNull": false 771 + }, 772 + "created_at": { 773 + "name": "created_at", 774 + "type": "timestamp", 775 + "primaryKey": false, 776 + "notNull": true, 777 + "default": "now()" 778 + }, 779 + "updated_at": { 780 + "name": "updated_at", 781 + "type": "timestamp", 782 + "primaryKey": false, 783 + "notNull": true, 784 + "default": "now()" 785 + } 786 + }, 787 + "indexes": { 788 + "unique_sandbox_port": { 789 + "name": "unique_sandbox_port", 790 + "columns": [ 791 + { 792 + "expression": "sandbox_id", 793 + "isExpression": false, 794 + "asc": true, 795 + "nulls": "last" 796 + }, 797 + { 798 + "expression": "exposed_port", 799 + "isExpression": false, 800 + "asc": true, 801 + "nulls": "last" 802 + } 803 + ], 804 + "isUnique": true, 805 + "concurrently": false, 806 + "method": "btree", 807 + "with": {} 808 + } 809 + }, 810 + "foreignKeys": { 811 + "sandbox_ports_sandbox_id_sandboxes_id_fk": { 812 + "name": "sandbox_ports_sandbox_id_sandboxes_id_fk", 813 + "tableFrom": "sandbox_ports", 814 + "tableTo": "sandboxes", 815 + "columnsFrom": [ 816 + "sandbox_id" 817 + ], 818 + "columnsTo": [ 819 + "id" 820 + ], 821 + "onDelete": "cascade", 822 + "onUpdate": "no action" 823 + }, 824 + "sandbox_ports_service_id_services_id_fk": { 825 + "name": "sandbox_ports_service_id_services_id_fk", 826 + "tableFrom": "sandbox_ports", 827 + "tableTo": "services", 828 + "columnsFrom": [ 829 + "service_id" 830 + ], 831 + "columnsTo": [ 832 + "id" 833 + ], 834 + "onDelete": "no action", 835 + "onUpdate": "no action" 836 + } 837 + }, 838 + "compositePrimaryKeys": {}, 839 + "uniqueConstraints": {}, 840 + "policies": {}, 841 + "checkConstraints": {}, 842 + "isRLSEnabled": false 843 + }, 844 + "public.sandbox_secrets": { 845 + "name": "sandbox_secrets", 846 + "schema": "", 847 + "columns": { 848 + "id": { 849 + "name": "id", 850 + "type": "text", 851 + "primaryKey": true, 852 + "notNull": true, 853 + "default": "xata_id()" 854 + }, 855 + "sandbox_id": { 856 + "name": "sandbox_id", 857 + "type": "text", 858 + "primaryKey": false, 859 + "notNull": true 860 + }, 861 + "secret_id": { 862 + "name": "secret_id", 863 + "type": "text", 864 + "primaryKey": false, 865 + "notNull": true 866 + }, 867 + "name": { 868 + "name": "name", 869 + "type": "text", 870 + "primaryKey": false, 871 + "notNull": false 872 + }, 873 + "created_at": { 874 + "name": "created_at", 875 + "type": "timestamp", 876 + "primaryKey": false, 877 + "notNull": true, 878 + "default": "now()" 879 + }, 880 + "updated_at": { 881 + "name": "updated_at", 882 + "type": "timestamp", 883 + "primaryKey": false, 884 + "notNull": true, 885 + "default": "now()" 886 + } 887 + }, 888 + "indexes": { 889 + "unique_sandbox_secret_by_name": { 890 + "name": "unique_sandbox_secret_by_name", 891 + "columns": [ 892 + { 893 + "expression": "sandbox_id", 894 + "isExpression": false, 895 + "asc": true, 896 + "nulls": "last" 897 + }, 898 + { 899 + "expression": "name", 900 + "isExpression": false, 901 + "asc": true, 902 + "nulls": "last" 903 + } 904 + ], 905 + "isUnique": true, 906 + "concurrently": false, 907 + "method": "btree", 908 + "with": {} 909 + } 910 + }, 911 + "foreignKeys": { 912 + "sandbox_secrets_sandbox_id_sandboxes_id_fk": { 913 + "name": "sandbox_secrets_sandbox_id_sandboxes_id_fk", 914 + "tableFrom": "sandbox_secrets", 915 + "tableTo": "sandboxes", 916 + "columnsFrom": [ 917 + "sandbox_id" 918 + ], 919 + "columnsTo": [ 920 + "id" 921 + ], 922 + "onDelete": "cascade", 923 + "onUpdate": "no action" 924 + }, 925 + "sandbox_secrets_secret_id_secrets_id_fk": { 926 + "name": "sandbox_secrets_secret_id_secrets_id_fk", 927 + "tableFrom": "sandbox_secrets", 928 + "tableTo": "secrets", 929 + "columnsFrom": [ 930 + "secret_id" 931 + ], 932 + "columnsTo": [ 933 + "id" 934 + ], 935 + "onDelete": "no action", 936 + "onUpdate": "no action" 937 + } 938 + }, 939 + "compositePrimaryKeys": {}, 940 + "uniqueConstraints": {}, 941 + "policies": {}, 942 + "checkConstraints": {}, 943 + "isRLSEnabled": false 944 + }, 945 + "public.sandbox_variables": { 946 + "name": "sandbox_variables", 947 + "schema": "", 948 + "columns": { 949 + "id": { 950 + "name": "id", 951 + "type": "text", 952 + "primaryKey": true, 953 + "notNull": true, 954 + "default": "xata_id()" 955 + }, 956 + "sandbox_id": { 957 + "name": "sandbox_id", 958 + "type": "text", 959 + "primaryKey": false, 960 + "notNull": true 961 + }, 962 + "variable_id": { 963 + "name": "variable_id", 964 + "type": "text", 965 + "primaryKey": false, 966 + "notNull": true 967 + }, 968 + "name": { 969 + "name": "name", 970 + "type": "text", 971 + "primaryKey": false, 972 + "notNull": true 973 + }, 974 + "created_at": { 975 + "name": "created_at", 976 + "type": "timestamp", 977 + "primaryKey": false, 978 + "notNull": true, 979 + "default": "now()" 980 + }, 981 + "updated_at": { 982 + "name": "updated_at", 983 + "type": "timestamp", 984 + "primaryKey": false, 985 + "notNull": true, 986 + "default": "now()" 987 + } 988 + }, 989 + "indexes": { 990 + "unique_sandbox_variables_by_name": { 991 + "name": "unique_sandbox_variables_by_name", 992 + "columns": [ 993 + { 994 + "expression": "sandbox_id", 995 + "isExpression": false, 996 + "asc": true, 997 + "nulls": "last" 998 + }, 999 + { 1000 + "expression": "name", 1001 + "isExpression": false, 1002 + "asc": true, 1003 + "nulls": "last" 1004 + } 1005 + ], 1006 + "isUnique": true, 1007 + "concurrently": false, 1008 + "method": "btree", 1009 + "with": {} 1010 + } 1011 + }, 1012 + "foreignKeys": { 1013 + "sandbox_variables_sandbox_id_sandboxes_id_fk": { 1014 + "name": "sandbox_variables_sandbox_id_sandboxes_id_fk", 1015 + "tableFrom": "sandbox_variables", 1016 + "tableTo": "sandboxes", 1017 + "columnsFrom": [ 1018 + "sandbox_id" 1019 + ], 1020 + "columnsTo": [ 1021 + "id" 1022 + ], 1023 + "onDelete": "cascade", 1024 + "onUpdate": "no action" 1025 + }, 1026 + "sandbox_variables_variable_id_variables_id_fk": { 1027 + "name": "sandbox_variables_variable_id_variables_id_fk", 1028 + "tableFrom": "sandbox_variables", 1029 + "tableTo": "variables", 1030 + "columnsFrom": [ 1031 + "variable_id" 1032 + ], 1033 + "columnsTo": [ 1034 + "id" 1035 + ], 1036 + "onDelete": "no action", 1037 + "onUpdate": "no action" 1038 + } 1039 + }, 1040 + "compositePrimaryKeys": {}, 1041 + "uniqueConstraints": {}, 1042 + "policies": {}, 1043 + "checkConstraints": {}, 1044 + "isRLSEnabled": false 1045 + }, 1046 + "public.sandbox_volumes": { 1047 + "name": "sandbox_volumes", 1048 + "schema": "", 1049 + "columns": { 1050 + "id": { 1051 + "name": "id", 1052 + "type": "text", 1053 + "primaryKey": true, 1054 + "notNull": true, 1055 + "default": "volume_id()" 1056 + }, 1057 + "sandbox_id": { 1058 + "name": "sandbox_id", 1059 + "type": "text", 1060 + "primaryKey": false, 1061 + "notNull": true 1062 + }, 1063 + "volume_id": { 1064 + "name": "volume_id", 1065 + "type": "text", 1066 + "primaryKey": false, 1067 + "notNull": true 1068 + }, 1069 + "name": { 1070 + "name": "name", 1071 + "type": "text", 1072 + "primaryKey": false, 1073 + "notNull": false 1074 + }, 1075 + "path": { 1076 + "name": "path", 1077 + "type": "text", 1078 + "primaryKey": false, 1079 + "notNull": true 1080 + }, 1081 + "created_at": { 1082 + "name": "created_at", 1083 + "type": "timestamp", 1084 + "primaryKey": false, 1085 + "notNull": true, 1086 + "default": "now()" 1087 + }, 1088 + "updated_at": { 1089 + "name": "updated_at", 1090 + "type": "timestamp", 1091 + "primaryKey": false, 1092 + "notNull": true, 1093 + "default": "now()" 1094 + } 1095 + }, 1096 + "indexes": { 1097 + "unique_sandbox_volume_path": { 1098 + "name": "unique_sandbox_volume_path", 1099 + "columns": [ 1100 + { 1101 + "expression": "sandbox_id", 1102 + "isExpression": false, 1103 + "asc": true, 1104 + "nulls": "last" 1105 + }, 1106 + { 1107 + "expression": "path", 1108 + "isExpression": false, 1109 + "asc": true, 1110 + "nulls": "last" 1111 + } 1112 + ], 1113 + "isUnique": true, 1114 + "concurrently": false, 1115 + "method": "btree", 1116 + "with": {} 1117 + } 1118 + }, 1119 + "foreignKeys": { 1120 + "sandbox_volumes_sandbox_id_sandboxes_id_fk": { 1121 + "name": "sandbox_volumes_sandbox_id_sandboxes_id_fk", 1122 + "tableFrom": "sandbox_volumes", 1123 + "tableTo": "sandboxes", 1124 + "columnsFrom": [ 1125 + "sandbox_id" 1126 + ], 1127 + "columnsTo": [ 1128 + "id" 1129 + ], 1130 + "onDelete": "cascade", 1131 + "onUpdate": "no action" 1132 + }, 1133 + "sandbox_volumes_volume_id_volumes_id_fk": { 1134 + "name": "sandbox_volumes_volume_id_volumes_id_fk", 1135 + "tableFrom": "sandbox_volumes", 1136 + "tableTo": "volumes", 1137 + "columnsFrom": [ 1138 + "volume_id" 1139 + ], 1140 + "columnsTo": [ 1141 + "id" 1142 + ], 1143 + "onDelete": "no action", 1144 + "onUpdate": "no action" 1145 + } 1146 + }, 1147 + "compositePrimaryKeys": {}, 1148 + "uniqueConstraints": {}, 1149 + "policies": {}, 1150 + "checkConstraints": {}, 1151 + "isRLSEnabled": false 1152 + }, 1153 + "public.sandboxes": { 1154 + "name": "sandboxes", 1155 + "schema": "", 1156 + "columns": { 1157 + "id": { 1158 + "name": "id", 1159 + "type": "text", 1160 + "primaryKey": true, 1161 + "notNull": true, 1162 + "default": "sandbox_id()" 1163 + }, 1164 + "base": { 1165 + "name": "base", 1166 + "type": "text", 1167 + "primaryKey": false, 1168 + "notNull": false 1169 + }, 1170 + "name": { 1171 + "name": "name", 1172 + "type": "text", 1173 + "primaryKey": false, 1174 + "notNull": true 1175 + }, 1176 + "display_name": { 1177 + "name": "display_name", 1178 + "type": "text", 1179 + "primaryKey": false, 1180 + "notNull": false 1181 + }, 1182 + "uri": { 1183 + "name": "uri", 1184 + "type": "text", 1185 + "primaryKey": false, 1186 + "notNull": false 1187 + }, 1188 + "cid": { 1189 + "name": "cid", 1190 + "type": "text", 1191 + "primaryKey": false, 1192 + "notNull": false 1193 + }, 1194 + "repo": { 1195 + "name": "repo", 1196 + "type": "text", 1197 + "primaryKey": false, 1198 + "notNull": false 1199 + }, 1200 + "provider": { 1201 + "name": "provider", 1202 + "type": "text", 1203 + "primaryKey": false, 1204 + "notNull": true, 1205 + "default": "'cloudflare'" 1206 + }, 1207 + "description": { 1208 + "name": "description", 1209 + "type": "text", 1210 + "primaryKey": false, 1211 + "notNull": false 1212 + }, 1213 + "topics": { 1214 + "name": "topics", 1215 + "type": "text[]", 1216 + "primaryKey": false, 1217 + "notNull": false 1218 + }, 1219 + "logo": { 1220 + "name": "logo", 1221 + "type": "text", 1222 + "primaryKey": false, 1223 + "notNull": false 1224 + }, 1225 + "readme": { 1226 + "name": "readme", 1227 + "type": "text", 1228 + "primaryKey": false, 1229 + "notNull": false 1230 + }, 1231 + "public_key": { 1232 + "name": "public_key", 1233 + "type": "text", 1234 + "primaryKey": false, 1235 + "notNull": true 1236 + }, 1237 + "user_id": { 1238 + "name": "user_id", 1239 + "type": "text", 1240 + "primaryKey": false, 1241 + "notNull": false 1242 + }, 1243 + "instance_type": { 1244 + "name": "instance_type", 1245 + "type": "text", 1246 + "primaryKey": false, 1247 + "notNull": false 1248 + }, 1249 + "vcpus": { 1250 + "name": "vcpus", 1251 + "type": "integer", 1252 + "primaryKey": false, 1253 + "notNull": false 1254 + }, 1255 + "memory": { 1256 + "name": "memory", 1257 + "type": "integer", 1258 + "primaryKey": false, 1259 + "notNull": false 1260 + }, 1261 + "disk": { 1262 + "name": "disk", 1263 + "type": "integer", 1264 + "primaryKey": false, 1265 + "notNull": false 1266 + }, 1267 + "status": { 1268 + "name": "status", 1269 + "type": "text", 1270 + "primaryKey": false, 1271 + "notNull": true 1272 + }, 1273 + "keep_alive": { 1274 + "name": "keep_alive", 1275 + "type": "boolean", 1276 + "primaryKey": false, 1277 + "notNull": true, 1278 + "default": false 1279 + }, 1280 + "sleep_after": { 1281 + "name": "sleep_after", 1282 + "type": "text", 1283 + "primaryKey": false, 1284 + "notNull": false 1285 + }, 1286 + "sandbox_id": { 1287 + "name": "sandbox_id", 1288 + "type": "text", 1289 + "primaryKey": false, 1290 + "notNull": false 1291 + }, 1292 + "installs": { 1293 + "name": "installs", 1294 + "type": "integer", 1295 + "primaryKey": false, 1296 + "notNull": true, 1297 + "default": 0 1298 + }, 1299 + "started_at": { 1300 + "name": "started_at", 1301 + "type": "timestamp", 1302 + "primaryKey": false, 1303 + "notNull": false 1304 + }, 1305 + "created_at": { 1306 + "name": "created_at", 1307 + "type": "timestamp", 1308 + "primaryKey": false, 1309 + "notNull": true, 1310 + "default": "now()" 1311 + }, 1312 + "updated_at": { 1313 + "name": "updated_at", 1314 + "type": "timestamp", 1315 + "primaryKey": false, 1316 + "notNull": true, 1317 + "default": "now()" 1318 + } 1319 + }, 1320 + "indexes": {}, 1321 + "foreignKeys": { 1322 + "sandboxes_user_id_users_id_fk": { 1323 + "name": "sandboxes_user_id_users_id_fk", 1324 + "tableFrom": "sandboxes", 1325 + "tableTo": "users", 1326 + "columnsFrom": [ 1327 + "user_id" 1328 + ], 1329 + "columnsTo": [ 1330 + "id" 1331 + ], 1332 + "onDelete": "no action", 1333 + "onUpdate": "no action" 1334 + } 1335 + }, 1336 + "compositePrimaryKeys": {}, 1337 + "uniqueConstraints": { 1338 + "sandboxes_name_unique": { 1339 + "name": "sandboxes_name_unique", 1340 + "nullsNotDistinct": false, 1341 + "columns": [ 1342 + "name" 1343 + ] 1344 + }, 1345 + "sandboxes_uri_unique": { 1346 + "name": "sandboxes_uri_unique", 1347 + "nullsNotDistinct": false, 1348 + "columns": [ 1349 + "uri" 1350 + ] 1351 + }, 1352 + "sandboxes_cid_unique": { 1353 + "name": "sandboxes_cid_unique", 1354 + "nullsNotDistinct": false, 1355 + "columns": [ 1356 + "cid" 1357 + ] 1358 + } 1359 + }, 1360 + "policies": {}, 1361 + "checkConstraints": {}, 1362 + "isRLSEnabled": false 1363 + }, 1364 + "public.secrets": { 1365 + "name": "secrets", 1366 + "schema": "", 1367 + "columns": { 1368 + "id": { 1369 + "name": "id", 1370 + "type": "text", 1371 + "primaryKey": true, 1372 + "notNull": true, 1373 + "default": "secret_id()" 1374 + }, 1375 + "name": { 1376 + "name": "name", 1377 + "type": "text", 1378 + "primaryKey": false, 1379 + "notNull": true 1380 + }, 1381 + "value": { 1382 + "name": "value", 1383 + "type": "text", 1384 + "primaryKey": false, 1385 + "notNull": true 1386 + }, 1387 + "redacted": { 1388 + "name": "redacted", 1389 + "type": "text", 1390 + "primaryKey": false, 1391 + "notNull": false 1392 + }, 1393 + "created_at": { 1394 + "name": "created_at", 1395 + "type": "timestamp", 1396 + "primaryKey": false, 1397 + "notNull": true, 1398 + "default": "now()" 1399 + } 1400 + }, 1401 + "indexes": {}, 1402 + "foreignKeys": {}, 1403 + "compositePrimaryKeys": {}, 1404 + "uniqueConstraints": {}, 1405 + "policies": {}, 1406 + "checkConstraints": {}, 1407 + "isRLSEnabled": false 1408 + }, 1409 + "public.services": { 1410 + "name": "services", 1411 + "schema": "", 1412 + "columns": { 1413 + "id": { 1414 + "name": "id", 1415 + "type": "text", 1416 + "primaryKey": true, 1417 + "notNull": true, 1418 + "default": "xata_id()" 1419 + }, 1420 + "sandbox_id": { 1421 + "name": "sandbox_id", 1422 + "type": "text", 1423 + "primaryKey": false, 1424 + "notNull": true 1425 + }, 1426 + "name": { 1427 + "name": "name", 1428 + "type": "text", 1429 + "primaryKey": false, 1430 + "notNull": true 1431 + }, 1432 + "command": { 1433 + "name": "command", 1434 + "type": "text", 1435 + "primaryKey": false, 1436 + "notNull": true 1437 + }, 1438 + "description": { 1439 + "name": "description", 1440 + "type": "text", 1441 + "primaryKey": false, 1442 + "notNull": false 1443 + }, 1444 + "service_id": { 1445 + "name": "service_id", 1446 + "type": "text", 1447 + "primaryKey": false, 1448 + "notNull": false 1449 + }, 1450 + "status": { 1451 + "name": "status", 1452 + "type": "text", 1453 + "primaryKey": false, 1454 + "notNull": true, 1455 + "default": "'STOPPED'" 1456 + }, 1457 + "created_at": { 1458 + "name": "created_at", 1459 + "type": "timestamp", 1460 + "primaryKey": false, 1461 + "notNull": true, 1462 + "default": "now()" 1463 + }, 1464 + "updated_at": { 1465 + "name": "updated_at", 1466 + "type": "timestamp", 1467 + "primaryKey": false, 1468 + "notNull": true, 1469 + "default": "now()" 1470 + } 1471 + }, 1472 + "indexes": { 1473 + "unique_sandbox_service": { 1474 + "name": "unique_sandbox_service", 1475 + "columns": [ 1476 + { 1477 + "expression": "name", 1478 + "isExpression": false, 1479 + "asc": true, 1480 + "nulls": "last" 1481 + }, 1482 + { 1483 + "expression": "sandbox_id", 1484 + "isExpression": false, 1485 + "asc": true, 1486 + "nulls": "last" 1487 + } 1488 + ], 1489 + "isUnique": true, 1490 + "concurrently": false, 1491 + "method": "btree", 1492 + "with": {} 1493 + } 1494 + }, 1495 + "foreignKeys": { 1496 + "services_sandbox_id_sandboxes_id_fk": { 1497 + "name": "services_sandbox_id_sandboxes_id_fk", 1498 + "tableFrom": "services", 1499 + "tableTo": "sandboxes", 1500 + "columnsFrom": [ 1501 + "sandbox_id" 1502 + ], 1503 + "columnsTo": [ 1504 + "id" 1505 + ], 1506 + "onDelete": "cascade", 1507 + "onUpdate": "no action" 1508 + } 1509 + }, 1510 + "compositePrimaryKeys": {}, 1511 + "uniqueConstraints": {}, 1512 + "policies": {}, 1513 + "checkConstraints": {}, 1514 + "isRLSEnabled": false 1515 + }, 1516 + "public.snapshots": { 1517 + "name": "snapshots", 1518 + "schema": "", 1519 + "columns": { 1520 + "id": { 1521 + "name": "id", 1522 + "type": "text", 1523 + "primaryKey": true, 1524 + "notNull": true, 1525 + "default": "snapshot_id()" 1526 + }, 1527 + "slug": { 1528 + "name": "slug", 1529 + "type": "text", 1530 + "primaryKey": false, 1531 + "notNull": true 1532 + }, 1533 + "created_at": { 1534 + "name": "created_at", 1535 + "type": "timestamp", 1536 + "primaryKey": false, 1537 + "notNull": true, 1538 + "default": "now()" 1539 + } 1540 + }, 1541 + "indexes": {}, 1542 + "foreignKeys": {}, 1543 + "compositePrimaryKeys": {}, 1544 + "uniqueConstraints": { 1545 + "snapshots_slug_unique": { 1546 + "name": "snapshots_slug_unique", 1547 + "nullsNotDistinct": false, 1548 + "columns": [ 1549 + "slug" 1550 + ] 1551 + } 1552 + }, 1553 + "policies": {}, 1554 + "checkConstraints": {}, 1555 + "isRLSEnabled": false 1556 + }, 1557 + "public.sprite_auth": { 1558 + "name": "sprite_auth", 1559 + "schema": "", 1560 + "columns": { 1561 + "id": { 1562 + "name": "id", 1563 + "type": "text", 1564 + "primaryKey": true, 1565 + "notNull": true, 1566 + "default": "xata_id()" 1567 + }, 1568 + "sandbox_id": { 1569 + "name": "sandbox_id", 1570 + "type": "text", 1571 + "primaryKey": false, 1572 + "notNull": true 1573 + }, 1574 + "user_id": { 1575 + "name": "user_id", 1576 + "type": "text", 1577 + "primaryKey": false, 1578 + "notNull": true 1579 + }, 1580 + "sprite_token": { 1581 + "name": "sprite_token", 1582 + "type": "text", 1583 + "primaryKey": false, 1584 + "notNull": true 1585 + }, 1586 + "redacted_sprite_token": { 1587 + "name": "redacted_sprite_token", 1588 + "type": "text", 1589 + "primaryKey": false, 1590 + "notNull": true 1591 + }, 1592 + "created_at": { 1593 + "name": "created_at", 1594 + "type": "timestamp", 1595 + "primaryKey": false, 1596 + "notNull": true, 1597 + "default": "now()" 1598 + } 1599 + }, 1600 + "indexes": { 1601 + "unique_sprite_auth": { 1602 + "name": "unique_sprite_auth", 1603 + "columns": [ 1604 + { 1605 + "expression": "sandbox_id", 1606 + "isExpression": false, 1607 + "asc": true, 1608 + "nulls": "last" 1609 + }, 1610 + { 1611 + "expression": "user_id", 1612 + "isExpression": false, 1613 + "asc": true, 1614 + "nulls": "last" 1615 + } 1616 + ], 1617 + "isUnique": true, 1618 + "concurrently": false, 1619 + "method": "btree", 1620 + "with": {} 1621 + } 1622 + }, 1623 + "foreignKeys": { 1624 + "sprite_auth_sandbox_id_sandboxes_id_fk": { 1625 + "name": "sprite_auth_sandbox_id_sandboxes_id_fk", 1626 + "tableFrom": "sprite_auth", 1627 + "tableTo": "sandboxes", 1628 + "columnsFrom": [ 1629 + "sandbox_id" 1630 + ], 1631 + "columnsTo": [ 1632 + "id" 1633 + ], 1634 + "onDelete": "cascade", 1635 + "onUpdate": "no action" 1636 + }, 1637 + "sprite_auth_user_id_users_id_fk": { 1638 + "name": "sprite_auth_user_id_users_id_fk", 1639 + "tableFrom": "sprite_auth", 1640 + "tableTo": "users", 1641 + "columnsFrom": [ 1642 + "user_id" 1643 + ], 1644 + "columnsTo": [ 1645 + "id" 1646 + ], 1647 + "onDelete": "no action", 1648 + "onUpdate": "no action" 1649 + } 1650 + }, 1651 + "compositePrimaryKeys": {}, 1652 + "uniqueConstraints": {}, 1653 + "policies": {}, 1654 + "checkConstraints": {}, 1655 + "isRLSEnabled": false 1656 + }, 1657 + "public.ssh_keys": { 1658 + "name": "ssh_keys", 1659 + "schema": "", 1660 + "columns": { 1661 + "id": { 1662 + "name": "id", 1663 + "type": "text", 1664 + "primaryKey": true, 1665 + "notNull": true, 1666 + "default": "xata_id()" 1667 + }, 1668 + "sandbox_id": { 1669 + "name": "sandbox_id", 1670 + "type": "text", 1671 + "primaryKey": false, 1672 + "notNull": true 1673 + }, 1674 + "public_key": { 1675 + "name": "public_key", 1676 + "type": "text", 1677 + "primaryKey": false, 1678 + "notNull": true 1679 + }, 1680 + "private_key": { 1681 + "name": "private_key", 1682 + "type": "text", 1683 + "primaryKey": false, 1684 + "notNull": true 1685 + }, 1686 + "redacted": { 1687 + "name": "redacted", 1688 + "type": "text", 1689 + "primaryKey": false, 1690 + "notNull": false 1691 + }, 1692 + "created_at": { 1693 + "name": "created_at", 1694 + "type": "timestamp", 1695 + "primaryKey": false, 1696 + "notNull": true, 1697 + "default": "now()" 1698 + } 1699 + }, 1700 + "indexes": { 1701 + "unique_sandbox_ssh_key": { 1702 + "name": "unique_sandbox_ssh_key", 1703 + "columns": [ 1704 + { 1705 + "expression": "public_key", 1706 + "isExpression": false, 1707 + "asc": true, 1708 + "nulls": "last" 1709 + }, 1710 + { 1711 + "expression": "sandbox_id", 1712 + "isExpression": false, 1713 + "asc": true, 1714 + "nulls": "last" 1715 + } 1716 + ], 1717 + "isUnique": true, 1718 + "concurrently": false, 1719 + "method": "btree", 1720 + "with": {} 1721 + } 1722 + }, 1723 + "foreignKeys": { 1724 + "ssh_keys_sandbox_id_sandboxes_id_fk": { 1725 + "name": "ssh_keys_sandbox_id_sandboxes_id_fk", 1726 + "tableFrom": "ssh_keys", 1727 + "tableTo": "sandboxes", 1728 + "columnsFrom": [ 1729 + "sandbox_id" 1730 + ], 1731 + "columnsTo": [ 1732 + "id" 1733 + ], 1734 + "onDelete": "cascade", 1735 + "onUpdate": "no action" 1736 + } 1737 + }, 1738 + "compositePrimaryKeys": {}, 1739 + "uniqueConstraints": {}, 1740 + "policies": {}, 1741 + "checkConstraints": {}, 1742 + "isRLSEnabled": false 1743 + }, 1744 + "public.tailscale_auth_keys": { 1745 + "name": "tailscale_auth_keys", 1746 + "schema": "", 1747 + "columns": { 1748 + "id": { 1749 + "name": "id", 1750 + "type": "text", 1751 + "primaryKey": true, 1752 + "notNull": true, 1753 + "default": "xata_id()" 1754 + }, 1755 + "sandbox_id": { 1756 + "name": "sandbox_id", 1757 + "type": "text", 1758 + "primaryKey": false, 1759 + "notNull": true 1760 + }, 1761 + "auth_key": { 1762 + "name": "auth_key", 1763 + "type": "text", 1764 + "primaryKey": false, 1765 + "notNull": true 1766 + }, 1767 + "redacted": { 1768 + "name": "redacted", 1769 + "type": "text", 1770 + "primaryKey": false, 1771 + "notNull": true 1772 + }, 1773 + "created_at": { 1774 + "name": "created_at", 1775 + "type": "timestamp", 1776 + "primaryKey": false, 1777 + "notNull": true, 1778 + "default": "now()" 1779 + } 1780 + }, 1781 + "indexes": {}, 1782 + "foreignKeys": { 1783 + "tailscale_auth_keys_sandbox_id_sandboxes_id_fk": { 1784 + "name": "tailscale_auth_keys_sandbox_id_sandboxes_id_fk", 1785 + "tableFrom": "tailscale_auth_keys", 1786 + "tableTo": "sandboxes", 1787 + "columnsFrom": [ 1788 + "sandbox_id" 1789 + ], 1790 + "columnsTo": [ 1791 + "id" 1792 + ], 1793 + "onDelete": "cascade", 1794 + "onUpdate": "no action" 1795 + } 1796 + }, 1797 + "compositePrimaryKeys": {}, 1798 + "uniqueConstraints": {}, 1799 + "policies": {}, 1800 + "checkConstraints": {}, 1801 + "isRLSEnabled": false 1802 + }, 1803 + "public.users": { 1804 + "name": "users", 1805 + "schema": "", 1806 + "columns": { 1807 + "id": { 1808 + "name": "id", 1809 + "type": "text", 1810 + "primaryKey": true, 1811 + "notNull": true, 1812 + "default": "xata_id()" 1813 + }, 1814 + "did": { 1815 + "name": "did", 1816 + "type": "text", 1817 + "primaryKey": false, 1818 + "notNull": true 1819 + }, 1820 + "display_name": { 1821 + "name": "display_name", 1822 + "type": "text", 1823 + "primaryKey": false, 1824 + "notNull": false 1825 + }, 1826 + "handle": { 1827 + "name": "handle", 1828 + "type": "text", 1829 + "primaryKey": false, 1830 + "notNull": true 1831 + }, 1832 + "avatar": { 1833 + "name": "avatar", 1834 + "type": "text", 1835 + "primaryKey": false, 1836 + "notNull": false 1837 + }, 1838 + "created_at": { 1839 + "name": "created_at", 1840 + "type": "timestamp", 1841 + "primaryKey": false, 1842 + "notNull": true, 1843 + "default": "now()" 1844 + }, 1845 + "updated_at": { 1846 + "name": "updated_at", 1847 + "type": "timestamp", 1848 + "primaryKey": false, 1849 + "notNull": true, 1850 + "default": "now()" 1851 + } 1852 + }, 1853 + "indexes": {}, 1854 + "foreignKeys": {}, 1855 + "compositePrimaryKeys": {}, 1856 + "uniqueConstraints": { 1857 + "users_did_unique": { 1858 + "name": "users_did_unique", 1859 + "nullsNotDistinct": false, 1860 + "columns": [ 1861 + "did" 1862 + ] 1863 + }, 1864 + "users_handle_unique": { 1865 + "name": "users_handle_unique", 1866 + "nullsNotDistinct": false, 1867 + "columns": [ 1868 + "handle" 1869 + ] 1870 + } 1871 + }, 1872 + "policies": {}, 1873 + "checkConstraints": {}, 1874 + "isRLSEnabled": false 1875 + }, 1876 + "public.variables": { 1877 + "name": "variables", 1878 + "schema": "", 1879 + "columns": { 1880 + "id": { 1881 + "name": "id", 1882 + "type": "text", 1883 + "primaryKey": true, 1884 + "notNull": true, 1885 + "default": "variable_id()" 1886 + }, 1887 + "name": { 1888 + "name": "name", 1889 + "type": "text", 1890 + "primaryKey": false, 1891 + "notNull": true 1892 + }, 1893 + "value": { 1894 + "name": "value", 1895 + "type": "text", 1896 + "primaryKey": false, 1897 + "notNull": true 1898 + }, 1899 + "created_at": { 1900 + "name": "created_at", 1901 + "type": "timestamp", 1902 + "primaryKey": false, 1903 + "notNull": true, 1904 + "default": "now()" 1905 + }, 1906 + "updated_at": { 1907 + "name": "updated_at", 1908 + "type": "timestamp", 1909 + "primaryKey": false, 1910 + "notNull": true, 1911 + "default": "now()" 1912 + } 1913 + }, 1914 + "indexes": {}, 1915 + "foreignKeys": {}, 1916 + "compositePrimaryKeys": {}, 1917 + "uniqueConstraints": {}, 1918 + "policies": {}, 1919 + "checkConstraints": {}, 1920 + "isRLSEnabled": false 1921 + }, 1922 + "public.vercel_auth": { 1923 + "name": "vercel_auth", 1924 + "schema": "", 1925 + "columns": { 1926 + "id": { 1927 + "name": "id", 1928 + "type": "text", 1929 + "primaryKey": true, 1930 + "notNull": true, 1931 + "default": "xata_id()" 1932 + }, 1933 + "sandbox_id": { 1934 + "name": "sandbox_id", 1935 + "type": "text", 1936 + "primaryKey": false, 1937 + "notNull": true 1938 + }, 1939 + "user_id": { 1940 + "name": "user_id", 1941 + "type": "text", 1942 + "primaryKey": false, 1943 + "notNull": true 1944 + }, 1945 + "vercel_token": { 1946 + "name": "vercel_token", 1947 + "type": "text", 1948 + "primaryKey": false, 1949 + "notNull": true 1950 + }, 1951 + "redacted_vercel_token": { 1952 + "name": "redacted_vercel_token", 1953 + "type": "text", 1954 + "primaryKey": false, 1955 + "notNull": true 1956 + }, 1957 + "project_id": { 1958 + "name": "project_id", 1959 + "type": "text", 1960 + "primaryKey": false, 1961 + "notNull": true 1962 + }, 1963 + "team_id": { 1964 + "name": "team_id", 1965 + "type": "text", 1966 + "primaryKey": false, 1967 + "notNull": true 1968 + }, 1969 + "created_at": { 1970 + "name": "created_at", 1971 + "type": "timestamp", 1972 + "primaryKey": false, 1973 + "notNull": true, 1974 + "default": "now()" 1975 + } 1976 + }, 1977 + "indexes": { 1978 + "unique_vercel_auth": { 1979 + "name": "unique_vercel_auth", 1980 + "columns": [ 1981 + { 1982 + "expression": "sandbox_id", 1983 + "isExpression": false, 1984 + "asc": true, 1985 + "nulls": "last" 1986 + }, 1987 + { 1988 + "expression": "user_id", 1989 + "isExpression": false, 1990 + "asc": true, 1991 + "nulls": "last" 1992 + } 1993 + ], 1994 + "isUnique": true, 1995 + "concurrently": false, 1996 + "method": "btree", 1997 + "with": {} 1998 + } 1999 + }, 2000 + "foreignKeys": { 2001 + "vercel_auth_sandbox_id_sandboxes_id_fk": { 2002 + "name": "vercel_auth_sandbox_id_sandboxes_id_fk", 2003 + "tableFrom": "vercel_auth", 2004 + "tableTo": "sandboxes", 2005 + "columnsFrom": [ 2006 + "sandbox_id" 2007 + ], 2008 + "columnsTo": [ 2009 + "id" 2010 + ], 2011 + "onDelete": "cascade", 2012 + "onUpdate": "no action" 2013 + }, 2014 + "vercel_auth_user_id_users_id_fk": { 2015 + "name": "vercel_auth_user_id_users_id_fk", 2016 + "tableFrom": "vercel_auth", 2017 + "tableTo": "users", 2018 + "columnsFrom": [ 2019 + "user_id" 2020 + ], 2021 + "columnsTo": [ 2022 + "id" 2023 + ], 2024 + "onDelete": "no action", 2025 + "onUpdate": "no action" 2026 + } 2027 + }, 2028 + "compositePrimaryKeys": {}, 2029 + "uniqueConstraints": {}, 2030 + "policies": {}, 2031 + "checkConstraints": {}, 2032 + "isRLSEnabled": false 2033 + }, 2034 + "public.volumes": { 2035 + "name": "volumes", 2036 + "schema": "", 2037 + "columns": { 2038 + "id": { 2039 + "name": "id", 2040 + "type": "text", 2041 + "primaryKey": true, 2042 + "notNull": true, 2043 + "default": "volume_id()" 2044 + }, 2045 + "slug": { 2046 + "name": "slug", 2047 + "type": "text", 2048 + "primaryKey": false, 2049 + "notNull": true 2050 + }, 2051 + "size": { 2052 + "name": "size", 2053 + "type": "integer", 2054 + "primaryKey": false, 2055 + "notNull": true 2056 + }, 2057 + "size_unit": { 2058 + "name": "size_unit", 2059 + "type": "text", 2060 + "primaryKey": false, 2061 + "notNull": true 2062 + }, 2063 + "created_at": { 2064 + "name": "created_at", 2065 + "type": "timestamp", 2066 + "primaryKey": false, 2067 + "notNull": true, 2068 + "default": "now()" 2069 + }, 2070 + "updated_at": { 2071 + "name": "updated_at", 2072 + "type": "timestamp", 2073 + "primaryKey": false, 2074 + "notNull": true, 2075 + "default": "now()" 2076 + } 2077 + }, 2078 + "indexes": {}, 2079 + "foreignKeys": {}, 2080 + "compositePrimaryKeys": {}, 2081 + "uniqueConstraints": { 2082 + "volumes_slug_unique": { 2083 + "name": "volumes_slug_unique", 2084 + "nullsNotDistinct": false, 2085 + "columns": [ 2086 + "slug" 2087 + ] 2088 + } 2089 + }, 2090 + "policies": {}, 2091 + "checkConstraints": {}, 2092 + "isRLSEnabled": false 2093 + }, 2094 + "public.integrations": { 2095 + "name": "integrations", 2096 + "schema": "", 2097 + "columns": { 2098 + "id": { 2099 + "name": "id", 2100 + "type": "text", 2101 + "primaryKey": true, 2102 + "notNull": true, 2103 + "default": "xata_id()" 2104 + }, 2105 + "sandbox_id": { 2106 + "name": "sandbox_id", 2107 + "type": "text", 2108 + "primaryKey": false, 2109 + "notNull": true 2110 + }, 2111 + "name": { 2112 + "name": "name", 2113 + "type": "text", 2114 + "primaryKey": false, 2115 + "notNull": true 2116 + }, 2117 + "description": { 2118 + "name": "description", 2119 + "type": "text", 2120 + "primaryKey": false, 2121 + "notNull": false 2122 + }, 2123 + "webhook_url": { 2124 + "name": "webhook_url", 2125 + "type": "text", 2126 + "primaryKey": false, 2127 + "notNull": true 2128 + }, 2129 + "created_at": { 2130 + "name": "created_at", 2131 + "type": "timestamp", 2132 + "primaryKey": false, 2133 + "notNull": true, 2134 + "default": "now()" 2135 + } 2136 + }, 2137 + "indexes": { 2138 + "unique_sandbox_integration": { 2139 + "name": "unique_sandbox_integration", 2140 + "columns": [ 2141 + { 2142 + "expression": "sandbox_id", 2143 + "isExpression": false, 2144 + "asc": true, 2145 + "nulls": "last" 2146 + }, 2147 + { 2148 + "expression": "name", 2149 + "isExpression": false, 2150 + "asc": true, 2151 + "nulls": "last" 2152 + } 2153 + ], 2154 + "isUnique": true, 2155 + "concurrently": false, 2156 + "method": "btree", 2157 + "with": {} 2158 + } 2159 + }, 2160 + "foreignKeys": { 2161 + "integrations_sandbox_id_sandboxes_id_fk": { 2162 + "name": "integrations_sandbox_id_sandboxes_id_fk", 2163 + "tableFrom": "integrations", 2164 + "tableTo": "sandboxes", 2165 + "columnsFrom": [ 2166 + "sandbox_id" 2167 + ], 2168 + "columnsTo": [ 2169 + "id" 2170 + ], 2171 + "onDelete": "cascade", 2172 + "onUpdate": "no action" 2173 + } 2174 + }, 2175 + "compositePrimaryKeys": {}, 2176 + "uniqueConstraints": {}, 2177 + "policies": {}, 2178 + "checkConstraints": {}, 2179 + "isRLSEnabled": false 2180 + } 2181 + }, 2182 + "enums": {}, 2183 + "schemas": {}, 2184 + "sequences": {}, 2185 + "roles": {}, 2186 + "policies": {}, 2187 + "views": {}, 2188 + "_meta": { 2189 + "columns": {}, 2190 + "schemas": {}, 2191 + "tables": {} 2192 + } 2193 + }
+7
apps/cf-sandbox/drizzle/meta/_journal.json
··· 316 316 "when": 1775922491213, 317 317 "tag": "0044_organic_scalphunter", 318 318 "breakpoints": true 319 + }, 320 + { 321 + "idx": 45, 322 + "version": "7", 323 + "when": 1775928677824, 324 + "tag": "0045_windy_sinister_six", 325 + "breakpoints": true 319 326 } 320 327 ] 321 328 }
+2 -2
apps/cf-sandbox/src/schema/e2b-auth.ts
··· 15 15 userId: text("user_id") 16 16 .notNull() 17 17 .references(() => users.id), 18 - accessToken: text("access_token").notNull(), 19 - redactedAccessToken: text("redacted_access_token").notNull(), 18 + apiKey: text("api_key").notNull(), 19 + redactedApiKey: text("redacted_api_key").notNull(), 20 20 createdAt: timestamp("created_at").defaultNow().notNull(), 21 21 }, 22 22 (t) => [uniqueIndex("unique_e2b_auth").on(t.sandboxId, t.userId)],
+4 -5
apps/cli/src/cmd/create.ts
··· 113 113 } 114 114 115 115 if (provider === "e2b") { 116 - const e2bAccessToken = 117 - process.env.E2B_ACCESS_TOKEN || process.env.E2B_API_KEY; 118 - if (!e2bAccessToken) { 116 + const e2bApiKey = process.env.E2B_ACCESS_TOKEN || process.env.E2B_API_KEY; 117 + if (!e2bApiKey) { 119 118 consola.error( 120 119 "E2B_API_KEY environment variable is required for E2B provider.", 121 120 ); 122 121 process.exit(1); 123 122 } 124 - providerOptions.e2bAccessToken = await encrypt(e2bAccessToken); 125 - providerOptions.redactedE2bAccessToken = redact(e2bAccessToken); 123 + providerOptions.e2bApiKey = await encrypt(e2bApiKey); 124 + providerOptions.redactedE2bApiKey = redact(e2bApiKey); 126 125 } 127 126 128 127 try {
+6 -6
apps/modal-sandbox/src/providers/e2b/index.ts
··· 122 122 123 123 class E2bProvider implements BaseProvider { 124 124 async create(options: SandboxOptions): Promise<BaseSandbox> { 125 - if (!options.e2bAccessToken) { 126 - throw new Error("E2B access token is required to create a sandbox"); 125 + if (!options.e2bApiKey) { 126 + throw new Error("E2B API KEY is required to create a sandbox"); 127 127 } 128 128 const image = options.image || "ghcr.io/pocketenv-io/modal-openclaw:0.1.0"; 129 129 const template = Template().fromImage(image); ··· 134 134 memoryMB: 4096, 135 135 }); 136 136 const sandbox = await Sandbox.create(`${name}:${tag}`, { 137 - accessToken: options.e2bAccessToken, 137 + accessToken: options.e2bApiKey, 138 138 }); 139 139 return new E2bSandbox(sandbox); 140 140 } 141 141 142 142 async get(id: string, options?: SandboxOptions): Promise<BaseSandbox> { 143 143 try { 144 - if (!options?.e2bAccessToken) { 145 - throw new Error("E2B access token is required to get a sandbox"); 144 + if (!options?.e2bApiKey) { 145 + throw new Error("E2B API KEY is required to get a sandbox"); 146 146 } 147 147 const sandbox = await Sandbox.connect(id, { 148 - accessToken: options?.e2bAccessToken, 148 + accessToken: options?.e2bApiKey, 149 149 }); 150 150 return new E2bSandbox(sandbox); 151 151 } catch {
+1 -1
apps/modal-sandbox/src/providers/index.ts
··· 60 60 modalTokenSecret?: string; 61 61 modalAppName?: string; 62 62 image?: string; 63 - e2bAccessToken?: string; 63 + e2bApiKey?: string; 64 64 [key: string]: any; 65 65 } 66 66
+4 -4
apps/modal-sandbox/src/routes/sandboxes.ts
··· 190 190 .execute(); 191 191 } 192 192 193 - if (params.e2bAccessToken && user?.id) { 193 + if (params.e2bApiKey && user?.id) { 194 194 await tx 195 195 .insert(e2bAuth) 196 196 .values({ 197 197 sandboxId: record!.id, 198 - accessToken: params.e2bAccessToken!, 199 - redactedAccessToken: params.redactedE2bAccessToken ?? "", 198 + apiKey: params.e2bApiKey!, 199 + redactedApiKey: params.redactedE2bApiKey ?? "", 200 200 userId: user.id, 201 201 }) 202 202 .execute(); ··· 223 223 modalTokenId: decrypt(params.modalTokenId), 224 224 modalTokenSecret: decrypt(params.modalTokenSecret), 225 225 image: images[params.base] || images["openclaw"], 226 - e2bAccessToken: decrypt(params.e2bAccessToken), 226 + e2bApiKey: decrypt(params.e2bApiKey), 227 227 }); 228 228 const sandboxId = await sandbox.id(); 229 229
+2 -2
apps/modal-sandbox/src/schema/e2b-auth.ts
··· 15 15 userId: text("user_id") 16 16 .notNull() 17 17 .references(() => users.id), 18 - accessToken: text("access_token").notNull(), 19 - redactedAccessToken: text("redacted_access_token").notNull(), 18 + apiKey: text("api_key").notNull(), 19 + redactedApiKey: text("redacted_api_key").notNull(), 20 20 createdAt: timestamp("created_at").defaultNow().notNull(), 21 21 }, 22 22 (t) => [uniqueIndex("unique_e2b_auth").on(t.sandboxId, t.userId)],
+12 -5
apps/modal-sandbox/src/types/sandbox.ts
··· 52 52 redactedModalTokenId: z.string().optional(), 53 53 modalTokenSecret: z.string().optional(), 54 54 redactedModalTokenSecret: z.string().optional(), 55 - e2bAccessToken: z.string().optional(), 56 - redactedE2bAccessToken: z.string().optional(), 55 + e2bApiKey: z.string().optional(), 56 + redactedE2bApiKey: z.string().optional(), 57 57 vcpus: z.number().optional().default(2), 58 58 memory: z.number().optional().default(4), 59 59 disk: z.number().optional().default(3), ··· 206 206 } 207 207 208 208 if (data.provider === "e2b") { 209 - if (!data.e2bAccessToken) { 209 + if (!data.e2bApiKey) { 210 + ctx.addIssue({ 211 + code: z.ZodIssueCode.custom, 212 + message: "e2bApiKey is required when provider is 'e2b'", 213 + path: ["e2bApiKey"], 214 + }); 215 + } 216 + if (!data.redactedE2bApiKey) { 210 217 ctx.addIssue({ 211 218 code: z.ZodIssueCode.custom, 212 - message: "e2bAccessToken is required when provider is 'e2b'", 213 - path: ["e2bAccessToken"], 219 + message: "redactedE2bApiKey is required when provider is 'e2b'", 220 + path: ["redactedE2bApiKey"], 214 221 }); 215 222 } 216 223 }
+36 -34
apps/web/src/pages/settings/provider/Provider.tsx
··· 43 43 vercelTeamId: z.string().optional(), 44 44 tokenId: z.string().optional(), 45 45 tokenSecret: z.string().optional(), 46 - e2bAccessToken: z.string().optional(), 46 + e2bApiKey: z.string().optional(), 47 47 }) 48 48 .superRefine((data, ctx) => { 49 49 if ( ··· 93 93 path: ["tokenSecret"], 94 94 }); 95 95 } 96 - if (data.provider === "e2b" && !data.e2bAccessToken?.trim()) { 96 + if (data.provider === "e2b" && !data.e2bApiKey?.trim()) { 97 97 ctx.addIssue({ 98 98 code: z.ZodIssueCode.custom, 99 99 message: "E2B Access Token is required", 100 - path: ["e2bAccessToken"], 100 + path: ["e2bApiKey"], 101 101 }); 102 102 } 103 103 }); ··· 133 133 vercelTeamId: "", 134 134 tokenId: "", 135 135 tokenSecret: "", 136 - e2bAccessToken: "", 136 + e2bApiKey: "", 137 137 }, 138 138 }); 139 139 ··· 151 151 setValue("vercelTeamId", providerPref.vercelTeamId ?? ""); 152 152 setValue("tokenId", providerPref.redactedModalTokenId ?? ""); 153 153 setValue("tokenSecret", providerPref.redactedModalTokenSecret ?? ""); 154 - setValue("e2bAccessToken", providerPref.redactedE2bAccessToken ?? ""); 154 + setValue("e2bApiKey", providerPref.redactedE2bApiKey ?? ""); 155 155 } 156 156 }, [preferences, setValue]); 157 157 ··· 209 209 : values.tokenSecret; 210 210 } 211 211 } else if (values.provider === "e2b") { 212 - if (values.e2bAccessToken && !values.e2bAccessToken.includes("**")) { 212 + if (values.e2bApiKey && !values.e2bApiKey.includes("**")) { 213 213 const sealed = sodium.cryptoBoxSeal( 214 - sodium.fromString(values.e2bAccessToken.trim()), 214 + sodium.fromString(values.e2bApiKey.trim()), 215 215 sodium.fromHex(PUBLIC_KEY), 216 216 ); 217 - pref.e2bAccessToken = sodium.toBase64( 217 + pref.e2bApiKey = sodium.toBase64( 218 218 sealed, 219 219 sodium.base64Variants.URLSAFE_NO_PADDING, 220 220 ); 221 - pref.redactedE2bAccessToken = 222 - values.e2bAccessToken.length > 14 223 - ? values.e2bAccessToken.slice(0, 11) + 221 + pref.redactedE2bApiKey = 222 + values.e2bApiKey.length > 14 223 + ? values.e2bApiKey.slice(0, 11) + 224 224 "*".repeat(24) + 225 - values.e2bAccessToken.slice(-3) 226 - : values.e2bAccessToken; 225 + values.e2bApiKey.slice(-3) 226 + : values.e2bApiKey; 227 227 } 228 228 } else if ( 229 229 values.apiKey?.includes("**") && ··· 300 300 setValue("vercelTeamId", ""); 301 301 setValue("tokenId", ""); 302 302 setValue("tokenSecret", ""); 303 - setValue("e2bAccessToken", ""); 303 + setValue("e2bApiKey", ""); 304 304 }} 305 305 className="select select-lg font-medium text-[15px]" 306 306 > ··· 315 315 <option value="e2b">E2B</option> 316 316 </select> 317 317 </div> 318 - {provider !== "cloudflare" && provider !== "modal" && provider !== "e2b" && ( 319 - <div className="w-96"> 320 - <label className="label-text"> 321 - {LABELS[provider as keyof typeof LABELS]} 322 - </label> 323 - <input 324 - {...register("apiKey")} 325 - type="text" 326 - className="input input-lg font-medium text-[15px]" 327 - /> 328 - {errors.apiKey && ( 329 - <p className="text-error text-sm mt-1"> 330 - {errors.apiKey.message} 331 - </p> 332 - )} 333 - </div> 334 - )} 318 + {provider !== "cloudflare" && 319 + provider !== "modal" && 320 + provider !== "e2b" && ( 321 + <div className="w-96"> 322 + <label className="label-text"> 323 + {LABELS[provider as keyof typeof LABELS]} 324 + </label> 325 + <input 326 + {...register("apiKey")} 327 + type="text" 328 + className="input input-lg font-medium text-[15px]" 329 + /> 330 + {errors.apiKey && ( 331 + <p className="text-error text-sm mt-1"> 332 + {errors.apiKey.message} 333 + </p> 334 + )} 335 + </div> 336 + )} 335 337 </div> 336 338 {provider === "daytona" && ( 337 339 <div className="w-full mt-4"> ··· 384 386 <div className="w-96 mt-4"> 385 387 <label className="label-text">E2B Access Token</label> 386 388 <input 387 - {...register("e2bAccessToken")} 389 + {...register("e2bApiKey")} 388 390 type="text" 389 391 className="input input-lg font-medium text-[15px]" 390 392 /> 391 - {errors.e2bAccessToken && ( 393 + {errors.e2bApiKey && ( 392 394 <p className="text-error text-sm mt-1"> 393 - {errors.e2bAccessToken.message} 395 + {errors.e2bApiKey.message} 394 396 </p> 395 397 )} 396 398 </div>
+2 -2
apps/web/src/types/preferences.ts
··· 17 17 redactedModalTokenId?: string; 18 18 modalTokenSecret?: string; 19 19 redactedModalTokenSecret?: string; 20 - e2bAccessToken?: string; 21 - redactedE2bAccessToken?: string; 20 + e2bApiKey?: string; 21 + redactedE2bApiKey?: string; 22 22 $type: "io.pocketenv.sandbox.defs#sandboxProviderPref"; 23 23 }; 24 24