@cloudflare/sandbox 0.4.11 → 0.4.14

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.
Files changed (79) hide show
  1. package/.turbo/turbo-build.log +13 -47
  2. package/CHANGELOG.md +44 -16
  3. package/Dockerfile +15 -9
  4. package/README.md +0 -1
  5. package/dist/index.d.ts +1889 -9
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +3144 -65
  8. package/dist/index.js.map +1 -1
  9. package/package.json +5 -5
  10. package/src/clients/base-client.ts +39 -24
  11. package/src/clients/command-client.ts +8 -8
  12. package/src/clients/file-client.ts +31 -26
  13. package/src/clients/git-client.ts +3 -4
  14. package/src/clients/index.ts +12 -16
  15. package/src/clients/interpreter-client.ts +51 -47
  16. package/src/clients/port-client.ts +10 -10
  17. package/src/clients/process-client.ts +11 -8
  18. package/src/clients/sandbox-client.ts +2 -4
  19. package/src/clients/types.ts +6 -2
  20. package/src/clients/utility-client.ts +10 -6
  21. package/src/errors/adapter.ts +90 -32
  22. package/src/errors/classes.ts +189 -64
  23. package/src/errors/index.ts +9 -5
  24. package/src/file-stream.ts +11 -6
  25. package/src/index.ts +22 -15
  26. package/src/interpreter.ts +50 -41
  27. package/src/request-handler.ts +24 -21
  28. package/src/sandbox.ts +370 -148
  29. package/src/security.ts +21 -6
  30. package/src/sse-parser.ts +4 -3
  31. package/src/version.ts +1 -1
  32. package/tests/base-client.test.ts +116 -80
  33. package/tests/command-client.test.ts +149 -112
  34. package/tests/file-client.test.ts +309 -197
  35. package/tests/file-stream.test.ts +24 -20
  36. package/tests/get-sandbox.test.ts +45 -6
  37. package/tests/git-client.test.ts +188 -101
  38. package/tests/port-client.test.ts +100 -108
  39. package/tests/process-client.test.ts +204 -179
  40. package/tests/request-handler.test.ts +117 -65
  41. package/tests/sandbox.test.ts +220 -68
  42. package/tests/sse-parser.test.ts +17 -16
  43. package/tests/utility-client.test.ts +79 -72
  44. package/tsdown.config.ts +12 -0
  45. package/vitest.config.ts +6 -6
  46. package/dist/chunk-BFVUNTP4.js +0 -104
  47. package/dist/chunk-BFVUNTP4.js.map +0 -1
  48. package/dist/chunk-EKSWCBCA.js +0 -86
  49. package/dist/chunk-EKSWCBCA.js.map +0 -1
  50. package/dist/chunk-FE4PJSRB.js +0 -7
  51. package/dist/chunk-FE4PJSRB.js.map +0 -1
  52. package/dist/chunk-JXZMAU2C.js +0 -559
  53. package/dist/chunk-JXZMAU2C.js.map +0 -1
  54. package/dist/chunk-SVWLTRHD.js +0 -2456
  55. package/dist/chunk-SVWLTRHD.js.map +0 -1
  56. package/dist/chunk-Z532A7QC.js +0 -78
  57. package/dist/chunk-Z532A7QC.js.map +0 -1
  58. package/dist/file-stream.d.ts +0 -43
  59. package/dist/file-stream.js +0 -9
  60. package/dist/file-stream.js.map +0 -1
  61. package/dist/interpreter.d.ts +0 -33
  62. package/dist/interpreter.js +0 -8
  63. package/dist/interpreter.js.map +0 -1
  64. package/dist/request-handler.d.ts +0 -18
  65. package/dist/request-handler.js +0 -13
  66. package/dist/request-handler.js.map +0 -1
  67. package/dist/sandbox-DWQVgVTY.d.ts +0 -603
  68. package/dist/sandbox.d.ts +0 -4
  69. package/dist/sandbox.js +0 -13
  70. package/dist/sandbox.js.map +0 -1
  71. package/dist/security.d.ts +0 -31
  72. package/dist/security.js +0 -13
  73. package/dist/security.js.map +0 -1
  74. package/dist/sse-parser.d.ts +0 -28
  75. package/dist/sse-parser.js +0 -11
  76. package/dist/sse-parser.js.map +0 -1
  77. package/dist/version.d.ts +0 -8
  78. package/dist/version.js +0 -7
  79. package/dist/version.js.map +0 -1
