@cloudflare/sandbox 0.13.0-next.681.1 → 0.13.0-next.709.1
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/Dockerfile +6 -6
- package/README.md +49 -3
- package/dist/bridge/index.d.ts.map +1 -1
- package/dist/bridge/index.js +1364 -1072
- package/dist/bridge/index.js.map +1 -1
- package/dist/{contexts-DY1LHU1v.d.ts → contexts-1EsLHByO.d.ts} +156 -20
- package/dist/contexts-1EsLHByO.d.ts.map +1 -0
- package/dist/{dist-BStBkGIC.js → dist-Duor5GbS.js} +7 -56
- package/dist/dist-Duor5GbS.js.map +1 -0
- package/dist/errors/index.d.ts +4 -4
- package/dist/errors/index.js +3 -3
- package/dist/{errors-k3B8orjH.js → errors-CXR0xBpw.js} +42 -10
- package/dist/errors-CXR0xBpw.js.map +1 -0
- package/dist/{errors-ewgSNicb.js → errors-QYlSkVGz.js} +402 -250
- package/dist/errors-QYlSkVGz.js.map +1 -0
- package/dist/extensions/index.d.ts +4 -2
- package/dist/extensions/index.js +5 -3
- package/dist/extensions-CFB2xHqY.js +1023 -0
- package/dist/extensions-CFB2xHqY.js.map +1 -0
- package/dist/filesystem-BWAZCZER.d.ts +732 -0
- package/dist/filesystem-BWAZCZER.d.ts.map +1 -0
- package/dist/git/index.d.ts +8 -19
- package/dist/git/index.d.ts.map +1 -1
- package/dist/git/index.js +16 -23
- package/dist/git/index.js.map +1 -1
- package/dist/index-Bs4bqXDR.d.ts +438 -0
- package/dist/index-Bs4bqXDR.d.ts.map +1 -0
- package/dist/{index-Dy6u9r60.d.ts → index-HNYBk-az.d.ts} +233 -179
- package/dist/index-HNYBk-az.d.ts.map +1 -0
- package/dist/index.d.ts +480 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/interpreter/index.d.ts +3 -1
- package/dist/interpreter/index.d.ts.map +1 -1
- package/dist/interpreter/index.js +46 -18
- package/dist/interpreter/index.js.map +1 -1
- package/dist/openai/index.d.ts +5 -5
- package/dist/openai/index.d.ts.map +1 -1
- package/dist/openai/index.js +11 -6
- package/dist/openai/index.js.map +1 -1
- package/dist/opencode/index.d.ts +7 -11
- package/dist/opencode/index.d.ts.map +1 -1
- package/dist/opencode/index.js +56 -85
- package/dist/opencode/index.js.map +1 -1
- package/dist/process-types-GStiZ8f8.d.ts +73 -0
- package/dist/process-types-GStiZ8f8.d.ts.map +1 -0
- package/dist/{sandbox-boKWPIcd.js → sandbox-Auuwfnur.js} +4152 -3359
- package/dist/sandbox-Auuwfnur.js.map +1 -0
- package/dist/sandbox-BbAabq93.d.ts +42 -0
- package/dist/sandbox-BbAabq93.d.ts.map +1 -0
- package/dist/xterm/index.d.ts +5 -1
- package/dist/xterm/index.d.ts.map +1 -1
- package/dist/xterm/index.js +55 -12
- package/dist/xterm/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/codes-y-U76vnQ.d.ts +0 -79
- package/dist/codes-y-U76vnQ.d.ts.map +0 -1
- package/dist/contexts-DY1LHU1v.d.ts.map +0 -1
- package/dist/dist-BStBkGIC.js.map +0 -1
- package/dist/errors-ewgSNicb.js.map +0 -1
- package/dist/errors-k3B8orjH.js.map +0 -1
- package/dist/extensions-CepYdzro.js +0 -191
- package/dist/extensions-CepYdzro.js.map +0 -1
- package/dist/index-B7QgIs0N.d.ts +0 -1841
- package/dist/index-B7QgIs0N.d.ts.map +0 -1
- package/dist/index-Dy6u9r60.d.ts.map +0 -1
- package/dist/sandbox-DHNO89IF.d.ts +0 -828
- package/dist/sandbox-DHNO89IF.d.ts.map +0 -1
- package/dist/sandbox-boKWPIcd.js.map +0 -1
|
@@ -1,7 +1,95 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as ProcessExit } from "./process-types-GStiZ8f8.js";
|
|
2
2
|
|
|
3
|
-
//#region ../shared/dist/errors/
|
|
3
|
+
//#region ../shared/dist/errors/codes.d.ts
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Centralized error code registry
|
|
7
|
+
* Each code maps to a specific error type with consistent semantics
|
|
8
|
+
*/
|
|
9
|
+
declare const ErrorCode: {
|
|
10
|
+
readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
|
|
11
|
+
readonly PERMISSION_DENIED: "PERMISSION_DENIED";
|
|
12
|
+
readonly FILE_EXISTS: "FILE_EXISTS";
|
|
13
|
+
readonly IS_DIRECTORY: "IS_DIRECTORY";
|
|
14
|
+
readonly NOT_DIRECTORY: "NOT_DIRECTORY";
|
|
15
|
+
readonly FILE_TOO_LARGE: "FILE_TOO_LARGE";
|
|
16
|
+
readonly NO_SPACE: "NO_SPACE";
|
|
17
|
+
readonly TOO_MANY_FILES: "TOO_MANY_FILES";
|
|
18
|
+
readonly RESOURCE_BUSY: "RESOURCE_BUSY";
|
|
19
|
+
readonly READ_ONLY: "READ_ONLY";
|
|
20
|
+
readonly NAME_TOO_LONG: "NAME_TOO_LONG";
|
|
21
|
+
readonly TOO_MANY_LINKS: "TOO_MANY_LINKS";
|
|
22
|
+
readonly FILESYSTEM_ERROR: "FILESYSTEM_ERROR";
|
|
23
|
+
readonly COMMAND_NOT_FOUND: "COMMAND_NOT_FOUND";
|
|
24
|
+
readonly COMMAND_PERMISSION_DENIED: "COMMAND_PERMISSION_DENIED";
|
|
25
|
+
readonly INVALID_COMMAND: "INVALID_COMMAND";
|
|
26
|
+
readonly COMMAND_EXECUTION_ERROR: "COMMAND_EXECUTION_ERROR";
|
|
27
|
+
readonly STREAM_START_ERROR: "STREAM_START_ERROR";
|
|
28
|
+
readonly PROCESS_NOT_FOUND: "PROCESS_NOT_FOUND";
|
|
29
|
+
readonly TERMINAL_NOT_FOUND: "TERMINAL_NOT_FOUND";
|
|
30
|
+
readonly INVALID_PROCESS_CWD: "INVALID_PROCESS_CWD";
|
|
31
|
+
readonly INVALID_PROCESS_ENVIRONMENT: "INVALID_PROCESS_ENVIRONMENT";
|
|
32
|
+
readonly INVALID_PROCESS_CURSOR: "INVALID_PROCESS_CURSOR";
|
|
33
|
+
readonly INVALID_TERMINAL_CWD: "INVALID_TERMINAL_CWD";
|
|
34
|
+
readonly INVALID_TERMINAL_CURSOR: "INVALID_TERMINAL_CURSOR";
|
|
35
|
+
readonly STALE_PROCESS_HANDLE: "STALE_PROCESS_HANDLE";
|
|
36
|
+
readonly STALE_TERMINAL_HANDLE: "STALE_TERMINAL_HANDLE";
|
|
37
|
+
readonly PROCESS_WAIT_TIMEOUT: "PROCESS_WAIT_TIMEOUT";
|
|
38
|
+
readonly PROCESS_ABORTED: "PROCESS_ABORTED";
|
|
39
|
+
readonly PROCESS_PERMISSION_DENIED: "PROCESS_PERMISSION_DENIED";
|
|
40
|
+
readonly PROCESS_ERROR: "PROCESS_ERROR";
|
|
41
|
+
readonly PROCESS_SPAWN_FAILED: "PROCESS_SPAWN_FAILED";
|
|
42
|
+
readonly TERMINAL_CONTROL_ERROR: "TERMINAL_CONTROL_ERROR";
|
|
43
|
+
readonly PORT_ALREADY_EXPOSED: "PORT_ALREADY_EXPOSED";
|
|
44
|
+
readonly PORT_IN_USE: "PORT_IN_USE";
|
|
45
|
+
readonly PORT_NOT_EXPOSED: "PORT_NOT_EXPOSED";
|
|
46
|
+
readonly INVALID_PORT_NUMBER: "INVALID_PORT_NUMBER";
|
|
47
|
+
readonly INVALID_PORT: "INVALID_PORT";
|
|
48
|
+
readonly SERVICE_NOT_RESPONDING: "SERVICE_NOT_RESPONDING";
|
|
49
|
+
readonly PORT_OPERATION_ERROR: "PORT_OPERATION_ERROR";
|
|
50
|
+
readonly CUSTOM_DOMAIN_REQUIRED: "CUSTOM_DOMAIN_REQUIRED";
|
|
51
|
+
readonly GIT_REPOSITORY_NOT_FOUND: "GIT_REPOSITORY_NOT_FOUND";
|
|
52
|
+
readonly GIT_BRANCH_NOT_FOUND: "GIT_BRANCH_NOT_FOUND";
|
|
53
|
+
readonly GIT_AUTH_FAILED: "GIT_AUTH_FAILED";
|
|
54
|
+
readonly GIT_NETWORK_ERROR: "GIT_NETWORK_ERROR";
|
|
55
|
+
readonly INVALID_GIT_URL: "INVALID_GIT_URL";
|
|
56
|
+
readonly GIT_CLONE_FAILED: "GIT_CLONE_FAILED";
|
|
57
|
+
readonly GIT_CHECKOUT_FAILED: "GIT_CHECKOUT_FAILED";
|
|
58
|
+
readonly GIT_OPERATION_FAILED: "GIT_OPERATION_FAILED";
|
|
59
|
+
readonly BUCKET_MOUNT_ERROR: "BUCKET_MOUNT_ERROR";
|
|
60
|
+
readonly BUCKET_UNMOUNT_ERROR: "BUCKET_UNMOUNT_ERROR";
|
|
61
|
+
readonly S3FS_MOUNT_ERROR: "S3FS_MOUNT_ERROR";
|
|
62
|
+
readonly MISSING_CREDENTIALS: "MISSING_CREDENTIALS";
|
|
63
|
+
readonly INVALID_MOUNT_CONFIG: "INVALID_MOUNT_CONFIG";
|
|
64
|
+
readonly BACKUP_CREATE_FAILED: "BACKUP_CREATE_FAILED";
|
|
65
|
+
readonly BACKUP_RESTORE_FAILED: "BACKUP_RESTORE_FAILED";
|
|
66
|
+
readonly BACKUP_NOT_FOUND: "BACKUP_NOT_FOUND";
|
|
67
|
+
readonly BACKUP_EXPIRED: "BACKUP_EXPIRED";
|
|
68
|
+
readonly INVALID_BACKUP_CONFIG: "INVALID_BACKUP_CONFIG";
|
|
69
|
+
readonly INTERPRETER_NOT_READY: "INTERPRETER_NOT_READY";
|
|
70
|
+
readonly CONTEXT_NOT_FOUND: "CONTEXT_NOT_FOUND";
|
|
71
|
+
readonly CODE_EXECUTION_ERROR: "CODE_EXECUTION_ERROR";
|
|
72
|
+
readonly PYTHON_NOT_AVAILABLE: "PYTHON_NOT_AVAILABLE";
|
|
73
|
+
readonly JAVASCRIPT_NOT_AVAILABLE: "JAVASCRIPT_NOT_AVAILABLE";
|
|
74
|
+
readonly OPENCODE_STARTUP_FAILED: "OPENCODE_STARTUP_FAILED";
|
|
75
|
+
readonly PROCESS_READY_TIMEOUT: "PROCESS_READY_TIMEOUT";
|
|
76
|
+
readonly PROCESS_EXITED_BEFORE_READY: "PROCESS_EXITED_BEFORE_READY";
|
|
77
|
+
readonly PROCESS_EXITED_BEFORE_LOG: "PROCESS_EXITED_BEFORE_LOG";
|
|
78
|
+
readonly WATCH_NOT_FOUND: "WATCH_NOT_FOUND";
|
|
79
|
+
readonly WATCH_START_ERROR: "WATCH_START_ERROR";
|
|
80
|
+
readonly WATCH_STOP_ERROR: "WATCH_STOP_ERROR";
|
|
81
|
+
readonly VALIDATION_FAILED: "VALIDATION_FAILED";
|
|
82
|
+
readonly INVALID_JSON_RESPONSE: "INVALID_JSON_RESPONSE";
|
|
83
|
+
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
84
|
+
readonly INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
85
|
+
readonly CONTAINER_UNAVAILABLE: "CONTAINER_UNAVAILABLE";
|
|
86
|
+
readonly CONTROL_PROTOCOL_INCOMPATIBLE: "CONTROL_PROTOCOL_INCOMPATIBLE";
|
|
87
|
+
readonly OPERATION_INTERRUPTED: "OPERATION_INTERRUPTED";
|
|
88
|
+
readonly RPC_TRANSPORT_ERROR: "RPC_TRANSPORT_ERROR";
|
|
89
|
+
};
|
|
90
|
+
type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region ../shared/dist/errors/types.d.ts
|
|
5
93
|
/**
|
|
6
94
|
* Standard operation types
|
|
7
95
|
*/
|
|
@@ -120,22 +208,66 @@ interface ProcessErrorContext {
|
|
|
120
208
|
exitCode?: number;
|
|
121
209
|
stderr?: string;
|
|
122
210
|
}
|
|
123
|
-
interface
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
* duplicate create was detected. Included so a restarted DO can learn the
|
|
128
|
-
* container's placement ID from an idempotent session-create. `null` when
|
|
129
|
-
* the env var is not set (for example, in local development).
|
|
130
|
-
*/
|
|
131
|
-
containerPlacementId?: string | null;
|
|
211
|
+
interface InvalidProcessCwdContext {
|
|
212
|
+
processId?: string;
|
|
213
|
+
cwd: string;
|
|
214
|
+
reason: string;
|
|
132
215
|
}
|
|
133
|
-
interface
|
|
134
|
-
|
|
216
|
+
interface InvalidProcessEnvironmentContext {
|
|
217
|
+
processId?: string;
|
|
218
|
+
name?: string;
|
|
219
|
+
reason: string;
|
|
135
220
|
}
|
|
136
|
-
interface
|
|
137
|
-
|
|
138
|
-
|
|
221
|
+
interface ProcessSpawnFailedContext {
|
|
222
|
+
processId: string;
|
|
223
|
+
command: string;
|
|
224
|
+
cwd?: string;
|
|
225
|
+
stderr?: string;
|
|
226
|
+
}
|
|
227
|
+
interface InvalidProcessCursorContext {
|
|
228
|
+
processId: string;
|
|
229
|
+
cursor?: string;
|
|
230
|
+
reason: string;
|
|
231
|
+
}
|
|
232
|
+
interface StaleProcessHandleContext {
|
|
233
|
+
processId: string;
|
|
234
|
+
pid: number;
|
|
235
|
+
operation: string;
|
|
236
|
+
}
|
|
237
|
+
interface ProcessWaitTimeoutContext {
|
|
238
|
+
processId: string;
|
|
239
|
+
operation: 'output' | 'waitForExit' | 'waitForLog';
|
|
240
|
+
timeout: number;
|
|
241
|
+
}
|
|
242
|
+
interface ProcessAbortedContext {
|
|
243
|
+
processId: string;
|
|
244
|
+
operation: string;
|
|
245
|
+
}
|
|
246
|
+
interface TerminalNotFoundContext {
|
|
247
|
+
terminalId: string;
|
|
248
|
+
}
|
|
249
|
+
interface InvalidTerminalCwdContext {
|
|
250
|
+
terminalId: string;
|
|
251
|
+
cwd: string;
|
|
252
|
+
reason: string;
|
|
253
|
+
}
|
|
254
|
+
interface InvalidTerminalCursorContext {
|
|
255
|
+
terminalId: string;
|
|
256
|
+
cursor?: string;
|
|
257
|
+
reason: string;
|
|
258
|
+
}
|
|
259
|
+
interface TerminalControlErrorContext {
|
|
260
|
+
terminalId: string;
|
|
261
|
+
operation: string;
|
|
262
|
+
reason?: string;
|
|
263
|
+
failure?: {
|
|
264
|
+
code: string;
|
|
265
|
+
message: string;
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
interface StaleTerminalHandleContext {
|
|
269
|
+
terminalId: string;
|
|
270
|
+
operation: string;
|
|
139
271
|
}
|
|
140
272
|
/**
|
|
141
273
|
* Process readiness error contexts
|
|
@@ -152,6 +284,11 @@ interface ProcessExitedBeforeReadyContext {
|
|
|
152
284
|
condition: string;
|
|
153
285
|
exitCode: number;
|
|
154
286
|
}
|
|
287
|
+
interface ProcessExitedBeforeLogContext {
|
|
288
|
+
processId: string;
|
|
289
|
+
pid: number;
|
|
290
|
+
exit: ProcessExit;
|
|
291
|
+
}
|
|
155
292
|
/**
|
|
156
293
|
* Port error contexts
|
|
157
294
|
*/
|
|
@@ -303,8 +440,7 @@ type RPCTransportErrorKind = /** Server closed the WebSocket (container crash, D
|
|
|
303
440
|
/** Underlying socket fired the `error` event. */ | 'connection_failed'
|
|
304
441
|
/** WebSocket upgrade failed before the session was established. */ | 'upgrade_failed'
|
|
305
442
|
/** Peer sent a non-string frame; capnweb's wire format is JSON text only. */ | 'invalid_frame'
|
|
306
|
-
/** Peer sent a frame the wire-format parser rejected (capnweb readLoop SyntaxError). */ | 'protocol_error'
|
|
307
|
-
/** Session was disposed (locally or remotely) while a call was pending. */ | 'session_disposed'
|
|
443
|
+
/** Peer sent a frame the wire-format parser rejected (capnweb readLoop SyntaxError). */ | 'protocol_error' | 'session_disposed'
|
|
308
444
|
/** Anything else that bubbled up from the transport with no recognisable shape. */ | 'unknown';
|
|
309
445
|
interface RPCTransportContext {
|
|
310
446
|
/** Categorical bucket so callers can branch on `peer_closed` vs `upgrade_failed` etc. */
|
|
@@ -323,5 +459,5 @@ interface RPCTransportContext {
|
|
|
323
459
|
closeReason?: string;
|
|
324
460
|
}
|
|
325
461
|
//#endregion
|
|
326
|
-
export {
|
|
327
|
-
//# sourceMappingURL=contexts-
|
|
462
|
+
export { PortAlreadyExposedContext as A, ProcessWaitTimeoutContext as B, InvalidProcessCwdContext as C, OpenCodeStartupContext as D, InvalidTerminalCwdContext as E, ProcessExitedBeforeLogContext as F, TerminalControlErrorContext as G, RPCTransportErrorKind as H, ProcessExitedBeforeReadyContext as I, ErrorResponse as J, TerminalNotFoundContext as K, ProcessNotFoundContext as L, PortNotExposedContext as M, ProcessAbortedContext as N, OperationInterruptedContext as O, ProcessErrorContext as P, ProcessReadyTimeoutContext as R, InvalidProcessCursorContext as S, InvalidTerminalCursorContext as T, StaleProcessHandleContext as U, RPCTransportContext as V, StaleTerminalHandleContext as W, OperationType as X, Operation as Y, ErrorCode as Z, GitRepositoryNotFoundContext as _, CodeExecutionContext as a, InvalidBackupConfigContext as b, ContainerUnavailableContext as c, FileNotFoundContext as d, FileSystemContext as f, GitErrorContext as g, GitBranchNotFoundContext as h, BackupRestoreContext as i, PortErrorContext as j, OperationInterruptedReason as k, ContextNotFoundContext as l, GitAuthFailedContext as m, BackupExpiredContext as n, CommandErrorContext as o, FileTooLargeContext as p, ValidationFailedContext as q, BackupNotFoundContext as r, CommandNotFoundContext as s, BackupCreateContext as t, FileExistsContext as u, InternalErrorContext as v, InvalidProcessEnvironmentContext as w, InvalidPortContext as x, InterpreterNotReadyContext as y, ProcessSpawnFailedContext as z };
|
|
463
|
+
//# sourceMappingURL=contexts-1EsLHByO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contexts-1EsLHByO.d.ts","names":["ErrorCode","ErrorCode","Operation","OperationType","ErrorResponse","TContext","Record","ServiceError","ServiceResult","T","ProcessExit","OperationType","FileNotFoundContext","FileExistsContext","FileTooLargeContext","FileSystemContext","CommandNotFoundContext","CommandErrorContext","ProcessNotFoundContext","ProcessErrorContext","InvalidProcessCwdContext","InvalidProcessEnvironmentContext","ProcessSpawnFailedContext","InvalidProcessCursorContext","StaleProcessHandleContext","ProcessWaitTimeoutContext","ProcessAbortedContext","TerminalNotFoundContext","InvalidTerminalCwdContext","InvalidTerminalCursorContext","TerminalControlErrorContext","StaleTerminalHandleContext","ProcessReadyTimeoutContext","ProcessExitedBeforeReadyContext","ProcessExitedBeforeLogContext","PortAlreadyExposedContext","PortNotExposedContext","InvalidPortContext","PortErrorContext","GitRepositoryNotFoundContext","GitAuthFailedContext","GitBranchNotFoundContext","GitErrorContext","InterpreterNotReadyContext","ContextNotFoundContext","CodeExecutionContext","ValidationFailedContext","Array","BucketMountContext","MissingCredentialsContext","InvalidMountConfigContext","BackupCreateContext","BackupRestoreContext","BackupNotFoundContext","BackupExpiredContext","InvalidBackupConfigContext","OpenCodeStartupContext","InternalErrorContext","ContainerUnavailableContext","OperationInterruptedReason","OperationInterruptedContext","RPCTransportErrorKind","RPCTransportContext"],"sources":["../../shared/dist/errors/codes.d.ts","../../shared/dist/errors/types.d.ts","../../shared/dist/errors/contexts.d.ts"],"sourcesContent":["/**\n * Centralized error code registry\n * Each code maps to a specific error type with consistent semantics\n */\nexport declare const ErrorCode: {\n readonly FILE_NOT_FOUND: \"FILE_NOT_FOUND\";\n readonly PERMISSION_DENIED: \"PERMISSION_DENIED\";\n readonly FILE_EXISTS: \"FILE_EXISTS\";\n readonly IS_DIRECTORY: \"IS_DIRECTORY\";\n readonly NOT_DIRECTORY: \"NOT_DIRECTORY\";\n readonly FILE_TOO_LARGE: \"FILE_TOO_LARGE\";\n readonly NO_SPACE: \"NO_SPACE\";\n readonly TOO_MANY_FILES: \"TOO_MANY_FILES\";\n readonly RESOURCE_BUSY: \"RESOURCE_BUSY\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly NAME_TOO_LONG: \"NAME_TOO_LONG\";\n readonly TOO_MANY_LINKS: \"TOO_MANY_LINKS\";\n readonly FILESYSTEM_ERROR: \"FILESYSTEM_ERROR\";\n readonly COMMAND_NOT_FOUND: \"COMMAND_NOT_FOUND\";\n readonly COMMAND_PERMISSION_DENIED: \"COMMAND_PERMISSION_DENIED\";\n readonly INVALID_COMMAND: \"INVALID_COMMAND\";\n readonly COMMAND_EXECUTION_ERROR: \"COMMAND_EXECUTION_ERROR\";\n readonly STREAM_START_ERROR: \"STREAM_START_ERROR\";\n readonly PROCESS_NOT_FOUND: \"PROCESS_NOT_FOUND\";\n readonly TERMINAL_NOT_FOUND: \"TERMINAL_NOT_FOUND\";\n readonly INVALID_PROCESS_CWD: \"INVALID_PROCESS_CWD\";\n readonly INVALID_PROCESS_ENVIRONMENT: \"INVALID_PROCESS_ENVIRONMENT\";\n readonly INVALID_PROCESS_CURSOR: \"INVALID_PROCESS_CURSOR\";\n readonly INVALID_TERMINAL_CWD: \"INVALID_TERMINAL_CWD\";\n readonly INVALID_TERMINAL_CURSOR: \"INVALID_TERMINAL_CURSOR\";\n readonly STALE_PROCESS_HANDLE: \"STALE_PROCESS_HANDLE\";\n readonly STALE_TERMINAL_HANDLE: \"STALE_TERMINAL_HANDLE\";\n readonly PROCESS_WAIT_TIMEOUT: \"PROCESS_WAIT_TIMEOUT\";\n readonly PROCESS_ABORTED: \"PROCESS_ABORTED\";\n readonly PROCESS_PERMISSION_DENIED: \"PROCESS_PERMISSION_DENIED\";\n readonly PROCESS_ERROR: \"PROCESS_ERROR\";\n readonly PROCESS_SPAWN_FAILED: \"PROCESS_SPAWN_FAILED\";\n readonly TERMINAL_CONTROL_ERROR: \"TERMINAL_CONTROL_ERROR\";\n readonly PORT_ALREADY_EXPOSED: \"PORT_ALREADY_EXPOSED\";\n readonly PORT_IN_USE: \"PORT_IN_USE\";\n readonly PORT_NOT_EXPOSED: \"PORT_NOT_EXPOSED\";\n readonly INVALID_PORT_NUMBER: \"INVALID_PORT_NUMBER\";\n readonly INVALID_PORT: \"INVALID_PORT\";\n readonly SERVICE_NOT_RESPONDING: \"SERVICE_NOT_RESPONDING\";\n readonly PORT_OPERATION_ERROR: \"PORT_OPERATION_ERROR\";\n readonly CUSTOM_DOMAIN_REQUIRED: \"CUSTOM_DOMAIN_REQUIRED\";\n readonly GIT_REPOSITORY_NOT_FOUND: \"GIT_REPOSITORY_NOT_FOUND\";\n readonly GIT_BRANCH_NOT_FOUND: \"GIT_BRANCH_NOT_FOUND\";\n readonly GIT_AUTH_FAILED: \"GIT_AUTH_FAILED\";\n readonly GIT_NETWORK_ERROR: \"GIT_NETWORK_ERROR\";\n readonly INVALID_GIT_URL: \"INVALID_GIT_URL\";\n readonly GIT_CLONE_FAILED: \"GIT_CLONE_FAILED\";\n readonly GIT_CHECKOUT_FAILED: \"GIT_CHECKOUT_FAILED\";\n readonly GIT_OPERATION_FAILED: \"GIT_OPERATION_FAILED\";\n readonly BUCKET_MOUNT_ERROR: \"BUCKET_MOUNT_ERROR\";\n readonly BUCKET_UNMOUNT_ERROR: \"BUCKET_UNMOUNT_ERROR\";\n readonly S3FS_MOUNT_ERROR: \"S3FS_MOUNT_ERROR\";\n readonly MISSING_CREDENTIALS: \"MISSING_CREDENTIALS\";\n readonly INVALID_MOUNT_CONFIG: \"INVALID_MOUNT_CONFIG\";\n readonly BACKUP_CREATE_FAILED: \"BACKUP_CREATE_FAILED\";\n readonly BACKUP_RESTORE_FAILED: \"BACKUP_RESTORE_FAILED\";\n readonly BACKUP_NOT_FOUND: \"BACKUP_NOT_FOUND\";\n readonly BACKUP_EXPIRED: \"BACKUP_EXPIRED\";\n readonly INVALID_BACKUP_CONFIG: \"INVALID_BACKUP_CONFIG\";\n readonly INTERPRETER_NOT_READY: \"INTERPRETER_NOT_READY\";\n readonly CONTEXT_NOT_FOUND: \"CONTEXT_NOT_FOUND\";\n readonly CODE_EXECUTION_ERROR: \"CODE_EXECUTION_ERROR\";\n readonly PYTHON_NOT_AVAILABLE: \"PYTHON_NOT_AVAILABLE\";\n readonly JAVASCRIPT_NOT_AVAILABLE: \"JAVASCRIPT_NOT_AVAILABLE\";\n readonly OPENCODE_STARTUP_FAILED: \"OPENCODE_STARTUP_FAILED\";\n readonly PROCESS_READY_TIMEOUT: \"PROCESS_READY_TIMEOUT\";\n readonly PROCESS_EXITED_BEFORE_READY: \"PROCESS_EXITED_BEFORE_READY\";\n readonly PROCESS_EXITED_BEFORE_LOG: \"PROCESS_EXITED_BEFORE_LOG\";\n readonly WATCH_NOT_FOUND: \"WATCH_NOT_FOUND\";\n readonly WATCH_START_ERROR: \"WATCH_START_ERROR\";\n readonly WATCH_STOP_ERROR: \"WATCH_STOP_ERROR\";\n readonly VALIDATION_FAILED: \"VALIDATION_FAILED\";\n readonly INVALID_JSON_RESPONSE: \"INVALID_JSON_RESPONSE\";\n readonly UNKNOWN_ERROR: \"UNKNOWN_ERROR\";\n readonly INTERNAL_ERROR: \"INTERNAL_ERROR\";\n readonly CONTAINER_UNAVAILABLE: \"CONTAINER_UNAVAILABLE\";\n readonly CONTROL_PROTOCOL_INCOMPATIBLE: \"CONTROL_PROTOCOL_INCOMPATIBLE\";\n readonly OPERATION_INTERRUPTED: \"OPERATION_INTERRUPTED\";\n readonly RPC_TRANSPORT_ERROR: \"RPC_TRANSPORT_ERROR\";\n};\nexport type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];\n//# sourceMappingURL=codes.d.ts.map","import type { ErrorCode } from './codes';\n/**\n * Standard operation types\n */\nexport declare const Operation: {\n readonly FILE_READ: \"file.read\";\n readonly FILE_WRITE: \"file.write\";\n readonly FILE_DELETE: \"file.delete\";\n readonly FILE_MOVE: \"file.move\";\n readonly FILE_RENAME: \"file.rename\";\n readonly FILE_STAT: \"file.stat\";\n readonly DIRECTORY_CREATE: \"directory.create\";\n readonly DIRECTORY_LIST: \"directory.list\";\n readonly COMMAND_EXECUTE: \"command.execute\";\n readonly COMMAND_STREAM: \"command.stream\";\n readonly PROCESS_START: \"process.start\";\n readonly PROCESS_KILL: \"process.kill\";\n readonly PROCESS_LIST: \"process.list\";\n readonly PROCESS_GET: \"process.get\";\n readonly PROCESS_LOGS: \"process.logs\";\n readonly GIT_CLONE: \"git.clone\";\n readonly GIT_CHECKOUT: \"git.checkout\";\n readonly GIT_OPERATION: \"git.operation\";\n readonly BACKUP_CREATE: \"backup.create\";\n readonly BACKUP_RESTORE: \"backup.restore\";\n readonly BACKUP_UNMOUNT: \"backup.unmount\";\n readonly CODE_EXECUTE: \"code.execute\";\n readonly CODE_CONTEXT_CREATE: \"code.context.create\";\n readonly CODE_CONTEXT_DELETE: \"code.context.delete\";\n};\nexport type OperationType = (typeof Operation)[keyof typeof Operation];\n/**\n * Standard error response format with generic context type\n * TContext allows type-safe access to error-specific context\n */\nexport interface ErrorResponse<TContext = Record<string, unknown>> {\n /**\n * Error type code (machine-readable)\n */\n code: ErrorCode;\n /**\n * Human-readable error message\n */\n message: string;\n /**\n * Operation that was attempted (useful for debugging and logging)\n */\n operation?: OperationType;\n /**\n * Structured error context with relevant details\n * Type varies based on error code\n */\n context: TContext;\n /**\n * HTTP status code (for client SDK)\n */\n httpStatus: number;\n /**\n * Timestamp when error occurred\n */\n timestamp: string;\n /**\n * Actionable suggestion for fixing the error\n */\n suggestion?: string;\n /**\n * Link to documentation\n */\n documentation?: string;\n}\n/**\n * Container ServiceError (lightweight, enriched by handlers)\n */\nexport interface ServiceError {\n message: string;\n code: ErrorCode;\n details?: Record<string, unknown>;\n}\n/**\n * ServiceResult type for container services\n */\nexport type ServiceResult<T> = {\n success: true;\n data: T;\n} | {\n success: false;\n error: ServiceError;\n};\n//# sourceMappingURL=types.d.ts.map","import type { ProcessExit } from '../process-types';\nimport type { OperationType } from './types';\n/**\n * File system error contexts\n */\nexport interface FileNotFoundContext {\n path: string;\n operation: OperationType;\n}\nexport interface FileExistsContext {\n path: string;\n operation: OperationType;\n}\nexport interface FileTooLargeContext {\n path: string;\n operation: OperationType;\n maxSize: number;\n actualSize: number;\n}\nexport interface FileSystemContext {\n path: string;\n operation: OperationType;\n stderr?: string;\n exitCode?: number;\n}\n/**\n * Command error contexts\n */\nexport interface CommandNotFoundContext {\n command: string;\n}\nexport interface CommandErrorContext {\n command: string;\n exitCode?: number;\n stdout?: string;\n stderr?: string;\n}\n/**\n * Process error contexts\n */\nexport interface ProcessNotFoundContext {\n processId: string;\n}\nexport interface ProcessErrorContext {\n processId: string;\n pid?: number;\n exitCode?: number;\n stderr?: string;\n}\nexport interface InvalidProcessCwdContext {\n processId?: string;\n cwd: string;\n reason: string;\n}\nexport interface InvalidProcessEnvironmentContext {\n processId?: string;\n name?: string;\n reason: string;\n}\nexport interface ProcessSpawnFailedContext {\n processId: string;\n command: string;\n cwd?: string;\n stderr?: string;\n}\nexport interface InvalidProcessCursorContext {\n processId: string;\n cursor?: string;\n reason: string;\n}\nexport interface StaleProcessHandleContext {\n processId: string;\n pid: number;\n operation: string;\n}\nexport interface ProcessWaitTimeoutContext {\n processId: string;\n operation: 'output' | 'waitForExit' | 'waitForLog';\n timeout: number;\n}\nexport interface ProcessAbortedContext {\n processId: string;\n operation: string;\n}\nexport interface TerminalNotFoundContext {\n terminalId: string;\n}\nexport interface InvalidTerminalCwdContext {\n terminalId: string;\n cwd: string;\n reason: string;\n}\nexport interface InvalidTerminalCursorContext {\n terminalId: string;\n cursor?: string;\n reason: string;\n}\nexport interface TerminalControlErrorContext {\n terminalId: string;\n operation: string;\n reason?: string;\n failure?: {\n code: string;\n message: string;\n };\n}\nexport interface StaleTerminalHandleContext {\n terminalId: string;\n operation: string;\n}\n/**\n * Process readiness error contexts\n */\nexport interface ProcessReadyTimeoutContext {\n processId: string;\n command: string;\n condition: string;\n timeout: number;\n}\nexport interface ProcessExitedBeforeReadyContext {\n processId: string;\n command: string;\n condition: string;\n exitCode: number;\n}\nexport interface ProcessExitedBeforeLogContext {\n processId: string;\n pid: number;\n exit: ProcessExit;\n}\n/**\n * Port error contexts\n */\nexport interface PortAlreadyExposedContext {\n port: number;\n portName?: string;\n}\nexport interface PortNotExposedContext {\n port: number;\n}\nexport interface InvalidPortContext {\n port: number;\n reason: string;\n}\nexport interface PortErrorContext {\n port: number;\n portName?: string;\n stderr?: string;\n}\n/**\n * Git error contexts\n */\nexport interface GitRepositoryNotFoundContext {\n repository: string;\n}\nexport interface GitAuthFailedContext {\n repository: string;\n}\nexport interface GitBranchNotFoundContext {\n branch: string;\n repository?: string;\n}\nexport interface GitErrorContext {\n repository?: string;\n branch?: string;\n targetDir?: string;\n stderr?: string;\n exitCode?: number;\n}\n/**\n * Code interpreter error contexts\n */\nexport interface InterpreterNotReadyContext {\n retryAfter?: number;\n progress?: number;\n}\nexport interface ContextNotFoundContext {\n contextId: string;\n}\nexport interface CodeExecutionContext {\n contextId?: string;\n ename?: string;\n evalue?: string;\n traceback?: string[];\n}\n/**\n * Validation error contexts\n */\nexport interface ValidationFailedContext {\n validationErrors: Array<{\n field: string;\n message: string;\n code?: string;\n }>;\n}\n/**\n * Bucket mounting error contexts\n */\nexport interface BucketMountContext {\n bucket: string;\n mountPath: string;\n endpoint: string;\n stderr?: string;\n exitCode?: number;\n}\nexport interface MissingCredentialsContext {\n bucket: string;\n endpoint: string;\n}\nexport interface InvalidMountConfigContext {\n bucket?: string;\n mountPath?: string;\n endpoint?: string;\n reason?: string;\n}\n/**\n * Backup error contexts\n */\nexport interface BackupCreateContext {\n dir: string;\n backupId?: string;\n stderr?: string;\n exitCode?: number;\n}\nexport interface BackupRestoreContext {\n dir: string;\n backupId: string;\n stderr?: string;\n exitCode?: number;\n}\nexport interface BackupNotFoundContext {\n backupId: string;\n}\nexport interface BackupExpiredContext {\n backupId: string;\n expiredAt?: string;\n}\nexport interface InvalidBackupConfigContext {\n reason: string;\n}\n/**\n * OpenCode error contexts\n */\nexport interface OpenCodeStartupContext {\n port: number;\n stderr?: string;\n command?: string;\n}\n/**\n * Generic error contexts\n */\nexport interface InternalErrorContext {\n originalError?: string;\n stack?: string;\n [key: string]: unknown;\n}\n/**\n * Container availability error context. Surfaced when the sandbox container\n * cannot accept the incoming RPC connection. The container may be starting\n * up, undergoing a runtime replacement, or temporarily unhealthy. The\n * caller should retry the same operation.\n */\nexport interface ContainerUnavailableContext {\n /**\n * Categorical reason distinguishing startup unavailability from runtime\n * replacement and exhausted upgrade retries.\n */\n reason: 'container_starting' | 'container_unhealthy' | 'container_replaced' | 'rpc_upgrade_failed';\n /**\n * Always true — this error represents a transient unavailability, not a\n * permanent failure. Callers should retry the same operation.\n */\n retryable: true;\n /** Suggested delay in milliseconds before the next retry attempt. */\n retryAfterMs?: number;\n}\nexport type OperationInterruptedReason = 'runtime_replaced' | 'container_stopped' | 'transport_disposed' | 'sandbox_destroyed' | 'sandbox_lifetime_changed' | 'recovery_exhausted' | 'unknown';\nexport interface OperationInterruptedContext {\n reason: OperationInterruptedReason;\n operation: string;\n phase?: string;\n admitted: true | 'unknown';\n retryable: boolean;\n operationId?: string;\n operationKey?: string;\n idempotencyKey?: string;\n recoveryAttempts?: number;\n maxRecoveryAttempts?: number;\n backupId?: string;\n dir?: string;\n}\n/**\n * RPC transport error contexts. Surfaced when the capnweb WebSocket session\n * fails on the SDK side rather than the container reporting a structured\n * error. Always retryable — the next call will open a fresh connection.\n */\nexport type RPCTransportErrorKind = \n/** Server closed the WebSocket (container crash, DO eviction, network blip). */\n'peer_closed'\n/** Underlying socket fired the `error` event. */\n | 'connection_failed'\n/** WebSocket upgrade failed before the session was established. */\n | 'upgrade_failed'\n/** Peer sent a non-string frame; capnweb's wire format is JSON text only. */\n | 'invalid_frame'\n/** Peer sent a frame the wire-format parser rejected (capnweb readLoop SyntaxError). */\n | 'protocol_error' | 'session_disposed'\n/** Anything else that bubbled up from the transport with no recognisable shape. */\n | 'unknown';\nexport interface RPCTransportContext {\n /** Categorical bucket so callers can branch on `peer_closed` vs `upgrade_failed` etc. */\n kind: RPCTransportErrorKind;\n /** Original error message, verbatim from capnweb / our DeferredTransport. */\n originalMessage: string;\n /**\n * The underlying Error's `name` property. capnweb preserves this across\n * the wire for the standard built-ins (TypeError, SyntaxError, etc.), so\n * it's a more reliable hint than the message string for those cases.\n */\n errorName: string;\n /** WebSocket close code, when available (kind === 'peer_closed'). */\n closeCode?: number;\n /** WebSocket close reason, when available (kind === 'peer_closed'). */\n closeReason?: string;\n}\n//# sourceMappingURL=contexts.d.ts.map"],"mappings":";;;;;;;AAIA;AAiFYA,cAjFSA,SAiFWA,EAAAA;;;;ECjFXE,SAAAA,Y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C,qBAAAA;;;;UAIAC,uBAAAA;;;UAGAC,yBAAAA;;;;;UAKAC,4BAAAA;;;;;UAKAC,2BAAAA;;;;;;;;;UASAC,0BAAAA;;;;;;;UAOAC,0BAAAA;;;;;;UAMAC,+BAAAA;;;;;;UAMAC,6BAAAA;;;QAGPxB;;;;;UAKOyB,yBAAAA;;;;UAIAC,qBAAAA;;;UAGAC,kBAAAA;;;;UAIAC,gBAAAA;;;;;;;;UAQAC,4BAAAA;;;UAGAC,oBAAAA;;;UAGAC,wBAAAA;;;;UAIAC,eAAAA;;;;;;;;;;UAUAC,0BAAAA;;;;UAIAC,sBAAAA;;;UAGAC,oBAAAA;;;;;;;;;UASAC,uBAAAA;oBACKC;;;;;;;;;UA6BLI,mBAAAA;;;;;;UAMAC,oBAAAA;;;;;;UAMAC,qBAAAA;;;UAGAC,oBAAAA;;;;UAIAC,0BAAAA;;;;;;UAMAC,sBAAAA;;;;;;;;UAQAC,oBAAAA;;;;;;;;;;;UAWAC,2BAAAA;;;;;;;;;;;;;;KAcLC,0BAAAA;UACKC,2BAAAA;UACLD;;;;;;;;;;;;;;;;;;KAkBAE,qBAAAA;;;;;;;UAaKC,mBAAAA;;QAEPD"}
|
|
@@ -11,21 +11,6 @@ function getEnvString(env, key) {
|
|
|
11
11
|
return typeof value === "string" ? value : void 0;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Filter environment variables object to only include string values.
|
|
15
|
-
* Skips undefined, null, and non-string values.
|
|
16
|
-
*
|
|
17
|
-
* Use this when you only need the defined values (e.g., for per-command env
|
|
18
|
-
* where undefined means "don't override").
|
|
19
|
-
*
|
|
20
|
-
* @param envVars - Object that may contain undefined values
|
|
21
|
-
* @returns Clean object with only string values
|
|
22
|
-
*/
|
|
23
|
-
function filterEnvVars(envVars) {
|
|
24
|
-
const filtered = {};
|
|
25
|
-
for (const [key, value] of Object.entries(envVars)) if (value != null && typeof value === "string") filtered[key] = value;
|
|
26
|
-
return filtered;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
14
|
* Partition environment variables into values to set and keys to unset.
|
|
30
15
|
*
|
|
31
16
|
* - String values → toSet (will be exported)
|
|
@@ -189,8 +174,6 @@ function extractRepoName(repoUrl) {
|
|
|
189
174
|
//#region ../shared/dist/logger/canonical.js
|
|
190
175
|
/** Events that are low-value at info on success */
|
|
191
176
|
const DEBUG_ON_SUCCESS = new Set([
|
|
192
|
-
"session.create",
|
|
193
|
-
"session.destroy",
|
|
194
177
|
"file.read",
|
|
195
178
|
"file.write",
|
|
196
179
|
"file.delete",
|
|
@@ -232,9 +215,9 @@ function sanitizePayload(payload) {
|
|
|
232
215
|
* Format: `{event} {outcome} {key_context} [— {reason}] ({durationMs}ms[, {sizeBytes}B])`
|
|
233
216
|
*
|
|
234
217
|
* The if/else chain for key context has implicit priority: command > path >
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
218
|
+
* port > repoUrl > pid. If a payload has multiple, only the highest-priority
|
|
219
|
+
* one appears in the message. All fields are still present as discrete
|
|
220
|
+
* queryable keys in the structured log context.
|
|
238
221
|
*/
|
|
239
222
|
function buildMessage(payload, sanitizedCommand) {
|
|
240
223
|
const { event } = payload;
|
|
@@ -251,7 +234,6 @@ function buildMessage(payload, sanitizedCommand) {
|
|
|
251
234
|
const { value } = truncateForLog(redactCommand(payload.command));
|
|
252
235
|
parts.push(value);
|
|
253
236
|
} else if (payload.path !== void 0) parts.push(payload.path);
|
|
254
|
-
else if (event.includes("session") && payload.sessionId !== void 0) parts.push(payload.sessionId);
|
|
255
237
|
else if (payload.port !== void 0) parts.push(String(payload.port));
|
|
256
238
|
else if (payload.repoUrl !== void 0) {
|
|
257
239
|
let gitContext = payload.repoUrl;
|
|
@@ -467,7 +449,7 @@ var CloudflareLogger = class CloudflareLogger {
|
|
|
467
449
|
* Format: LEVEL [component] message trace=tr_... key=value key=value
|
|
468
450
|
*/
|
|
469
451
|
outputPretty(consoleFn, data) {
|
|
470
|
-
const { level, message: msg, timestamp, traceId, component, sandboxId,
|
|
452
|
+
const { level, message: msg, timestamp, traceId, component, sandboxId, processId, commandId, durationMs, serviceVersion, instanceId, error, ...rest } = data;
|
|
471
453
|
const levelStr = String(level || "INFO").toUpperCase();
|
|
472
454
|
const levelColor = this.getLevelColor(levelStr);
|
|
473
455
|
const componentBadge = component ? `[${component}]` : "";
|
|
@@ -476,7 +458,6 @@ var CloudflareLogger = class CloudflareLogger {
|
|
|
476
458
|
if (traceId) pairs.push(`trace=${String(traceId).substring(0, 12)}`);
|
|
477
459
|
if (commandId) pairs.push(`cmd=${String(commandId).substring(0, 12)}`);
|
|
478
460
|
if (sandboxId) pairs.push(`sandbox=${sandboxId}`);
|
|
479
|
-
if (sessionId) pairs.push(`session=${String(sessionId).substring(0, 12)}`);
|
|
480
461
|
if (processId) pairs.push(`proc=${processId}`);
|
|
481
462
|
if (durationMs !== void 0) pairs.push(`dur=${durationMs}ms`);
|
|
482
463
|
for (const [key, value] of Object.entries(rest)) {
|
|
@@ -643,7 +624,7 @@ function createNoOpLogger() {
|
|
|
643
624
|
* const logger = createLogger({
|
|
644
625
|
* component: 'container',
|
|
645
626
|
* traceId: TraceContext.fromHeaders(request.headers)!,
|
|
646
|
-
*
|
|
627
|
+
* sandboxId: this.id
|
|
647
628
|
* });
|
|
648
629
|
* ```
|
|
649
630
|
*/
|
|
@@ -719,17 +700,6 @@ function getEnvVar(name) {
|
|
|
719
700
|
*/
|
|
720
701
|
const EXTENSION_TARBALL_REQUIRED = "ExtensionTarballRequired";
|
|
721
702
|
|
|
722
|
-
//#endregion
|
|
723
|
-
//#region ../shared/dist/shell-escape.js
|
|
724
|
-
/**
|
|
725
|
-
* Escapes a string for safe use in shell commands using POSIX single-quote escaping.
|
|
726
|
-
* Prevents command injection by wrapping the string in single quotes and escaping
|
|
727
|
-
* any single quotes within the string.
|
|
728
|
-
*/
|
|
729
|
-
function shellEscape(str) {
|
|
730
|
-
return `'${str.replace(/'/g, "'\\''")}'`;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
703
|
//#endregion
|
|
734
704
|
//#region ../shared/dist/sse.js
|
|
735
705
|
/**
|
|
@@ -778,24 +748,5 @@ function parseSSEFrames(buffer, currentEvent = { data: [] }) {
|
|
|
778
748
|
}
|
|
779
749
|
|
|
780
750
|
//#endregion
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
return value && typeof value.success === "boolean" && typeof value.exitCode === "number" && typeof value.stdout === "string" && typeof value.stderr === "string";
|
|
784
|
-
}
|
|
785
|
-
function isProcess(value) {
|
|
786
|
-
return value && typeof value.id === "string" && typeof value.command === "string" && typeof value.status === "string";
|
|
787
|
-
}
|
|
788
|
-
function isProcessStatus(value) {
|
|
789
|
-
return [
|
|
790
|
-
"starting",
|
|
791
|
-
"running",
|
|
792
|
-
"completed",
|
|
793
|
-
"failed",
|
|
794
|
-
"killed",
|
|
795
|
-
"error"
|
|
796
|
-
].includes(value);
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
//#endregion
|
|
800
|
-
export { shellEscape as a, createNoOpLogger as c, DEFAULT_GIT_CLONE_TIMEOUT_MS as d, extractRepoName as f, partitionEnvVars as g, getEnvString as h, parseSSEFrames as i, TraceContext as l, filterEnvVars as m, isProcess as n, EXTENSION_TARBALL_REQUIRED as o, redactCommand as p, isProcessStatus as r, createLogger as s, isExecResult as t, logCanonicalEvent as u };
|
|
801
|
-
//# sourceMappingURL=dist-BStBkGIC.js.map
|
|
751
|
+
export { TraceContext as a, extractRepoName as c, partitionEnvVars as d, createNoOpLogger as i, redactCommand as l, EXTENSION_TARBALL_REQUIRED as n, logCanonicalEvent as o, createLogger as r, DEFAULT_GIT_CLONE_TIMEOUT_MS as s, parseSSEFrames as t, getEnvString as u };
|
|
752
|
+
//# sourceMappingURL=dist-Duor5GbS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-Duor5GbS.js","names":["parts","LogLevelEnum","LogLevelEnum"],"sources":["../../shared/dist/env.js","../../shared/dist/logger/sanitize.js","../../shared/dist/git.js","../../shared/dist/logger/canonical.js","../../shared/dist/logger/types.js","../../shared/dist/logger/logger.js","../../shared/dist/logger/trace-context.js","../../shared/dist/logger/index.js","../../shared/dist/rpc-types.js","../../shared/dist/sse.js"],"sourcesContent":["/**\n * Safely extract a string value from an environment object\n *\n * @param env - Environment object with dynamic keys\n * @param key - The environment variable key to access\n * @returns The string value if present and is a string, undefined otherwise\n */\nexport function getEnvString(env, key) {\n const value = env?.[key];\n return typeof value === 'string' ? value : undefined;\n}\n/**\n * Filter environment variables object to only include string values.\n * Skips undefined, null, and non-string values.\n *\n * Use this when you only need the defined values (e.g., for per-command env\n * where undefined means \"don't override\").\n *\n * @param envVars - Object that may contain undefined values\n * @returns Clean object with only string values\n */\nexport function filterEnvVars(envVars) {\n const filtered = {};\n for (const [key, value] of Object.entries(envVars)) {\n if (value != null && typeof value === 'string') {\n filtered[key] = value;\n }\n }\n return filtered;\n}\n/**\n * Partition environment variables into values to set and keys to unset.\n *\n * - String values → toSet (will be exported)\n * - undefined/null → toUnset (will be unset)\n *\n * This enables idiomatic JS patterns where undefined means \"remove\":\n * ```typescript\n * await sandbox.setEnvVars({\n * API_KEY: 'new-key', // will be set\n * OLD_VAR: undefined, // will be unset\n * });\n * ```\n */\nexport function partitionEnvVars(envVars) {\n const toSet = {};\n const toUnset = [];\n for (const [key, value] of Object.entries(envVars)) {\n if (value != null && typeof value === 'string') {\n toSet[key] = value;\n }\n else {\n toUnset.push(key);\n }\n }\n return { toSet, toUnset };\n}\n","/**\n * Log-only sanitization helpers\n *\n * These functions redact sensitive values for logging output.\n * They MUST NOT be used to mutate command strings before execution.\n */\n/**\n * Sensitive query parameter names to redact from URLs.\n * Anchored to query string context ([?&]) to avoid matching path segments.\n * Value matching stops at & and common URL/command delimiters.\n */\nconst SENSITIVE_PARAMS = /([?&])(X-Amz-Credential|X-Amz-Signature|X-Amz-Security-Token|token|secret|password)=[^&\\s\"'`<>]*/gi;\n/**\n * Redact credentials from URLs for secure logging\n *\n * Replaces any credentials (username:password, tokens, etc.) embedded\n * in URLs with ****** to prevent sensitive data exposure in logs.\n * Works with URLs embedded in text.\n *\n * @param text - String that may contain URLs with credentials\n * @returns String with credentials redacted from any URLs\n */\nexport function redactCredentials(text) {\n // Scan for http(s):// URLs and redact any credentials found\n let result = text;\n let pos = 0;\n while (pos < result.length) {\n const httpPos = result.indexOf('http://', pos);\n const httpsPos = result.indexOf('https://', pos);\n let protocolPos = -1;\n let protocolLen = 0;\n if (httpPos === -1 && httpsPos === -1)\n break;\n if (httpPos !== -1 && (httpsPos === -1 || httpPos < httpsPos)) {\n protocolPos = httpPos;\n protocolLen = 7; // 'http://'.length\n }\n else {\n protocolPos = httpsPos;\n protocolLen = 8; // 'https://'.length\n }\n // Look for @ after the protocol\n const searchStart = protocolPos + protocolLen;\n const atPos = result.indexOf('@', searchStart);\n // Find where the URL ends (whitespace, quotes, or structural delimiters)\n let urlEnd = searchStart;\n while (urlEnd < result.length) {\n const char = result[urlEnd];\n if (/[\\s\"'`<>,;{}[\\]]/.test(char))\n break;\n urlEnd++;\n }\n if (atPos !== -1 && atPos < urlEnd) {\n result = `${result.substring(0, searchStart)}******${result.substring(atPos)}`;\n pos = searchStart + 6; // Move past '******'\n }\n else {\n pos = protocolPos + protocolLen;\n }\n }\n return result;\n}\n/**\n * Redact sensitive query parameters from URLs\n *\n * Strips X-Amz-Credential, X-Amz-Signature, X-Amz-Security-Token,\n * token, secret, and password query params from URLs. Returns\n * non-URL strings unchanged.\n *\n * @param input - String that may contain URLs with sensitive params\n * @returns String with sensitive params replaced by REDACTED\n */\nexport function redactSensitiveParams(input) {\n if (!input.includes('?') || !input.includes('='))\n return input;\n return input.replace(SENSITIVE_PARAMS, '$1$2=REDACTED');\n}\n/**\n * Redact sensitive data from a command string for logging\n *\n * Composes redactCredentials (URL credentials) and redactSensitiveParams\n * (presigned URL query params). For log values only — never mutate\n * command strings before execution.\n *\n * @param command - Command string to sanitize for logging\n * @returns Sanitized command string\n */\nexport function redactCommand(command) {\n return redactSensitiveParams(redactCredentials(command));\n}\n/**\n * Truncate a string for log output with a truncation indicator\n *\n * @param value - String to potentially truncate\n * @param maxLen - Maximum length before truncation (default 120)\n * @returns Object with truncated value and boolean flag\n */\nexport function truncateForLog(value, maxLen = 120) {\n if (value.length <= maxLen) {\n return { value, truncated: false };\n }\n const cutoff = Math.max(0, maxLen - 3);\n return { value: `${value.substring(0, cutoff)}...`, truncated: true };\n}\n","import { redactCommand } from './logger/sanitize.js';\n/**\n * Fallback repository name used when URL parsing fails\n */\nexport const FALLBACK_REPO_NAME = 'repository';\n/** Default wall-clock timeout in milliseconds for git clone operations. */\nexport const DEFAULT_GIT_CLONE_TIMEOUT_MS = 600_000;\n/**\n * Extract repository name from a Git URL\n *\n * Supports multiple URL formats:\n * - HTTPS: https://github.com/user/repo.git → repo\n * - HTTPS without .git: https://github.com/user/repo → repo\n * - SSH: git@github.com:user/repo.git → repo\n * - GitLab/others: https://gitlab.com/org/project.git → project\n *\n * @param repoUrl - Git repository URL (HTTPS or SSH format)\n * @returns Repository name extracted from URL, or 'repository' as fallback\n */\nexport function extractRepoName(repoUrl) {\n // Try parsing as standard URL (https://, http://)\n try {\n const url = new URL(repoUrl);\n const pathParts = url.pathname.split('/');\n const lastPart = pathParts[pathParts.length - 1];\n if (lastPart) {\n return lastPart.replace(/\\.git$/, '');\n }\n }\n catch {\n // Not a standard URL, try SSH format\n }\n // For SSH URLs (git@github.com:user/repo.git), split by : and / to get last segment\n // Only process if the URL contains path delimiters\n if (repoUrl.includes(':') || repoUrl.includes('/')) {\n const segments = repoUrl.split(/[:/]/).filter(Boolean);\n const lastSegment = segments[segments.length - 1];\n if (lastSegment) {\n return lastSegment.replace(/\\.git$/, '');\n }\n }\n return FALLBACK_REPO_NAME;\n}\n/**\n * Sanitize data by redacting credentials from any strings\n * Recursively processes objects and arrays to ensure credentials are never leaked\n */\nexport function sanitizeGitData(data) {\n // Handle primitives\n if (typeof data === 'string') {\n return redactCommand(data);\n }\n if (data === null || data === undefined) {\n return data;\n }\n // Handle arrays\n if (Array.isArray(data)) {\n return data.map((item) => sanitizeGitData(item));\n }\n // Handle objects - recursively sanitize all fields\n if (typeof data === 'object') {\n const result = {};\n for (const [key, value] of Object.entries(data)) {\n result[key] = sanitizeGitData(value);\n }\n return result;\n }\n return data;\n}\n/**\n * Logger wrapper that automatically sanitizes git credentials\n */\nexport class GitLogger {\n baseLogger;\n constructor(baseLogger) {\n this.baseLogger = baseLogger;\n }\n sanitizeContext(context) {\n return context\n ? sanitizeGitData(context)\n : context;\n }\n sanitizeError(error) {\n if (!error)\n return error;\n // Create a new error with sanitized message and stack\n const sanitized = new Error(redactCommand(error.message));\n sanitized.name = error.name;\n if (error.stack) {\n sanitized.stack = redactCommand(error.stack);\n }\n // Preserve other enumerable properties\n const sanitizedRecord = sanitized;\n const errorRecord = error;\n for (const key of Object.keys(error)) {\n if (key !== 'message' && key !== 'stack' && key !== 'name') {\n sanitizedRecord[key] = sanitizeGitData(errorRecord[key]);\n }\n }\n return sanitized;\n }\n debug(message, context) {\n this.baseLogger.debug(message, this.sanitizeContext(context));\n }\n info(message, context) {\n this.baseLogger.info(message, this.sanitizeContext(context));\n }\n warn(message, context) {\n this.baseLogger.warn(message, this.sanitizeContext(context));\n }\n error(message, error, context) {\n this.baseLogger.error(message, this.sanitizeError(error), this.sanitizeContext(context));\n }\n child(context) {\n const sanitized = sanitizeGitData(context);\n const childLogger = this.baseLogger.child(sanitized);\n return new GitLogger(childLogger);\n }\n}\n","import { redactCommand, truncateForLog } from './sanitize.js';\n/** Events that are low-value at info on success */\nconst DEBUG_ON_SUCCESS = new Set([\n 'file.read',\n 'file.write',\n 'file.delete',\n 'file.mkdir'\n]);\nexport function resolveLogLevel(payload, options) {\n if (payload.outcome === 'error')\n return 'error';\n if (options?.successLevel)\n return options.successLevel;\n if (payload.origin === 'internal')\n return 'debug';\n if (DEBUG_ON_SUCCESS.has(payload.event))\n return 'debug';\n return 'info';\n}\n/**\n * Sanitize an Error object by redacting sensitive data from message and stack.\n * Produces a copy so the caller's original Error is not mutated.\n */\nfunction sanitizeError(error) {\n if (!error)\n return undefined;\n const sanitized = new Error(redactCommand(error.message));\n sanitized.name = error.name;\n sanitized.stack = error.stack ? redactCommand(error.stack) : undefined;\n return sanitized;\n}\n/**\n * Sanitize and prepare payload fields for both message building and context emission.\n * Called once by logCanonicalEvent to avoid double-redaction.\n */\nfunction sanitizePayload(payload) {\n if (payload.command === undefined) {\n return { commandTruncated: false };\n }\n const redacted = redactCommand(payload.command);\n const { value, truncated } = truncateForLog(redacted);\n return { sanitizedCommand: value, commandTruncated: truncated };\n}\n/**\n * Build a human-readable canonical event message for dashboards and log viewers.\n *\n * Format: `{event} {outcome} {key_context} [— {reason}] ({durationMs}ms[, {sizeBytes}B])`\n *\n * The if/else chain for key context has implicit priority: command > path >\n * port > repoUrl > pid. If a payload has multiple, only the highest-priority\n * one appears in the message. All fields are still present as discrete\n * queryable keys in the structured log context.\n */\nexport function buildMessage(payload, sanitizedCommand) {\n const { event } = payload;\n // version.check has its own format: no outcome, no duration\n if (event === 'version.check') {\n const parts = ['version.check'];\n if (payload.sdkVersion)\n parts.push(`sdk=${payload.sdkVersion}`);\n if (payload.containerVersion)\n parts.push(`container=${payload.containerVersion}`);\n if (payload.versionOutcome && payload.versionOutcome !== 'compatible') {\n parts.push(`(${payload.versionOutcome})`);\n }\n return parts.join(' ');\n }\n const parts = [event, payload.outcome];\n // Key context — highest priority field shown in message\n if (sanitizedCommand !== undefined) {\n parts.push(sanitizedCommand);\n }\n else if (payload.command !== undefined) {\n // Fallback for direct buildMessage calls without pre-sanitized command\n const redacted = redactCommand(payload.command);\n const { value } = truncateForLog(redacted);\n parts.push(value);\n }\n else if (payload.path !== undefined) {\n parts.push(payload.path);\n }\n else if (payload.port !== undefined) {\n parts.push(String(payload.port));\n }\n else if (payload.repoUrl !== undefined) {\n let gitContext = payload.repoUrl;\n if (payload.branch !== undefined) {\n gitContext += ` ${payload.branch}`;\n }\n parts.push(gitContext);\n }\n else if (payload.pid !== undefined) {\n parts.push(String(payload.pid));\n }\n else if (payload.backupId !== undefined) {\n parts.push(payload.backupId);\n }\n else if (payload.repoPath !== undefined) {\n let gitContext = payload.repoPath;\n if (payload.branch !== undefined) {\n gitContext += ` branch=${payload.branch}`;\n }\n parts.push(gitContext);\n }\n else if (payload.mountsProcessed !== undefined) {\n let destroyContext = `${payload.mountsProcessed} mounts`;\n if (payload.mountFailures)\n destroyContext += `, ${payload.mountFailures} failed`;\n parts.push(destroyContext);\n }\n else if (payload.mountPath !== undefined) {\n parts.push(payload.mountPath);\n }\n // Error reason after em-dash\n if (payload.outcome === 'error') {\n if (payload.errorMessage !== undefined) {\n parts.push(`\\u2014 ${payload.errorMessage}`);\n }\n else if (payload.exitCode !== undefined) {\n parts.push(`\\u2014 exitCode=${payload.exitCode}`);\n }\n }\n // Duration suffix (and optional size)\n const durationSuffix = payload.sizeBytes !== undefined\n ? `(${payload.durationMs}ms, ${payload.sizeBytes}B)`\n : `(${payload.durationMs}ms)`;\n parts.push(durationSuffix);\n return parts.join(' ');\n}\n/**\n * Log a canonical event — the single entry point for all structured operational events.\n *\n * Sanitizes command fields once, builds the message, selects log level from\n * outcome, and emits a structured log entry with the full payload as context.\n */\nexport function logCanonicalEvent(logger, payload, options) {\n // Auto-derive errorMessage from error.message when not explicitly set,\n // then sanitize to prevent credential leaks (e.g., presigned URLs in error strings)\n const resolvedErrorMessage = payload.errorMessage ?? payload.error?.message;\n const sanitizedErrorMessage = resolvedErrorMessage\n ? redactCommand(resolvedErrorMessage)\n : undefined;\n const enrichedPayload = sanitizedErrorMessage !== undefined\n ? { ...payload, errorMessage: sanitizedErrorMessage }\n : payload;\n // Sanitize once, use for both message and context\n const { sanitizedCommand, commandTruncated } = sanitizePayload(enrichedPayload);\n const message = buildMessage(enrichedPayload, sanitizedCommand);\n // Build context from enriched payload, excluding the error object (passed separately)\n const context = {};\n for (const [key, value] of Object.entries(enrichedPayload)) {\n if (key === 'error')\n continue;\n context[key] = value;\n }\n // Apply sanitized command to context\n if (sanitizedCommand !== undefined) {\n context.command = sanitizedCommand;\n if (commandTruncated) {\n context.commandTruncated = true;\n }\n }\n const level = resolveLogLevel(enrichedPayload, options);\n if (level === 'error') {\n logger.error(message, sanitizeError(payload.error), context);\n }\n else if (level === 'warn') {\n logger.warn(message, context);\n }\n else if (level === 'debug') {\n logger.debug(message, context);\n }\n else {\n logger.info(message, context);\n }\n}\n","/**\n * Logger types for Cloudflare Sandbox SDK\n *\n * Provides structured, trace-aware logging across Worker, Durable Object, and Container.\n */\n/**\n * Log levels (from most to least verbose)\n */\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel[LogLevel[\"INFO\"] = 1] = \"INFO\";\n LogLevel[LogLevel[\"WARN\"] = 2] = \"WARN\";\n LogLevel[LogLevel[\"ERROR\"] = 3] = \"ERROR\";\n})(LogLevel || (LogLevel = {}));\n","/**\n * Logger implementation\n */\nimport { LogLevel as LogLevelEnum } from './types.js';\n/**\n * ANSI color codes for terminal output\n */\nconst COLORS = {\n reset: '\\x1b[0m',\n debug: '\\x1b[36m', // Cyan\n info: '\\x1b[32m', // Green\n warn: '\\x1b[33m', // Yellow\n error: '\\x1b[31m', // Red\n dim: '\\x1b[2m' // Dim\n};\n/**\n * CloudflareLogger implements structured logging with support for\n * both JSON output (production) and pretty printing (development).\n */\nexport class CloudflareLogger {\n baseContext;\n minLevel;\n outputMode;\n /**\n * Create a new CloudflareLogger\n *\n * @param baseContext Base context included in all log entries\n * @param minLevel Minimum log level to output (default: INFO)\n * @param outputMode How log entries are formatted and emitted (default: 'structured')\n */\n constructor(baseContext, minLevel = LogLevelEnum.INFO, outputMode = 'structured') {\n this.baseContext = baseContext;\n this.minLevel = minLevel;\n this.outputMode = outputMode;\n }\n /**\n * Log debug-level message\n */\n debug(message, context) {\n if (this.shouldLog(LogLevelEnum.DEBUG)) {\n const logData = this.buildLogData('debug', message, context);\n this.output(console.log, logData);\n }\n }\n /**\n * Log info-level message\n */\n info(message, context) {\n if (this.shouldLog(LogLevelEnum.INFO)) {\n const logData = this.buildLogData('info', message, context);\n this.output(console.log, logData);\n }\n }\n /**\n * Log warning-level message\n */\n warn(message, context) {\n if (this.shouldLog(LogLevelEnum.WARN)) {\n const logData = this.buildLogData('warn', message, context);\n this.output(console.warn, logData);\n }\n }\n /**\n * Log error-level message\n */\n error(message, error, context) {\n if (this.shouldLog(LogLevelEnum.ERROR)) {\n const logData = this.buildLogData('error', message, context, error);\n this.output(console.error, logData);\n }\n }\n /**\n * Create a child logger with additional context\n */\n child(context) {\n return new CloudflareLogger({ ...this.baseContext, ...context }, this.minLevel, this.outputMode);\n }\n /**\n * Check if a log level should be output\n */\n shouldLog(level) {\n return level >= this.minLevel;\n }\n /**\n * Build log data object\n */\n buildLogData(level, message, context, error) {\n const logData = {\n level,\n message,\n ...this.baseContext,\n ...context,\n timestamp: new Date().toISOString()\n };\n // Add error details if provided\n if (error) {\n logData.error = {\n message: error.message,\n stack: error.stack,\n name: error.name\n };\n }\n return logData;\n }\n /**\n * Output log data using the configured output mode\n */\n output(consoleFn, data) {\n switch (this.outputMode) {\n case 'pretty':\n this.outputPretty(consoleFn, data);\n break;\n case 'json-line':\n this.outputJsonLine(consoleFn, data);\n break;\n case 'structured':\n this.outputStructured(consoleFn, data);\n break;\n }\n }\n /**\n * Output as JSON string (container stdout — parsed by Containers pipeline)\n */\n outputJsonLine(consoleFn, data) {\n consoleFn(JSON.stringify(data));\n }\n /**\n * Output as raw object (Workers/DOs — Workers Logs auto-indexes fields)\n */\n outputStructured(consoleFn, data) {\n consoleFn(data);\n }\n /**\n * Output as pretty-printed, colored text (development)\n *\n * Each log event is a single consoleFn() call so it appears as one entry\n * in the Cloudflare dashboard. Context is rendered inline as compact key=value pairs.\n *\n * Format: LEVEL [component] message trace=tr_... key=value key=value\n */\n outputPretty(consoleFn, data) {\n const { level, message: msg, timestamp, traceId, component, sandboxId, processId, commandId, durationMs, serviceVersion, instanceId, error, ...rest } = data;\n const levelStr = String(level || 'INFO').toUpperCase();\n const levelColor = this.getLevelColor(levelStr);\n const componentBadge = component ? `[${component}]` : '';\n const timeStr = timestamp\n ? `${COLORS.dim}${new Date(timestamp).toISOString().substring(11, 23)}${COLORS.reset} `\n : '';\n let logLine = `${timeStr}${levelColor}${levelStr.padEnd(5)}${COLORS.reset} ${componentBadge} ${msg}`;\n // Append all context as compact key=value pairs on the same line\n const pairs = [];\n if (traceId)\n pairs.push(`trace=${String(traceId).substring(0, 12)}`);\n if (commandId)\n pairs.push(`cmd=${String(commandId).substring(0, 12)}`);\n if (sandboxId)\n pairs.push(`sandbox=${sandboxId}`);\n if (processId)\n pairs.push(`proc=${processId}`);\n if (durationMs !== undefined)\n pairs.push(`dur=${durationMs}ms`);\n // Append remaining context fields inline\n for (const [key, value] of Object.entries(rest)) {\n if (value === undefined || value === null)\n continue;\n const v = typeof value === 'object'\n ? JSON.stringify(value)\n : this.sanitizePrettyValue(String(value));\n pairs.push(`${key}=${v}`);\n }\n // Append error info inline\n if (error && typeof error === 'object') {\n const errorObj = error;\n if (errorObj.name)\n pairs.push(`err.name=${this.sanitizePrettyValue(errorObj.name)}`);\n if (errorObj.message)\n pairs.push(`err.msg=${this.sanitizePrettyValue(errorObj.message)}`);\n if (errorObj.stack)\n pairs.push(`err.stack=${this.sanitizePrettyValue(errorObj.stack)}`);\n }\n if (pairs.length > 0) {\n logLine += ` ${COLORS.dim}${pairs.join(' ')}${COLORS.reset}`;\n }\n // Single consoleFn call = single log entry in the dashboard\n consoleFn(logLine);\n }\n /**\n * Collapse newlines so a single consoleFn() call stays on one line.\n * Cloudflare's log pipeline splits on literal newlines, which fragments\n * stack traces and multi-line error messages into separate entries.\n */\n sanitizePrettyValue(value) {\n return value.replace(/\\r/g, '\\\\r').replace(/\\n/g, '\\\\n');\n }\n /**\n * Get ANSI color code for log level\n */\n getLevelColor(level) {\n const levelLower = level.toLowerCase();\n switch (levelLower) {\n case 'debug':\n return COLORS.debug;\n case 'info':\n return COLORS.info;\n case 'warn':\n return COLORS.warn;\n case 'error':\n return COLORS.error;\n default:\n return COLORS.reset;\n }\n }\n}\n","/**\n * Trace context utilities for request correlation\n *\n * Trace IDs enable correlating logs across distributed components:\n * Worker → Durable Object → Container → back\n *\n * The trace ID is propagated via the X-Trace-Id HTTP header.\n */\n/**\n * Utility for managing trace context across distributed components\n */\n// biome-ignore lint/complexity/noStaticOnlyClass: Keep as class for namespace grouping and discoverability\nexport class TraceContext {\n /**\n * HTTP header name for trace ID propagation\n */\n static TRACE_HEADER = 'X-Trace-Id';\n /**\n * Generate a new trace ID\n *\n * Format: \"tr_\" + 16 random hex characters\n * Example: \"tr_7f3a9b2c4e5d6f1a\"\n *\n * @returns Newly generated trace ID\n */\n static generate() {\n // Use crypto.randomUUID() for randomness, extract 16 hex chars\n const randomHex = crypto.randomUUID().replace(/-/g, '').substring(0, 16);\n return `tr_${randomHex}`;\n }\n /**\n * Extract trace ID from HTTP request headers\n *\n * @param headers Request headers\n * @returns Trace ID if present, null otherwise\n */\n static fromHeaders(headers) {\n return headers.get(TraceContext.TRACE_HEADER);\n }\n /**\n * Create headers object with trace ID for outgoing requests\n *\n * @param traceId Trace ID to include\n * @returns Headers object with X-Trace-Id set\n */\n static toHeaders(traceId) {\n return { [TraceContext.TRACE_HEADER]: traceId };\n }\n /**\n * Get the header name used for trace ID propagation\n *\n * @returns Header name (\"X-Trace-Id\")\n */\n static getHeaderName() {\n return TraceContext.TRACE_HEADER;\n }\n}\n","/**\n * Logger module\n *\n * Provides structured, trace-aware logging with:\n * - Explicit logger passing via constructor injection\n * - Three output modes: structured (Workers/DOs), json-line (container), pretty (local dev)\n * - Environment auto-detection\n * - Log level configuration\n *\n * Usage:\n *\n * ```typescript\n * // Create a logger at entry point\n * const logger = createLogger({ component: 'sandbox-do', traceId: 'tr_abc123' });\n *\n * // Pass to classes via constructor\n * const service = new MyService(logger);\n *\n * // Create child loggers for additional context\n * const execLogger = logger.child({ commandId: 'cmd-456' });\n * execLogger.info('Operation started');\n * ```\n */\nimport { CloudflareLogger } from './logger.js';\nimport { TraceContext } from './trace-context.js';\nimport { LogLevel as LogLevelEnum } from './types.js';\nexport { buildMessage, logCanonicalEvent, resolveLogLevel } from './canonical.js';\nexport { CloudflareLogger } from './logger.js';\nexport { TraceContext } from './trace-context.js';\nexport { LogLevel as LogLevelEnum } from './types.js';\n/**\n * Create a no-op logger for testing\n *\n * Returns a logger that implements the Logger interface but does nothing.\n * Useful for tests that don't need actual logging output.\n *\n * @returns No-op logger instance\n *\n * @example\n * ```typescript\n * // In tests\n * const client = new HttpClient({\n * baseUrl: 'http://test.com',\n * logger: createNoOpLogger() // Optional - tests can enable real logging if needed\n * });\n * ```\n */\nexport function createNoOpLogger() {\n return {\n debug: () => { },\n info: () => { },\n warn: () => { },\n error: () => { },\n child: () => createNoOpLogger()\n };\n}\n/**\n * Create a new logger instance\n *\n * @param context Base context for the logger. Must include 'component'.\n * TraceId will be auto-generated if not provided.\n * @returns New logger instance\n *\n * @example\n * ```typescript\n * // In Durable Object\n * const logger = createLogger({\n * component: 'sandbox-do',\n * traceId: TraceContext.fromHeaders(request.headers) || TraceContext.generate(),\n * sandboxId: this.id\n * });\n *\n * // In Container\n * const logger = createLogger({\n * component: 'container',\n * traceId: TraceContext.fromHeaders(request.headers)!,\n * sandboxId: this.id\n * });\n * ```\n */\nexport function createLogger(context) {\n const minLevel = getLogLevelFromEnv();\n const outputMode = getOutputMode(context.component);\n const baseContext = {\n ...context,\n traceId: context.traceId || TraceContext.generate(),\n component: context.component,\n serviceVersion: context.serviceVersion || getEnvVar('SANDBOX_VERSION') || undefined,\n instanceId: context.instanceId ||\n getEnvVar('HOSTNAME') ||\n getEnvVar('SANDBOX_INSTANCE_ID') ||\n undefined\n };\n return new CloudflareLogger(baseContext, minLevel, outputMode);\n}\n/**\n * Get log level from environment variable\n *\n * Checks SANDBOX_LOG_LEVEL env var, falls back to default based on environment.\n * Default: 'debug' for development, 'info' for production\n */\nfunction getLogLevelFromEnv() {\n const envLevel = getEnvVar('SANDBOX_LOG_LEVEL') || 'info';\n switch (envLevel.toLowerCase()) {\n case 'debug':\n return LogLevelEnum.DEBUG;\n case 'info':\n return LogLevelEnum.INFO;\n case 'warn':\n return LogLevelEnum.WARN;\n case 'error':\n return LogLevelEnum.ERROR;\n default:\n // Invalid level, fall back to info\n return LogLevelEnum.INFO;\n }\n}\n/**\n * Determine output mode based on component and environment:\n * - SANDBOX_LOG_FORMAT=pretty → 'pretty' for all components (local wrangler dev)\n * - Container/Executor without pretty → 'json-line' (Bun stdout → Containers pipeline)\n * - Everything else without pretty → 'structured' (Workers/DOs → Workers Logs)\n *\n * In local dev, setting SANDBOX_LOG_FORMAT=pretty gives readable terminal\n * output on both the DO side and container side. In production (where the\n * var isn't set), DOs emit structured objects and containers emit single-line\n * JSON — both queryable by their respective observability pipelines.\n */\nfunction getOutputMode(component) {\n const format = getEnvVar('SANDBOX_LOG_FORMAT');\n if (format?.toLowerCase() === 'pretty') {\n return 'pretty';\n }\n if (component === 'container' || component === 'executor') {\n return 'json-line';\n }\n return 'structured';\n}\n/**\n * Get environment variable value\n *\n * Supports both Node.js (process.env) and Bun (Bun.env)\n */\nfunction getEnvVar(name) {\n // Try process.env first (Node.js / Bun)\n if (typeof process !== 'undefined' && process.env) {\n return process.env[name];\n }\n // Try Bun.env (Bun runtime)\n if (typeof Bun !== 'undefined') {\n const bunEnv = Bun.env;\n if (bunEnv) {\n return bunEnv[name];\n }\n }\n return undefined;\n}\n","/**\n * Shared interface types for the container-control path.\n *\n * Defines the contract between the SDK control client and the container\n * control-plane API. The current wire implementation uses capnweb RPC.\n */\n/**\n * Error name thrown by the host's `connect` when it has not yet provisioned\n * the requested hash and the request did not carry tarball bytes. The SDK\n * recognises this name via `Error.name` and retries the connect with the\n * bytes attached. Kept as a string constant so it survives capnweb\n * cross-realm error reconstruction.\n */\nexport const EXTENSION_TARBALL_REQUIRED = 'ExtensionTarballRequired';\n","/**\n * Shared SSE parsing utilities.\n *\n * Parses SSE frames from arbitrary text chunks while preserving partial state\n * across chunk boundaries.\n */\n/**\n * Parse SSE frames from a buffer.\n *\n * Returns parsed events, remaining unparsed text, and the current partial event\n * so callers can continue parsing on the next chunk.\n */\nexport function parseSSEFrames(buffer, currentEvent = { data: [] }) {\n const events = [];\n let i = 0;\n while (i < buffer.length) {\n const newlineIndex = buffer.indexOf('\\n', i);\n if (newlineIndex === -1)\n break;\n const rawLine = buffer.substring(i, newlineIndex);\n const line = rawLine.endsWith('\\r') ? rawLine.slice(0, -1) : rawLine;\n i = newlineIndex + 1;\n if (line === '' && currentEvent.data.length > 0) {\n events.push({\n event: currentEvent.event,\n data: currentEvent.data.join('\\n')\n });\n currentEvent = { data: [] };\n continue;\n }\n if (line.startsWith('event:')) {\n const value = line.startsWith('event: ')\n ? line.substring(7)\n : line.substring(6);\n currentEvent.event = value;\n continue;\n }\n if (line.startsWith('data:')) {\n const value = line.startsWith('data: ')\n ? line.substring(6)\n : line.substring(5);\n currentEvent.data.push(value);\n }\n }\n return {\n events,\n remaining: buffer.substring(i),\n currentEvent\n };\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,aAAa,KAAK,KAAK;CACnC,MAAM,QAAQ,MAAM;AACpB,QAAO,OAAO,UAAU,WAAW,QAAQ;;;;;;;;;;;;;;;;AAmC/C,SAAgB,iBAAiB,SAAS;CACtC,MAAM,QAAQ,EAAE;CAChB,MAAM,UAAU,EAAE;AAClB,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,QAAQ,CAC9C,KAAI,SAAS,QAAQ,OAAO,UAAU,SAClC,OAAM,OAAO;KAGb,SAAQ,KAAK,IAAI;AAGzB,QAAO;EAAE;EAAO;EAAS;;;;;;;;;;;;;;;;AC5C7B,MAAM,mBAAmB;;;;;;;;;;;AAWzB,SAAgB,kBAAkB,MAAM;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QAAQ;EACtB,MAAM,eAAe,OAAO,QAAQ,MAAM,EAAE;AAC5C,MAAI,iBAAiB,GACjB;EACJ,MAAM,UAAU,OAAO,UAAU,GAAG,aAAa;EACjD,MAAM,OAAO,QAAQ,SAAS,KAAK,GAAG,QAAQ,MAAM,GAAG,GAAG,GAAG;AAC7D,MAAI,eAAe;AACnB,MAAI,SAAS,MAAM,aAAa,KAAK,SAAS,GAAG;AAC7C,UAAO,KAAK;IACR,OAAO,aAAa;IACpB,MAAM,aAAa,KAAK,KAAK,KAAK;IACrC,CAAC;AACF,kBAAe,EAAE,MAAM,EAAE,EAAE;AAC3B;;AAEJ,MAAI,KAAK,WAAW,SAAS,EAAE;AAI3B,gBAAa,QAHC,KAAK,WAAW,UAAU,GAClC,KAAK,UAAU,EAAE,GACjB,KAAK,UAAU,EAAE;AAEvB;;AAEJ,MAAI,KAAK,WAAW,QAAQ,EAAE;GAC1B,MAAM,QAAQ,KAAK,WAAW,SAAS,GACjC,KAAK,UAAU,EAAE,GACjB,KAAK,UAAU,EAAE;AACvB,gBAAa,KAAK,KAAK,MAAM;;;AAGrC,QAAO;EACH;EACA,WAAW,OAAO,UAAU,EAAE;EAC9B;EACH"}
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { A as
|
|
4
|
-
export { BackupCreateContext, BackupCreateError, BackupExpiredContext, BackupExpiredError, BackupNotFoundContext, BackupNotFoundError, BackupRestoreContext, BackupRestoreError, CodeExecutionContext, CodeExecutionError, CommandError, CommandErrorContext, CommandNotFoundContext, CommandNotFoundError, ContainerUnavailableContext, ContainerUnavailableError, ContextNotFoundContext, ContextNotFoundError, CustomDomainRequiredError, ErrorCode, ErrorCode as ErrorCodeType, ErrorResponse, FileExistsContext, FileExistsError, FileNotFoundContext, FileNotFoundError, FileSystemContext, FileSystemError, FileTooLargeError, GitAuthFailedContext, GitAuthenticationError, GitBranchNotFoundContext, GitBranchNotFoundError, GitCheckoutError, GitCloneError, GitError, GitErrorContext, GitNetworkError, GitRepositoryNotFoundContext, GitRepositoryNotFoundError, InternalErrorContext, InterpreterNotReadyContext, InterpreterNotReadyError, InvalidBackupConfigContext, InvalidBackupConfigError, InvalidGitUrlError, InvalidPortContext, InvalidPortError, Operation, OperationInterruptedContext, OperationInterruptedError, OperationInterruptedReason, OperationType, PermissionDeniedError, PortAlreadyExposedContext, PortAlreadyExposedError, PortError, PortErrorContext, PortInUseError, PortNotExposedContext, PortNotExposedError, ProcessError, ProcessErrorContext, ProcessExitedBeforeReadyContext, ProcessExitedBeforeReadyError, ProcessNotFoundContext, ProcessNotFoundError, ProcessReadyTimeoutContext, ProcessReadyTimeoutError, RPCTransportContext, RPCTransportError, RPCTransportErrorKind, SandboxError, ServiceNotRespondingError,
|
|
1
|
+
import { A as PortAlreadyExposedContext, B as ProcessWaitTimeoutContext, C as InvalidProcessCwdContext, E as InvalidTerminalCwdContext, F as ProcessExitedBeforeLogContext, G as TerminalControlErrorContext, H as RPCTransportErrorKind, I as ProcessExitedBeforeReadyContext, J as ErrorResponse, K as TerminalNotFoundContext, L as ProcessNotFoundContext, M as PortNotExposedContext, N as ProcessAbortedContext, O as OperationInterruptedContext, P as ProcessErrorContext, R as ProcessReadyTimeoutContext, S as InvalidProcessCursorContext, T as InvalidTerminalCursorContext, U as StaleProcessHandleContext, V as RPCTransportContext, W as StaleTerminalHandleContext, X as OperationType, Y as Operation, Z as ErrorCode, _ as GitRepositoryNotFoundContext, a as CodeExecutionContext, b as InvalidBackupConfigContext, c as ContainerUnavailableContext, d as FileNotFoundContext, f as FileSystemContext, g as GitErrorContext, h as GitBranchNotFoundContext, i as BackupRestoreContext, j as PortErrorContext, k as OperationInterruptedReason, l as ContextNotFoundContext, m as GitAuthFailedContext, n as BackupExpiredContext, o as CommandErrorContext, q as ValidationFailedContext, r as BackupNotFoundContext, s as CommandNotFoundContext, t as BackupCreateContext, u as FileExistsContext, v as InternalErrorContext, w as InvalidProcessEnvironmentContext, x as InvalidPortContext, y as InterpreterNotReadyContext, z as ProcessSpawnFailedContext } from "../contexts-1EsLHByO.js";
|
|
2
|
+
import "../process-types-GStiZ8f8.js";
|
|
3
|
+
import { $ as TerminalNotFoundError, A as GitError, B as PermissionDeniedError, C as ServiceNotRespondingError, D as GitBranchNotFoundError, E as GitAuthenticationError, F as ValidationFailedError, G as ContainerUnavailableError, H as BackupExpiredError, I as FileExistsError, J as InvalidTerminalCwdError, K as InvalidBackupConfigError, L as FileNotFoundError, M as GitRepositoryNotFoundError, N as InterpreterNotReadyError, O as GitCheckoutError, P as InvalidGitUrlError, Q as TerminalControlError, R as FileSystemError, S as PortNotExposedError, T as ContextNotFoundError, U as BackupNotFoundError, V as BackupCreateError, W as BackupRestoreError, X as RPCTransportError, Y as OperationInterruptedError, Z as StaleTerminalHandleError, _ as CustomDomainRequiredError, a as InvalidProcessCursorError, b as PortError, c as ProcessAbortedError, d as ProcessExitedBeforeReadyError, et as SandboxError, f as ProcessNotFoundError, g as StaleProcessHandleError, h as ProcessWaitTimeoutError, i as CommandNotFoundError, j as GitNetworkError, k as GitCloneError, l as ProcessError, m as ProcessSpawnFailedError, n as RuntimeControlProtocolError, o as InvalidProcessCwdError, p as ProcessReadyTimeoutError, q as InvalidTerminalCursorError, r as CommandError, s as InvalidProcessEnvironmentError, t as RuntimeIdentityInactiveError, tt as createErrorFromResponse, u as ProcessExitedBeforeLogError, v as InvalidPortError, w as CodeExecutionError, x as PortInUseError, y as PortAlreadyExposedError, z as FileTooLargeError } from "../index-HNYBk-az.js";
|
|
4
|
+
export { BackupCreateContext, BackupCreateError, BackupExpiredContext, BackupExpiredError, BackupNotFoundContext, BackupNotFoundError, BackupRestoreContext, BackupRestoreError, CodeExecutionContext, CodeExecutionError, CommandError, CommandErrorContext, CommandNotFoundContext, CommandNotFoundError, ContainerUnavailableContext, ContainerUnavailableError, ContextNotFoundContext, ContextNotFoundError, CustomDomainRequiredError, ErrorCode, ErrorCode as ErrorCodeType, ErrorResponse, FileExistsContext, FileExistsError, FileNotFoundContext, FileNotFoundError, FileSystemContext, FileSystemError, FileTooLargeError, GitAuthFailedContext, GitAuthenticationError, GitBranchNotFoundContext, GitBranchNotFoundError, GitCheckoutError, GitCloneError, GitError, GitErrorContext, GitNetworkError, GitRepositoryNotFoundContext, GitRepositoryNotFoundError, InternalErrorContext, InterpreterNotReadyContext, InterpreterNotReadyError, InvalidBackupConfigContext, InvalidBackupConfigError, InvalidGitUrlError, InvalidPortContext, InvalidPortError, InvalidProcessCursorContext, InvalidProcessCursorError, InvalidProcessCwdContext, InvalidProcessCwdError, InvalidProcessEnvironmentContext, InvalidProcessEnvironmentError, InvalidTerminalCursorContext, InvalidTerminalCursorError, InvalidTerminalCwdContext, InvalidTerminalCwdError, Operation, OperationInterruptedContext, OperationInterruptedError, OperationInterruptedReason, OperationType, PermissionDeniedError, PortAlreadyExposedContext, PortAlreadyExposedError, PortError, PortErrorContext, PortInUseError, PortNotExposedContext, PortNotExposedError, ProcessAbortedContext, ProcessAbortedError, ProcessError, ProcessErrorContext, ProcessExitedBeforeLogContext, ProcessExitedBeforeLogError, ProcessExitedBeforeReadyContext, ProcessExitedBeforeReadyError, ProcessNotFoundContext, ProcessNotFoundError, ProcessReadyTimeoutContext, ProcessReadyTimeoutError, ProcessSpawnFailedContext, ProcessSpawnFailedError, ProcessWaitTimeoutContext, ProcessWaitTimeoutError, RPCTransportContext, RPCTransportError, RPCTransportErrorKind, RuntimeControlProtocolError, RuntimeIdentityInactiveError, SandboxError, ServiceNotRespondingError, StaleProcessHandleContext, StaleProcessHandleError, StaleTerminalHandleContext, StaleTerminalHandleError, TerminalControlError, TerminalControlErrorContext, TerminalNotFoundContext, TerminalNotFoundError, ValidationFailedContext, ValidationFailedError, createErrorFromResponse };
|
package/dist/errors/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ErrorCode, t as Operation } from "../errors-
|
|
2
|
-
import { A as
|
|
1
|
+
import { i as ErrorCode, t as Operation } from "../errors-CXR0xBpw.js";
|
|
2
|
+
import { $ as TerminalControlError, A as GitCloneError, B as FileTooLargeError, C as PortNotExposedError, D as GitAuthenticationError, E as ContextNotFoundError, F as InvalidGitUrlError, G as BackupRestoreError, H as BackupCreateError, I as ValidationFailedError, J as InvalidTerminalCursorError, K as ContainerUnavailableError, L as FileExistsError, M as GitNetworkError, N as GitRepositoryNotFoundError, O as GitBranchNotFoundError, P as InterpreterNotReadyError, Q as StaleTerminalHandleError, R as FileNotFoundError, S as PortInUseError, T as CodeExecutionError, U as BackupExpiredError, V as PermissionDeniedError, W as BackupNotFoundError, X as OperationInterruptedError, Y as InvalidTerminalCwdError, Z as RPCTransportError, _ as StaleProcessHandleError, a as CommandNotFoundError, b as PortAlreadyExposedError, c as InvalidProcessEnvironmentError, d as ProcessExitedBeforeLogError, et as TerminalNotFoundError, f as ProcessExitedBeforeReadyError, g as ProcessWaitTimeoutError, h as ProcessSpawnFailedError, i as CommandError, j as GitError, k as GitCheckoutError, l as ProcessAbortedError, m as ProcessReadyTimeoutError, n as RuntimeIdentityInactiveError, o as InvalidProcessCursorError, p as ProcessNotFoundError, q as InvalidBackupConfigError, r as RuntimeControlProtocolError, s as InvalidProcessCwdError, t as createErrorFromResponse, tt as SandboxError, u as ProcessError, v as CustomDomainRequiredError, w as ServiceNotRespondingError, x as PortError, y as InvalidPortError, z as FileSystemError } from "../errors-QYlSkVGz.js";
|
|
3
3
|
|
|
4
|
-
export { BackupCreateError, BackupExpiredError, BackupNotFoundError, BackupRestoreError, CodeExecutionError, CommandError, CommandNotFoundError, ContainerUnavailableError, ContextNotFoundError, CustomDomainRequiredError, ErrorCode, FileExistsError, FileNotFoundError, FileSystemError, FileTooLargeError, GitAuthenticationError, GitBranchNotFoundError, GitCheckoutError, GitCloneError, GitError, GitNetworkError, GitRepositoryNotFoundError, InterpreterNotReadyError, InvalidBackupConfigError, InvalidGitUrlError, InvalidPortError, Operation, OperationInterruptedError, PermissionDeniedError, PortAlreadyExposedError, PortError, PortInUseError, PortNotExposedError, ProcessError, ProcessExitedBeforeReadyError, ProcessNotFoundError, ProcessReadyTimeoutError, RPCTransportError, SandboxError, ServiceNotRespondingError,
|
|
4
|
+
export { BackupCreateError, BackupExpiredError, BackupNotFoundError, BackupRestoreError, CodeExecutionError, CommandError, CommandNotFoundError, ContainerUnavailableError, ContextNotFoundError, CustomDomainRequiredError, ErrorCode, FileExistsError, FileNotFoundError, FileSystemError, FileTooLargeError, GitAuthenticationError, GitBranchNotFoundError, GitCheckoutError, GitCloneError, GitError, GitNetworkError, GitRepositoryNotFoundError, InterpreterNotReadyError, InvalidBackupConfigError, InvalidGitUrlError, InvalidPortError, InvalidProcessCursorError, InvalidProcessCwdError, InvalidProcessEnvironmentError, InvalidTerminalCursorError, InvalidTerminalCwdError, Operation, OperationInterruptedError, PermissionDeniedError, PortAlreadyExposedError, PortError, PortInUseError, PortNotExposedError, ProcessAbortedError, ProcessError, ProcessExitedBeforeLogError, ProcessExitedBeforeReadyError, ProcessNotFoundError, ProcessReadyTimeoutError, ProcessSpawnFailedError, ProcessWaitTimeoutError, RPCTransportError, RuntimeControlProtocolError, RuntimeIdentityInactiveError, SandboxError, ServiceNotRespondingError, StaleProcessHandleError, StaleTerminalHandleError, TerminalControlError, TerminalNotFoundError, ValidationFailedError, createErrorFromResponse };
|