@cloudflare/sandbox 0.0.0-bb72193 → 0.0.0-bb855ca

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts CHANGED
@@ -342,6 +342,14 @@ export interface GetProcessLogsResponse {
342
342
  processId: string;
343
343
  }
344
344
 
345
+ // Import code interpreter types
346
+ import type {
347
+ CodeContext,
348
+ CreateContextOptions,
349
+ ExecutionResult,
350
+ RunCodeOptions
351
+ } from './interpreter-types';
352
+
345
353
  // Main Sandbox Interface
346
354
 
347
355
  export interface ISandbox {
@@ -362,6 +370,13 @@ export interface ISandbox {
362
370
  // Utility methods
363
371
  cleanupCompletedProcesses(): Promise<number>;
364
372
  getProcessLogs(id: string): Promise<{ stdout: string; stderr: string }>;
373
+
374
+ // Code Interpreter API
375
+ createCodeContext(options?: CreateContextOptions): Promise<CodeContext>;
376
+ runCode(code: string, options?: RunCodeOptions): Promise<ExecutionResult>;
377
+ runCodeStream(code: string, options?: RunCodeOptions): Promise<ReadableStream>;
378
+ listCodeContexts(): Promise<CodeContext[]>;
379
+ deleteCodeContext(contextId: string): Promise<void>;
365
380
  }
366
381
 
367
382
  // Type Guards