@@ -9,7 +9,8 @@ import type {
9
9
  CodeExecutionContext,
10
10
  CommandErrorContext,
11
11
  CommandNotFoundContext,
12
- ContextNotFoundContext,ErrorResponse,
12
+ ContextNotFoundContext,
13
+ ErrorResponse,
13
14
  FileExistsContext,
14
15
  FileNotFoundContext,
15
16
  FileSystemContext,
@@ -25,7 +26,7 @@ import type {
25
26
  PortNotExposedContext,
26
27
  ProcessErrorContext,
27
28
  ProcessNotFoundContext,
28
- ValidationFailedContext,
29
+ ValidationFailedContext
29
30
  } from '@repo/shared/errors';
30
31
 
31
32
  /**
@@ -39,13 +40,27 @@ export class SandboxError<TContext = Record<string, unknown>> extends Error {
39
40
  }
40
41
 
41
42
  // Convenience accessors
42
- get code() { return this.errorResponse.code; }
43
- get context() { return this.errorResponse.context; }
44
- get httpStatus() { return this.errorResponse.httpStatus; }
45
- get operation() { return this.errorResponse.operation; }
46
- get suggestion() { return this.errorResponse.suggestion; }
47
- get timestamp() { return this.errorResponse.timestamp; }
48
- get documentation() { return this.errorResponse.documentation; }
43
+ get code() {
44
+ return this.errorResponse.code;
45
+ }
46
+ get context() {
47
+ return this.errorResponse.context;
48
+ }
49
+ get httpStatus() {
50
+ return this.errorResponse.httpStatus;
51
+ }
52
+ get operation() {
53
+ return this.errorResponse.operation;
54
+ }
55
+ get suggestion() {
56
+ return this.errorResponse.suggestion;
57
+ }
58
+ get timestamp() {
59
+ return this.errorResponse.timestamp;
60
+ }
61
+ get documentation() {
62
+ return this.errorResponse.documentation;
63
+ }
49
64
 
50
65
  // Custom serialization for logging
51
66
  toJSON() {
@@ -78,7 +93,9 @@ export class FileNotFoundError extends SandboxError<FileNotFoundContext> {
78
93
  }
79
94
 
80
95
  // Type-safe accessors
81
- get path() { return this.context.path; }
96
+ get path() {
97
+ return this.context.path;
98
+ }
82
99
  }
83
100
 
84
101
  /**
@@ -91,7 +108,9 @@ export class FileExistsError extends SandboxError<FileExistsContext> {
91
108
  }
92
109
 
93
110
  // Type-safe accessor
94
- get path() { return this.context.path; }
111
+ get path() {
112
+ return this.context.path;
113
+ }
95
114
  }
96
115
 
97
116
  /**
@@ -104,9 +123,15 @@ export class FileSystemError extends SandboxError<FileSystemContext> {
104
123
  }
105
124
 
106
125
  // Type-safe accessors
107
- get path() { return this.context.path; }
108
- get stderr() { return this.context.stderr; }
109
- get exitCode() { return this.context.exitCode; }
126
+ get path() {
127
+ return this.context.path;
128
+ }
129
+ get stderr() {
130
+ return this.context.stderr;
131
+ }
132
+ get exitCode() {
133
+ return this.context.exitCode;
134
+ }
110
135
  }
111
136
 
112
137
  /**
@@ -118,7 +143,9 @@ export class PermissionDeniedError extends SandboxError<FileSystemContext> {
118
143
  this.name = 'PermissionDeniedError';
119
144
  }
120
145
 
121
- get path() { return this.context.path; }
146
+ get path() {
147
+ return this.context.path;
148
+ }
122
149
  }
123
150
 
124
151
  // ============================================================================
@@ -135,7 +162,9 @@ export class CommandNotFoundError extends SandboxError<CommandNotFoundContext> {
135
162
  }
136
163
 
137
164
  // Type-safe accessor
138
- get command() { return this.context.command; }
165
+ get command() {
166
+ return this.context.command;
167
+ }
139
168
  }
140
169
 
141
170
  /**
@@ -148,10 +177,18 @@ export class CommandError extends SandboxError<CommandErrorContext> {
148
177
  }
149
178
 
150
179
  // Type-safe accessors
151
- get command() { return this.context.command; }
152
- get exitCode() { return this.context.exitCode; }
153
- get stdout() { return this.context.stdout; }
154
- get stderr() { return this.context.stderr; }
180
+ get command() {
181
+ return this.context.command;
182
+ }
183
+ get exitCode() {
184
+ return this.context.exitCode;
185
+ }
186
+ get stdout() {
187
+ return this.context.stdout;
188
+ }
189
+ get stderr() {
190
+ return this.context.stderr;
191
+ }
155
192
  }
156
193
 
157
194
  // ============================================================================
@@ -168,7 +205,9 @@ export class ProcessNotFoundError extends SandboxError<ProcessNotFoundContext> {
168
205
  }
169
206
 
170
207
  // Type-safe accessor
171
- get processId() { return this.context.processId; }
208
+ get processId() {
209
+ return this.context.processId;
210
+ }
172
211
  }
173
212
 
174
213
  /**
@@ -181,10 +220,18 @@ export class ProcessError extends SandboxError<ProcessErrorContext> {
181
220
  }
182
221
 
183
222
  // Type-safe accessors
184
- get processId() { return this.context.processId; }
185
- get pid() { return this.context.pid; }
186
- get exitCode() { return this.context.exitCode; }
187
- get stderr() { return this.context.stderr; }
223
+ get processId() {
224
+ return this.context.processId;
225
+ }
226
+ get pid() {
227
+ return this.context.pid;
228
+ }
229
+ get exitCode() {
230
+ return this.context.exitCode;
231
+ }
232
+ get stderr() {
233
+ return this.context.stderr;
234
+ }
188
235
  }
189
236
 
190
237
  // ============================================================================
@@ -201,8 +248,12 @@ export class PortAlreadyExposedError extends SandboxError<PortAlreadyExposedCont
201
248
  }
202
249
 
203
250
  // Type-safe accessors
204
- get port() { return this.context.port; }
205
- get portName() { return this.context.portName; }
251
+ get port() {
252
+ return this.context.port;
253
+ }
254
+ get portName() {
255
+ return this.context.portName;
256
+ }
206
257
  }
207
258
 
208
259
  /**
@@ -215,7 +266,9 @@ export class PortNotExposedError extends SandboxError<PortNotExposedContext> {
215
266
  }
216
267
 
217
268
  // Type-safe accessor
218
- get port() { return this.context.port; }
269
+ get port() {
270
+ return this.context.port;
271
+ }
219
272
  }
220
273
 
221
274
  /**
@@ -228,8 +281,12 @@ export class InvalidPortError extends SandboxError<InvalidPortContext> {
228
281
  }
229
282
 
230
283
  // Type-safe accessors
231
- get port() { return this.context.port; }
232
- get reason() { return this.context.reason; }
284
+ get port() {
285
+ return this.context.port;
286
+ }
287
+ get reason() {
288
+ return this.context.reason;
289
+ }
233
290
  }
234
291
 
235
292
  /**
@@ -242,8 +299,12 @@ export class ServiceNotRespondingError extends SandboxError<PortErrorContext> {
242
299
  }
243
300
 
244
301
  // Type-safe accessors
245
- get port() { return this.context.port; }
246
- get portName() { return this.context.portName; }
302
+ get port() {
303
+ return this.context.port;
304
+ }
305
+ get portName() {
306
+ return this.context.portName;
307
+ }
247
308
  }
248
309
 
249
310
  /**
@@ -256,7 +317,9 @@ export class PortInUseError extends SandboxError<PortErrorContext> {
256
317
  }
257
318
 
258
319
  // Type-safe accessor
259
- get port() { return this.context.port; }
320
+ get port() {
321
+ return this.context.port;
322
+ }
260
323
  }
261
324
 
262
325
  /**
@@ -269,9 +332,15 @@ export class PortError extends SandboxError<PortErrorContext> {
269
332
  }
270
333
 
271
334
  // Type-safe accessors
272
- get port() { return this.context.port; }
273
- get portName() { return this.context.portName; }
274
- get stderr() { return this.context.stderr; }
335
+ get port() {
336
+ return this.context.port;
337
+ }
338
+ get portName() {
339
+ return this.context.portName;
340
+ }
341
+ get stderr() {
342
+ return this.context.stderr;
343
+ }
275
344
  }
276
345
 
277
346
  /**
@@ -298,7 +367,9 @@ export class GitRepositoryNotFoundError extends SandboxError<GitRepositoryNotFou
298
367
  }
299
368
 
300
369
  // Type-safe accessor
301
- get repository() { return this.context.repository; }
370
+ get repository() {
371
+ return this.context.repository;
372
+ }
302
373
  }
303
374
 
304
375
  /**
@@ -311,7 +382,9 @@ export class GitAuthenticationError extends SandboxError<GitAuthFailedContext> {
311
382
  }
312
383
 
313
384
  // Type-safe accessor
314
- get repository() { return this.context.repository; }
385
+ get repository() {
386
+ return this.context.repository;
387
+ }
315
388
  }
316
389
 
317
390
  /**
@@ -324,8 +397,12 @@ export class GitBranchNotFoundError extends SandboxError<GitBranchNotFoundContex
324
397
  }
325
398
 
326
399
  // Type-safe accessors
327
- get branch() { return this.context.branch; }
328
- get repository() { return this.context.repository; }
400
+ get branch() {
401
+ return this.context.branch;
402
+ }
403
+ get repository() {
404
+ return this.context.repository;
405
+ }
329
406
  }
330
407
 
331
408
  /**
@@ -338,9 +415,15 @@ export class GitNetworkError extends SandboxError<GitErrorContext> {
338
415
  }
339
416
 
340
417
  // Type-safe accessors
341
- get repository() { return this.context.repository; }
342
- get branch() { return this.context.branch; }
343
- get targetDir() { return this.context.targetDir; }
418
+ get repository() {
419
+ return this.context.repository;
420
+ }
421
+ get branch() {
422
+ return this.context.branch;
423
+ }
424
+ get targetDir() {
425
+ return this.context.targetDir;
426
+ }
344
427
  }
345
428
 
346
429
  /**
@@ -353,10 +436,18 @@ export class GitCloneError extends SandboxError<GitErrorContext> {
353
436
  }
354
437
 
355
438
  // Type-safe accessors
356
- get repository() { return this.context.repository; }
357
- get targetDir() { return this.context.targetDir; }
358
- get stderr() { return this.context.stderr; }
359
- get exitCode() { return this.context.exitCode; }
439
+ get repository() {
440
+ return this.context.repository;
441
+ }
442
+ get targetDir() {
443
+ return this.context.targetDir;
444
+ }
445
+ get stderr() {
446
+ return this.context.stderr;
447
+ }
448
+ get exitCode() {
449
+ return this.context.exitCode;
450
+ }
360
451
  }
361
452
 
362
453
  /**
@@ -369,9 +460,15 @@ export class GitCheckoutError extends SandboxError<GitErrorContext> {
369
460
  }
370
461
 
371
462
  // Type-safe accessors
372
- get branch() { return this.context.branch; }
373
- get repository() { return this.context.repository; }
374
- get stderr() { return this.context.stderr; }
463
+ get branch() {
464
+ return this.context.branch;
465
+ }
466
+ get repository() {
467
+ return this.context.repository;
468
+ }
469
+ get stderr() {
470
+ return this.context.stderr;
471
+ }
375
472
  }
376
473
 
377
474
  /**
@@ -384,7 +481,9 @@ export class InvalidGitUrlError extends SandboxError<ValidationFailedContext> {
384
481
  }
385
482
 
386
483
  // Type-safe accessor
387
- get validationErrors() { return this.context.validationErrors; }
484
+ get validationErrors() {
485
+ return this.context.validationErrors;
486
+ }
388
487
  }
389
488
 
390
489
  /**
@@ -397,11 +496,21 @@ export class GitError extends SandboxError<GitErrorContext> {
397
496
  }
398
497
 
399
498
  // Type-safe accessors
400
- get repository() { return this.context.repository; }
401
- get branch() { return this.context.branch; }
402
- get targetDir() { return this.context.targetDir; }
403
- get stderr() { return this.context.stderr; }
404
- get exitCode() { return this.context.exitCode; }
499
+ get repository() {
500
+ return this.context.repository;
501
+ }
502
+ get branch() {
503
+ return this.context.branch;
504
+ }
505
+ get targetDir() {
506
+ return this.context.targetDir;
507
+ }
508
+ get stderr() {
509
+ return this.context.stderr;
510
+ }
511
+ get exitCode() {
512
+ return this.context.exitCode;
513
+ }
405
514
  }
406
515
 
407
516
  // ============================================================================
@@ -418,8 +527,12 @@ export class InterpreterNotReadyError extends SandboxError<InterpreterNotReadyCo
418
527
  }
419
528
 
420
529
  // Type-safe accessors
421
- get retryAfter() { return this.context.retryAfter; }
422
- get progress() { return this.context.progress; }
530
+ get retryAfter() {
531
+ return this.context.retryAfter;
532
+ }
533
+ get progress() {
534
+ return this.context.progress;
535
+ }
423
536
  }
424
537
 
425
538
  /**
@@ -432,7 +545,9 @@ export class ContextNotFoundError extends SandboxError<ContextNotFoundContext> {
432
545
  }
433
546
 
434
547
  // Type-safe accessor
435
- get contextId() { return this.context.contextId; }
548
+ get contextId() {
549
+ return this.context.contextId;
550
+ }
436
551
  }
437
552
 
438
553
  /**
@@ -445,10 +560,18 @@ export class CodeExecutionError extends SandboxError<CodeExecutionContext> {
445
560
  }
446
561
 
447
562
  // Type-safe accessors
448
- get contextId() { return this.context.contextId; }
449
- get ename() { return this.context.ename; }
450
- get evalue() { return this.context.evalue; }
451
- get traceback() { return this.context.traceback; }
563
+ get contextId() {
564
+ return this.context.contextId;
565
+ }
566
+ get ename() {
567
+ return this.context.ename;
568
+ }
569
+ get evalue() {
570
+ return this.context.evalue;
571
+ }
572
+ get traceback() {
573
+ return this.context.traceback;
574
+ }
452
575
  }
453
576
 
454
577
  // ============================================================================
@@ -465,5 +588,7 @@ export class ValidationFailedError extends SandboxError<ValidationFailedContext>
465
588
  }
466
589
 
467
590
  // Type-safe accessor
468
- get validationErrors() { return this.context.validationErrors; }
591
+ get validationErrors() {
592
+ return this.context.validationErrors;
593
+ }
469
594
  }
@@ -39,11 +39,13 @@
39
39
  */
40
40
 
41
41
  // Re-export context types for advanced usage
42
- export type {
42
+ export type {
43
43
  CodeExecutionContext,
44
44
  CommandErrorContext,
45
45
  CommandNotFoundContext,
46
- ContextNotFoundContext,ErrorCodeType, ErrorResponse,
46
+ ContextNotFoundContext,
47
+ ErrorCodeType,
48
+ ErrorResponse,
47
49
  FileExistsContext,
48
50
  FileNotFoundContext,
49
51
  FileSystemContext,
@@ -53,13 +55,15 @@ export type {
53
55
  GitRepositoryNotFoundContext,
54
56
  InternalErrorContext,
55
57
  InterpreterNotReadyContext,
56
- InvalidPortContext,OperationType,
58
+ InvalidPortContext,
59
+ OperationType,
57
60
  PortAlreadyExposedContext,
58
61
  PortErrorContext,
59
62
  PortNotExposedContext,
60
63
  ProcessErrorContext,
61
64
  ProcessNotFoundContext,
62
- ValidationFailedContext,} from '@repo/shared/errors';
65
+ ValidationFailedContext
66
+ } from '@repo/shared/errors';
63
67
  // Re-export shared types and constants
64
68
  export { ErrorCode, Operation } from '@repo/shared/errors';
65
69
 
@@ -101,5 +105,5 @@ export {
101
105
  SandboxError,
102
106
  ServiceNotRespondingError,
103
107
  // Validation Errors
104
- ValidationFailedError,
108
+ ValidationFailedError
105
109
  } from './classes';
@@ -3,7 +3,9 @@ import type { FileChunk, FileMetadata, FileStreamEvent } from '@repo/shared';
3
3
  /**
4
4
  * Parse SSE (Server-Sent Events) lines from a stream
5
5
  */
6
- async function* parseSSE(stream: ReadableStream<Uint8Array>): AsyncGenerator<FileStreamEvent> {
6
+ async function* parseSSE(
7
+ stream: ReadableStream<Uint8Array>
8
+ ): AsyncGenerator<FileStreamEvent> {
7
9
  const reader = stream.getReader();
8
10
  const decoder = new TextDecoder();
9
11
  let buffer = '';
@@ -59,7 +61,9 @@ async function* parseSSE(stream: ReadableStream<Uint8Array>): AsyncGenerator<Fil
59
61
  * }
60
62
  * ```
61
63
  */
62
- export async function* streamFile(stream: ReadableStream<Uint8Array>): AsyncGenerator<FileChunk, FileMetadata> {
64
+ export async function* streamFile(
65
+ stream: ReadableStream<Uint8Array>
66
+ ): AsyncGenerator<FileChunk, FileMetadata> {
63
67
  let metadata: FileMetadata | null = null;
64
68
 
65
69
  for await (const event of parseSSE(stream)) {
@@ -69,7 +73,7 @@ export async function* streamFile(stream: ReadableStream<Uint8Array>): AsyncGene
69
73
  mimeType: event.mimeType,
70
74
  size: event.size,
71
75
  isBinary: event.isBinary,
72
- encoding: event.encoding,
76
+ encoding: event.encoding
73
77
  };
74
78
  break;
75
79
 
@@ -144,8 +148,9 @@ export async function collectFile(stream: ReadableStream<Uint8Array>): Promise<{
144
148
  // Combine chunks based on type
145
149
  if (metadata.isBinary) {
146
150
  // Binary file - combine Uint8Arrays
147
- const totalLength = chunks.reduce((sum, chunk) =>
148
- sum + (chunk instanceof Uint8Array ? chunk.length : 0), 0
151
+ const totalLength = chunks.reduce(
152
+ (sum, chunk) => sum + (chunk instanceof Uint8Array ? chunk.length : 0),
153
+ 0
149
154
  );
150
155
  const combined = new Uint8Array(totalLength);
151
156
  let offset = 0;
@@ -158,7 +163,7 @@ export async function collectFile(stream: ReadableStream<Uint8Array>): Promise<{
158
163
  return { content: combined, metadata };
159
164
  } else {
160
165
  // Text file - combine strings
161
- const combined = chunks.filter(c => typeof c === 'string').join('');
166
+ const combined = chunks.filter((c) => typeof c === 'string').join('');
162
167
  return { content: combined, metadata };
163
168
  }
164
169
  }
package/src/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  // Export the main Sandbox class and utilities
2
2
 
3
-
4
3
  // Export the new client architecture
5
4
  export {
6
5
  CommandClient,
@@ -10,8 +9,8 @@ export {
10
9
  ProcessClient,
11
10
  SandboxClient,
12
11
  UtilityClient
13
- } from "./clients";
14
- export { getSandbox, Sandbox } from "./sandbox";
12
+ } from './clients';
13
+ export { getSandbox, Sandbox } from './sandbox';
15
14
 
16
15
  // Legacy types are now imported from the new client architecture
17
16
 
@@ -20,21 +19,20 @@ export type {
20
19
  BaseExecOptions,
21
20
  ExecEvent,
22
21
  ExecOptions,
23
- ExecResult,FileChunk, FileMetadata, FileStreamEvent,
22
+ ExecResult,
23
+ FileChunk,
24
+ FileMetadata,
25
+ FileStreamEvent,
24
26
  ISandbox,
25
27
  LogEvent,
26
28
  Process,
27
29
  ProcessOptions,
28
30
  ProcessStatus,
29
- StreamOptions
30
- } from "@repo/shared";
31
+ StreamOptions
32
+ } from '@repo/shared';
31
33
  export * from '@repo/shared';
32
34
  // Export type guards for runtime validation
33
- export {
34
- isExecResult,
35
- isProcess,
36
- isProcessStatus
37
- } from "@repo/shared";
35
+ export { isExecResult, isProcess, isProcessStatus } from '@repo/shared';
38
36
  // Export all client types from new architecture
39
37
  export type {
40
38
  BaseApiResponse,
@@ -79,15 +77,24 @@ export type {
79
77
  StartProcessRequest,
80
78
  UnexposePortRequest,
81
79
  WriteFileRequest
82
- } from "./clients";
83
- export type { ExecutionCallbacks, InterpreterClient } from './clients/interpreter-client.js';
80
+ } from './clients';
81
+ export type {
82
+ ExecutionCallbacks,
83
+ InterpreterClient
84
+ } from './clients/interpreter-client.js';
84
85
  // Export file streaming utilities for binary file support
85
86
  export { collectFile, streamFile } from './file-stream';
86
87
  // Export interpreter functionality
87
88
  export { CodeInterpreter } from './interpreter.js';
88
89
  // Re-export request handler utilities
89
90
  export {
90
- proxyToSandbox, type RouteInfo, type SandboxEnv
91
+ proxyToSandbox,
92
+ type RouteInfo,
93
+ type SandboxEnv
91
94
  } from './request-handler';
92
95
  // Export SSE parser for converting ReadableStream to AsyncIterable
93
- export { asyncIterableToSSEStream, parseSSEStream, responseToAsyncIterable } from "./sse-parser";
96
+ export {
97
+ asyncIterableToSSEStream,
98
+ parseSSEStream,
99
+ responseToAsyncIterable
100
+ } from './sse-parser';