@cloudflare/sandbox 0.13.0-next.776.1 → 0.13.0-next.797.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.
Files changed (33) hide show
  1. package/dist/bridge/index.js +24 -8
  2. package/dist/bridge/index.js.map +1 -1
  3. package/dist/{dist-Duor5GbS.js → dist-n_eniPAR.js} +8 -46
  4. package/dist/dist-n_eniPAR.js.map +1 -0
  5. package/dist/extensions/index.d.ts +2 -2
  6. package/dist/extensions/index.js +2 -2
  7. package/dist/{extensions-CFB2xHqY.js → extensions-Be5HnDGt.js} +2 -2
  8. package/dist/{extensions-CFB2xHqY.js.map → extensions-Be5HnDGt.js.map} +1 -1
  9. package/dist/{filesystem-BWAZCZER.d.ts → filesystem-Y5aF3nmJ.d.ts} +7 -3
  10. package/dist/filesystem-Y5aF3nmJ.d.ts.map +1 -0
  11. package/dist/git/index.d.ts +2 -2
  12. package/dist/git/index.js +2 -2
  13. package/dist/{index-Bs4bqXDR.d.ts → index-DfXx3uZL.d.ts} +2 -2
  14. package/dist/{index-Bs4bqXDR.d.ts.map → index-DfXx3uZL.d.ts.map} +1 -1
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +3 -3
  18. package/dist/interpreter/index.d.ts +2 -2
  19. package/dist/interpreter/index.js +2 -2
  20. package/dist/openai/index.d.ts +2 -2
  21. package/dist/openai/index.d.ts.map +1 -1
  22. package/dist/openai/index.js +10 -34
  23. package/dist/openai/index.js.map +1 -1
  24. package/dist/opencode/index.d.ts +2 -2
  25. package/dist/opencode/index.js +2 -2
  26. package/dist/{sandbox-cmlgGVYX.js → sandbox-BEhPgFZx.js} +127 -48
  27. package/dist/sandbox-BEhPgFZx.js.map +1 -0
  28. package/dist/{sandbox-BbAabq93.d.ts → sandbox-CBkS3tGv.d.ts} +2 -2
  29. package/dist/{sandbox-BbAabq93.d.ts.map → sandbox-CBkS3tGv.d.ts.map} +1 -1
  30. package/package.json +1 -1
  31. package/dist/dist-Duor5GbS.js.map +0 -1
  32. package/dist/filesystem-BWAZCZER.d.ts.map +0 -1
  33. package/dist/sandbox-cmlgGVYX.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { o as ProcessStatus, s as SandboxCommand } from "./process-types-GStiZ8f8.js";
2
- import { A as CreateTerminalOptions, D as MountBucketOptions, M as Terminal, R as ExecOptions, S as BackupOptions, T as DirectoryBackup, _ as RenameFileResult, b as WriteFileResult, d as ListFilesOptions, f as ListFilesResult, g as ReadFileStreamResult, h as ReadFileResult, i as DeleteFileResult, k as RestoreBackupResult, m as MoveFileResult, o as FileEncoding, p as MkdirResult, q as SandboxProcess, r as CheckChangesResult, s as FileExistsResult, t as CheckChangesOptions, v as WatchOptions } from "./filesystem-BWAZCZER.js";
2
+ import { A as CreateTerminalOptions, D as MountBucketOptions, M as Terminal, R as ExecOptions, S as BackupOptions, T as DirectoryBackup, _ as RenameFileResult, b as WriteFileResult, d as ListFilesOptions, f as ListFilesResult, g as ReadFileStreamResult, h as ReadFileResult, i as DeleteFileResult, k as RestoreBackupResult, m as MoveFileResult, o as FileEncoding, p as MkdirResult, q as SandboxProcess, r as CheckChangesResult, s as FileExistsResult, t as CheckChangesOptions, v as WatchOptions } from "./filesystem-Y5aF3nmJ.js";
3
3
 
4
4
  //#region ../shared/dist/types/sandbox.d.ts
5
5
 
@@ -39,4 +39,4 @@ interface ISandbox {
39
39
  }
40
40
  //#endregion
41
41
  export { ISandbox as t };
42
- //# sourceMappingURL=sandbox-BbAabq93.d.ts.map
42
+ //# sourceMappingURL=sandbox-CBkS3tGv.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox-BbAabq93.d.ts","names":["ProcessStatus","SandboxCommand","CreateTerminalOptions","Terminal","BackupOptions","DirectoryBackup","MountBucketOptions","RestoreBackupResult","ExecOptions","SandboxProcess","CheckChangesOptions","CheckChangesResult","DeleteFileResult","FileEncoding","FileExistsResult","ListFilesOptions","ListFilesResult","MkdirResult","MoveFileResult","ReadFileResult","ReadFileStreamResult","RenameFileResult","WatchOptions","WriteFileResult","ISandbox","Promise","Uint8Array","ReadableStream","Exclude","Record","Request","Response"],"sources":["../../shared/dist/types/sandbox.d.ts"],"sourcesContent":["import type { ProcessStatus, SandboxCommand } from '../process-types.js';\nimport type { CreateTerminalOptions, Terminal } from '../pty-types.js';\nimport type { BackupOptions, DirectoryBackup, MountBucketOptions, RestoreBackupResult } from './backup-mounts.js';\nimport type { ExecOptions, SandboxProcess } from './core.js';\nimport type { CheckChangesOptions, CheckChangesResult, DeleteFileResult, FileEncoding, FileExistsResult, ListFilesOptions, ListFilesResult, MkdirResult, MoveFileResult, ReadFileResult, ReadFileStreamResult, RenameFileResult, WatchOptions, WriteFileResult } from './filesystem.js';\nexport interface ISandbox {\n exec(command: SandboxCommand, options?: ExecOptions): Promise<SandboxProcess>;\n getProcess(id: string): Promise<SandboxProcess | null>;\n listProcesses(): Promise<ProcessStatus[]>;\n writeFile(path: string, content: string | ReadableStream<Uint8Array>, options?: {\n encoding?: string;\n }): Promise<WriteFileResult>;\n readFile(path: string, options: {\n encoding: 'none';\n }): Promise<ReadFileStreamResult>;\n readFile(path: string, options?: {\n encoding?: Exclude<FileEncoding, 'none'>;\n }): Promise<ReadFileResult>;\n readFileStream(path: string): Promise<ReadableStream<Uint8Array>>;\n watch(path: string, options?: WatchOptions): Promise<ReadableStream<Uint8Array>>;\n checkChanges(path: string, options?: CheckChangesOptions): Promise<CheckChangesResult>;\n mkdir(path: string, options?: {\n recursive?: boolean;\n }): Promise<MkdirResult>;\n deleteFile(path: string): Promise<DeleteFileResult>;\n renameFile(oldPath: string, newPath: string, options?: Record<string, never>): Promise<RenameFileResult>;\n moveFile(sourcePath: string, destinationPath: string, options?: Record<string, never>): Promise<MoveFileResult>;\n listFiles(path: string, options?: ListFilesOptions): Promise<ListFilesResult>;\n exists(path: string): Promise<FileExistsResult>;\n setEnvVars(envVars: Record<string, string | undefined>): Promise<void>;\n mountBucket(bucket: string, mountPath: string, options: MountBucketOptions): Promise<void>;\n unmountBucket(mountPath: string): Promise<void>;\n createBackup(options: BackupOptions): Promise<DirectoryBackup>;\n restoreBackup(backup: DirectoryBackup): Promise<RestoreBackupResult>;\n wsConnect(request: Request, port: number): Promise<Response>;\n createTerminal(options: CreateTerminalOptions): Promise<Terminal>;\n getTerminal(id: string): Promise<Terminal | null>;\n listTerminals(): Promise<Terminal[]>;\n}\n//# sourceMappingURL=sandbox.d.ts.map"],"mappings":";;;;;AAMkBC,UADDuB,QAAAA,CACCvB;EAA0BO,IAAAA,CAAAA,OAAAA,EAA1BP,cAA0BO,EAAAA,OAAAA,CAAAA,EAAAA,WAAAA,CAAAA,EAAciB,OAAdjB,CAAsBC,cAAtBD,CAAAA;EAAsBC,UAAAA,CAAAA,EAAAA,EAAAA,MAAAA,CAAAA,EACtCgB,OADsChB,CAC9BA,cAD8BA,GAAAA,IAAAA,CAAAA;EAARgB,aAAAA,EAAAA,EAErCA,OAFqCA,CAE7BzB,aAF6ByB,EAAAA,CAAAA;EACtBhB,SAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,OAAAA,EAAAA,MAAAA,GAEUkB,cAFVlB,CAEyBiB,UAFzBjB,CAAAA,EAAAA,OACPT,CADOS,EAAAA;IAARgB,QAAAA,CAAAA,EAAAA,MAAAA;EACCzB,CAAAA,CAAAA,EAGrByB,OAHqBzB,CAGbuB,eAHavB,CAAAA;EAARyB,QAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,OAAAA,EAAAA;IACwCC,QAAAA,EAAAA,MAAAA;EAAfC,CAAAA,CAAAA,EAKtCF,OALsCE,CAK9BP,oBAL8BO,CAAAA;EAE9BJ,QAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,OAGAH,CAHAG,EAAAA;IAARE,QAAAA,CAAAA,EAKWG,OALXH,CAKmBZ,YALnBY,EAAAA,MAAAA,CAAAA;EAGQL,CAAAA,CAAAA,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AAAA,IAAAA,EAAAA,MAAAA,CAAAA,EAS/BF,OAT+BE,CASvBb,gBATuBa,CAAAA;EAARF,UAAAA,CAAAA,OAAAA,EAUzBI,MAVyBJ,CAAAA,MAAAA,EAAAA,MAAAA,GAAAA,SAAAA,CAAAA,CAAAA,EAUYA,OAVZA,CAAAA,IAAAA,CAAAA;EACRf,WAAAA,CAAAA,MAAAA,EAAAA,MAAAA,EAAAA,SAAAA,EAAAA,MAAAA,EAAAA,OAAAA,EAUmBJ,kBAVnBI,CAAAA,EAUwCe,OAVxCf,CAAAA,IAAAA,CAAAA;EAA8BC,aAAAA,CAAAA,SAAAA,EAAAA,MAAAA,CAAAA,EAWjCc,OAXiCd,CAAAA,IAAAA,CAAAA;EAARc,YAAAA,CAAAA,OAAAA,EAYrCrB,aAZqCqB,CAAAA,EAYrBA,OAZqBA,CAYbpB,eAZaoB,CAAAA;EAG/CR,aAAAA,CAAAA,MAAAA,EAUUZ,eAVVY,CAAAA,EAU4BQ,OAV5BR,CAUoCV,mBAVpCU,CAAAA;EAARQ,SAAAA,CAAAA,OAAAA,EAWeK,OAXfL,EAAAA,IAAAA,EAAAA,MAAAA,CAAAA,EAWuCA,OAXvCA,CAW+CM,QAX/CN,CAAAA;EAC8Bb,cAAAA,CAAAA,OAAAA,EAWVV,qBAXUU,CAAAA,EAWca,OAXdb,CAWsBT,QAXtBS,CAAAA;EAARa,WAAAA,CAAAA,EAAAA,EAAAA,MAAAA,CAAAA,EAYDA,OAZCA,CAYOtB,QAZPsB,GAAAA,IAAAA,CAAAA;EAC6BI,aAAAA,EAAAA,EAYtCJ,OAZsCI,CAY9B1B,QAZ8B0B,EAAAA,CAAAA"}
1
+ {"version":3,"file":"sandbox-CBkS3tGv.d.ts","names":["ProcessStatus","SandboxCommand","CreateTerminalOptions","Terminal","BackupOptions","DirectoryBackup","MountBucketOptions","RestoreBackupResult","ExecOptions","SandboxProcess","CheckChangesOptions","CheckChangesResult","DeleteFileResult","FileEncoding","FileExistsResult","ListFilesOptions","ListFilesResult","MkdirResult","MoveFileResult","ReadFileResult","ReadFileStreamResult","RenameFileResult","WatchOptions","WriteFileResult","ISandbox","Promise","Uint8Array","ReadableStream","Exclude","Record","Request","Response"],"sources":["../../shared/dist/types/sandbox.d.ts"],"sourcesContent":["import type { ProcessStatus, SandboxCommand } from '../process-types.js';\nimport type { CreateTerminalOptions, Terminal } from '../pty-types.js';\nimport type { BackupOptions, DirectoryBackup, MountBucketOptions, RestoreBackupResult } from './backup-mounts.js';\nimport type { ExecOptions, SandboxProcess } from './core.js';\nimport type { CheckChangesOptions, CheckChangesResult, DeleteFileResult, FileEncoding, FileExistsResult, ListFilesOptions, ListFilesResult, MkdirResult, MoveFileResult, ReadFileResult, ReadFileStreamResult, RenameFileResult, WatchOptions, WriteFileResult } from './filesystem.js';\nexport interface ISandbox {\n exec(command: SandboxCommand, options?: ExecOptions): Promise<SandboxProcess>;\n getProcess(id: string): Promise<SandboxProcess | null>;\n listProcesses(): Promise<ProcessStatus[]>;\n writeFile(path: string, content: string | ReadableStream<Uint8Array>, options?: {\n encoding?: string;\n }): Promise<WriteFileResult>;\n readFile(path: string, options: {\n encoding: 'none';\n }): Promise<ReadFileStreamResult>;\n readFile(path: string, options?: {\n encoding?: Exclude<FileEncoding, 'none'>;\n }): Promise<ReadFileResult>;\n readFileStream(path: string): Promise<ReadableStream<Uint8Array>>;\n watch(path: string, options?: WatchOptions): Promise<ReadableStream<Uint8Array>>;\n checkChanges(path: string, options?: CheckChangesOptions): Promise<CheckChangesResult>;\n mkdir(path: string, options?: {\n recursive?: boolean;\n }): Promise<MkdirResult>;\n deleteFile(path: string): Promise<DeleteFileResult>;\n renameFile(oldPath: string, newPath: string, options?: Record<string, never>): Promise<RenameFileResult>;\n moveFile(sourcePath: string, destinationPath: string, options?: Record<string, never>): Promise<MoveFileResult>;\n listFiles(path: string, options?: ListFilesOptions): Promise<ListFilesResult>;\n exists(path: string): Promise<FileExistsResult>;\n setEnvVars(envVars: Record<string, string | undefined>): Promise<void>;\n mountBucket(bucket: string, mountPath: string, options: MountBucketOptions): Promise<void>;\n unmountBucket(mountPath: string): Promise<void>;\n createBackup(options: BackupOptions): Promise<DirectoryBackup>;\n restoreBackup(backup: DirectoryBackup): Promise<RestoreBackupResult>;\n wsConnect(request: Request, port: number): Promise<Response>;\n createTerminal(options: CreateTerminalOptions): Promise<Terminal>;\n getTerminal(id: string): Promise<Terminal | null>;\n listTerminals(): Promise<Terminal[]>;\n}\n//# sourceMappingURL=sandbox.d.ts.map"],"mappings":";;;;;AAMkBC,UADDuB,QAAAA,CACCvB;EAA0BO,IAAAA,CAAAA,OAAAA,EAA1BP,cAA0BO,EAAAA,OAAAA,CAAAA,EAAAA,WAAAA,CAAAA,EAAciB,OAAdjB,CAAsBC,cAAtBD,CAAAA;EAAsBC,UAAAA,CAAAA,EAAAA,EAAAA,MAAAA,CAAAA,EACtCgB,OADsChB,CAC9BA,cAD8BA,GAAAA,IAAAA,CAAAA;EAARgB,aAAAA,EAAAA,EAErCA,OAFqCA,CAE7BzB,aAF6ByB,EAAAA,CAAAA;EACtBhB,SAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,OAAAA,EAAAA,MAAAA,GAEUkB,cAFVlB,CAEyBiB,UAFzBjB,CAAAA,EAAAA,OACPT,CADOS,EAAAA;IAARgB,QAAAA,CAAAA,EAAAA,MAAAA;EACCzB,CAAAA,CAAAA,EAGrByB,OAHqBzB,CAGbuB,eAHavB,CAAAA;EAARyB,QAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,OAAAA,EAAAA;IACwCC,QAAAA,EAAAA,MAAAA;EAAfC,CAAAA,CAAAA,EAKtCF,OALsCE,CAK9BP,oBAL8BO,CAAAA;EAE9BJ,QAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,OAGAH,CAHAG,EAAAA;IAARE,QAAAA,CAAAA,EAKWG,OALXH,CAKmBZ,YALnBY,EAAAA,MAAAA,CAAAA;EAGQL,CAAA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,MAAAA,CAAAA,IAAAA,EAAAA,MAAAA,CAAAA,EAS/BF,OAT+BE,CASvBb,gBATuBa,CAAAA;EAARF,UAAAA,CAAAA,OAAAA,EAUzBI,MAVyBJ,CAAAA,MAAAA,EAAAA,MAAAA,GAAAA,SAAAA,CAAAA,CAAAA,EAUYA,OAVZA,CAAAA,IAAAA,CAAAA;EACRf,WAAAA,CAAAA,MAAAA,EAAAA,MAAAA,EAAAA,SAAAA,EAAAA,MAAAA,EAAAA,OAAAA,EAUmBJ,kBAVnBI,CAAAA,EAUwCe,OAVxCf,CAAAA,IAAAA,CAAAA;EAA8BC,aAAAA,CAAAA,SAAAA,EAAAA,MAAAA,CAAAA,EAWjCc,OAXiCd,CAAAA,IAAAA,CAAAA;EAARc,YAAAA,CAAAA,OAAAA,EAYrCrB,aAZqCqB,CAAAA,EAYrBA,OAZqBA,CAYbpB,eAZaoB,CAAAA;EAG/CR,aAAAA,CAAAA,MAAAA,EAUUZ,eAVVY,CAAAA,EAU4BQ,OAV5BR,CAUoCV,mBAVpCU,CAAAA;EAARQ,SAAAA,CAAAA,OAAAA,EAWeK,OAXfL,EAAAA,IAAAA,EAAAA,MAAAA,CAAAA,EAWuCA,OAXvCA,CAW+CM,QAX/CN,CAAAA;EAC8Bb,cAAAA,CAAAA,OAAAA,EAWVV,qBAXUU,CAAAA,EAWca,OAXdb,CAWsBT,QAXtBS,CAAAA;EAARa,WAAAA,CAAAA,EAAAA,EAAAA,MAAAA,CAAAA,EAYDA,OAZCA,CAYOtB,QAZPsB,GAAAA,IAAAA,CAAAA;EAC6BI,aAAAA,EAAAA,EAYtCJ,OAZsCI,CAY9B1B,QAZ8B0B,EAAAA,CAAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/sandbox",
3
- "version": "0.13.0-next.776.1",
3
+ "version": "0.13.0-next.797.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cloudflare/sandbox-sdk"
@@ -1 +0,0 @@
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;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AAE,MAAM,EAAE,EAAE,EAAE;CAChE,MAAM,SAAS,EAAE;CACjB,IAAI,IAAI;AACR,QAAO,IAAI,OAAO,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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filesystem-BWAZCZER.d.ts","names":["ProcessExit","ProcessLogCursor","ProcessLogEvent","ProcessStatus","WaitForLogResult","Disposable","ExecOptions","Record","ProcessLogsOptions","AbortSignal","WaitForExitOptions","WaitForLogOptions","ProcessOutput","T","ProcessOutputOptions","ProcessTextOutputOptions","SandboxProcess","Promise","ReadableStream","RegExp","Uint8Array","WaitForPortOptions","PortCheckRequest","PortCheckResponse","PortWatchRequest","PortWatchEvent","PortWatchRPCOptions","PortWatchSubscriptionAPI","SandboxOptions","ProcessExit","ProcessFailure","SandboxCommand","WaitForExitOptions","CreateTerminalOptions","Record","TerminalSnapshot","TerminalOutputCursor","TerminalOutputOptions","AbortSignal","TerminalOutputEvent","Uint8Array","TerminalOutputSubscriptionAPI","ReadableStream","Promise","Terminal","Request","Response","SandboxTerminalsAPI","Omit","PtyClientControlMessage","PtyServerControlMessage","BackupCompressionOptions","BackupOptions","DirectoryBackup","RestoreBackupResult","BucketProvider","BucketCredentials","RemoteMountBucketOptions","LocalMountBucketOptions","R2BindingMountBucketOptions","MountBucketOptions","MkdirResult","WriteFileResult","FileEncoding","ReadFileResult","ReadFileStreamResult","Uint8Array","ReadableStream","DeleteFileResult","RenameFileResult","MoveFileResult","FileExistsResult","FileInfo","ListFilesOptions","ListFilesResult","FileStreamEvent","FileMetadata","FileChunk","WatchOptions","CheckChangesOptions","FileWatchEventType","WatchRequest","CheckChangesRequest","FileWatchSSEEvent","CheckChangesResult","EnvSetResult","PortExposeResult","HealthCheckResult","ShutdownResult"],"sources":["../../shared/dist/types/core.d.ts","../../shared/dist/pty-types.d.ts","../../shared/dist/types/backup-mounts.d.ts","../../shared/dist/types/filesystem.d.ts"],"sourcesContent":["import type { ProcessExit, ProcessLogCursor, ProcessLogEvent, ProcessStatus, WaitForLogResult } from '../process-types.js';\n/**\n * Represents a disposable resource with a cleanup function.\n * Common pattern used by VS Code, xterm.js, RxJS, and others.\n */\nexport interface Disposable {\n dispose(): void;\n}\nexport interface ExecOptions {\n cwd?: string;\n env?: Record<string, string>;\n timeout?: number;\n}\nexport interface ProcessLogsOptions {\n since?: ProcessLogCursor;\n replay?: boolean;\n follow?: boolean;\n signal?: AbortSignal;\n}\nexport interface WaitForExitOptions {\n timeout?: number;\n signal?: AbortSignal;\n}\nexport interface WaitForLogOptions extends WaitForExitOptions {\n stream?: 'stdout' | 'stderr' | 'both';\n}\nexport interface ProcessOutput<T> {\n stdout: T;\n stderr: T;\n exitCode: number;\n signal?: number;\n timedOut: boolean;\n truncated: boolean;\n}\nexport interface ProcessOutputOptions extends WaitForExitOptions {\n maxBytes?: number;\n}\nexport interface ProcessTextOutputOptions extends ProcessOutputOptions {\n encoding: 'utf8';\n}\nexport interface SandboxProcess {\n readonly id: string;\n readonly pid: number;\n readonly exitCode: Promise<number>;\n status(): Promise<ProcessStatus>;\n logs(options?: ProcessLogsOptions): Promise<ReadableStream<ProcessLogEvent>>;\n waitForLog(pattern: string | RegExp, options?: WaitForLogOptions): Promise<WaitForLogResult>;\n waitForExit(options?: WaitForExitOptions): Promise<ProcessExit>;\n output(options: ProcessTextOutputOptions): Promise<ProcessOutput<string>>;\n output(options?: ProcessOutputOptions): Promise<ProcessOutput<Uint8Array>>;\n waitForPort(port: number, options?: WaitForPortOptions): Promise<void>;\n kill(signal?: number): Promise<void>;\n}\n/**\n * Options for waiting for a port to become ready\n */\nexport interface WaitForPortOptions {\n /**\n * Check mode\n * - 'http': Make an HTTP request and check for success status\n * - 'tcp': Just check if TCP connection succeeds (default)\n * @default 'tcp'\n */\n mode?: 'http' | 'tcp';\n /**\n * HTTP path to check (only used when mode is 'http')\n * @default '/'\n */\n path?: string;\n /**\n * Expected HTTP status code or range (only used when mode is 'http')\n * - Single number: exact match (e.g., 200)\n * - Object with min/max: range match (e.g., { min: 200, max: 399 })\n * @default { min: 200, max: 399 }\n */\n status?: number | {\n min: number;\n max: number;\n };\n /**\n * Maximum time to wait in milliseconds\n * @default no timeout\n */\n timeout?: number;\n /**\n * Signal used to cancel waiting locally.\n */\n signal?: AbortSignal;\n /**\n * Interval between checks in milliseconds\n * @default 500\n */\n interval?: number;\n}\n/**\n * Request body for port readiness check endpoint\n */\nexport interface PortCheckRequest {\n port: number;\n mode: 'http' | 'tcp';\n path?: string;\n statusMin?: number;\n statusMax?: number;\n}\n/**\n * Response from port readiness check endpoint\n */\nexport interface PortCheckResponse {\n ready: boolean;\n /** HTTP status code received (only for http mode) */\n statusCode?: number;\n /** Error message if check failed */\n error?: string;\n}\n/**\n * Request body for streaming port watch endpoint\n */\nexport interface PortWatchRequest extends PortCheckRequest {\n /** Process ID to monitor - stream closes if process exits */\n processId?: string;\n /** Internal polling interval in ms (default: 500) */\n interval?: number;\n}\n/**\n * SSE event emitted by port watch stream\n */\nexport type PortWatchEvent = {\n type: 'watching';\n port: number;\n} | {\n type: 'ready';\n port: number;\n statusCode?: number;\n} | {\n type: 'error';\n port: number;\n error: string;\n};\nexport interface PortWatchRPCOptions {\n mode?: 'http' | 'tcp';\n path?: string;\n status?: number | {\n min: number;\n max: number;\n };\n interval?: number;\n}\nexport interface PortWatchSubscriptionAPI {\n stream(): Promise<ReadableStream<PortWatchEvent>>;\n cancel(): Promise<void>;\n [Symbol.dispose](): void;\n}\nexport interface SandboxOptions {\n /**\n * Duration after which the sandbox instance will sleep if no requests are received\n * Can be:\n * - A string like \"30s\", \"3m\", \"5m\", \"1h\" (seconds, minutes, or hours)\n * - A number representing seconds (e.g., 180 for 3 minutes)\n * Default: \"10m\" (10 minutes)\n *\n * Note: Ignored when keepAlive is true\n */\n sleepAfter?: string | number;\n /**\n * Keep the container alive indefinitely by preventing automatic shutdown\n * When true, the container will never auto-timeout and must be explicitly destroyed\n * - Any scenario where activity can't be automatically detected\n *\n * Important: You MUST call sandbox.destroy() when done to avoid resource leaks\n *\n * Default: false\n */\n keepAlive?: boolean;\n /**\n * Normalize sandbox ID to lowercase for preview URL compatibility\n *\n * Required for preview URLs because hostnames are case-insensitive (RFC 3986), which\n * would route requests to a different Durable Object instance with IDs containing uppercase letters.\n *\n * **Important:** Different normalizeId values create different Durable Object instances:\n * - `getSandbox(ns, \"MyProject\")` → DO key: \"MyProject\"\n * - `getSandbox(ns, \"MyProject\", {normalizeId: true})` → DO key: \"myproject\"\n *\n * **Future change:** In a future version, this will default to `true` (automatically lowercase all IDs).\n * IDs with uppercase letters will trigger a warning. To prepare, use lowercase IDs or explicitly\n * pass `normalizeId: true`.\n *\n * @example\n * getSandbox(ns, \"my-project\") // Works with preview URLs (lowercase)\n * getSandbox(ns, \"MyProject\", {normalizeId: true}) // Normalized to \"myproject\"\n *\n * @default false\n */\n normalizeId?: boolean;\n /**\n * Container startup timeout configuration\n *\n * Tune timeouts based on your container's characteristics. SDK defaults (30s instance, 90s ports)\n * work for most use cases. Adjust for heavy containers or fail-fast applications.\n *\n * Can also be configured via environment variables:\n * - SANDBOX_INSTANCE_TIMEOUT_MS\n * - SANDBOX_PORT_TIMEOUT_MS\n * - SANDBOX_POLL_INTERVAL_MS\n *\n * Precedence: options > env vars > SDK defaults\n *\n * @example\n * // Heavy containers (ML models, large apps)\n * getSandbox(ns, id, {\n * containerTimeouts: { portReadyTimeoutMS: 180_000 }\n * })\n *\n * @example\n * // Fail-fast for latency-sensitive apps\n * getSandbox(ns, id, {\n * containerTimeouts: {\n * instanceGetTimeoutMS: 15_000,\n * portReadyTimeoutMS: 30_000\n * }\n * })\n */\n containerTimeouts?: {\n /**\n * Time to wait for container instance provisioning\n * @default 30000 (30s) - or SANDBOX_INSTANCE_TIMEOUT_MS env var\n */\n instanceGetTimeoutMS?: number;\n /**\n * Time to wait for application startup and ports to be ready\n * @default 90000 (90s) - or SANDBOX_PORT_TIMEOUT_MS env var\n */\n portReadyTimeoutMS?: number;\n /**\n * How often to poll for container readiness\n * @default 300 (300ms) - or SANDBOX_POLL_INTERVAL_MS env var\n */\n waitIntervalMS?: number;\n };\n}\n//# sourceMappingURL=core.d.ts.map","import type { ProcessExit, ProcessFailure, SandboxCommand } from './process-types.js';\nimport type { WaitForExitOptions } from './types/core.js';\nexport interface CreateTerminalOptions {\n command: SandboxCommand;\n cwd?: string;\n env?: Record<string, string>;\n cols?: number;\n rows?: number;\n bufferSize?: number;\n}\nexport interface TerminalSnapshot {\n id: string;\n pid?: number;\n command: SandboxCommand;\n cwd?: string;\n status: 'running' | 'exited' | 'error';\n exit?: ProcessExit;\n error?: ProcessFailure;\n}\nexport type TerminalOutputCursor = string;\nexport interface TerminalOutputOptions {\n since?: TerminalOutputCursor;\n replay?: boolean;\n follow?: boolean;\n signal?: AbortSignal;\n}\nexport type TerminalOutputEvent = {\n type: 'data';\n terminalId: string;\n cursor: TerminalOutputCursor;\n timestamp: string;\n data: Uint8Array;\n} | {\n type: 'terminal';\n terminalId: string;\n cursor: TerminalOutputCursor;\n timestamp: string;\n state: 'exited';\n exit: ProcessExit;\n} | {\n type: 'terminal';\n terminalId: string;\n cursor: TerminalOutputCursor;\n timestamp: string;\n state: 'error';\n error: ProcessFailure;\n} | {\n type: 'truncated';\n terminalId: string;\n cursor?: TerminalOutputCursor;\n timestamp: string;\n};\nexport interface TerminalOutputSubscriptionAPI {\n stream(): Promise<ReadableStream<TerminalOutputEvent>>;\n cancel(): Promise<void>;\n [Symbol.dispose](): void;\n}\nexport interface Terminal {\n readonly id: string;\n getSnapshot(): Promise<TerminalSnapshot>;\n write(data: Uint8Array): Promise<void>;\n resize(cols: number, rows: number): Promise<void>;\n output(options?: TerminalOutputOptions): Promise<ReadableStream<TerminalOutputEvent>>;\n waitForExit(options?: WaitForExitOptions): Promise<ProcessExit>;\n interrupt(): Promise<void>;\n terminate(): Promise<void>;\n connect(request: Request, options?: {\n cursor?: TerminalOutputCursor;\n cols?: number;\n rows?: number;\n }): Promise<Response>;\n}\nexport interface SandboxTerminalsAPI {\n create(options: CreateTerminalOptions): Promise<TerminalSnapshot>;\n get(id: string): Promise<TerminalSnapshot | null>;\n list(): Promise<TerminalSnapshot[]>;\n output(id: string, options?: Omit<TerminalOutputOptions, 'signal'>): Promise<TerminalOutputSubscriptionAPI>;\n write(id: string, data: Uint8Array): Promise<void>;\n resize(id: string, cols: number, rows: number): Promise<void>;\n interrupt(id: string): Promise<void>;\n terminate(id: string): Promise<void>;\n hasActive(): Promise<boolean>;\n}\nexport type PtyClientControlMessage = {\n type: 'resize';\n cols: number;\n rows: number;\n} | {\n type: 'interrupt';\n} | {\n type: 'terminate';\n};\nexport type PtyServerControlMessage = {\n type: 'ready';\n cursor?: TerminalOutputCursor;\n} | {\n type: 'chunk';\n cursor: TerminalOutputCursor;\n byteLength: number;\n} | {\n type: 'truncated';\n cursor?: TerminalOutputCursor;\n} | {\n type: 'exit';\n cursor: TerminalOutputCursor;\n exit: ProcessExit;\n} | {\n type: 'error';\n cursor?: TerminalOutputCursor;\n code?: string;\n message: string;\n};\n//# sourceMappingURL=pty-types.d.ts.map","/**\n * Options for creating a directory backup\n */\nexport interface BackupCompressionOptions {\n format?: 'gzip' | 'lz4' | 'zstd';\n threads?: number;\n}\nexport interface BackupOptions {\n /** Directory to back up. Must be absolute and under `/workspace`, `/home`, `/tmp`, `/var/tmp`, or `/app`. */\n dir: string;\n /** Human-readable name for this backup. Optional. */\n name?: string;\n /** Seconds until automatic garbage collection. Default: 259200 (3 days). No upper limit. */\n ttl?: number;\n /**\n * Respect git ignore rules for the backup directory when it is inside a git repository.\n *\n * Default: false.\n * If the directory is not inside a git repository, no git-based exclusions are applied.\n * If git is not installed in the container, a warning is logged and gitignore rules are skipped.\n */\n gitignore?: boolean;\n /**\n * Glob patterns to exclude from the backup.\n * These are passed directly to mksquashfs as wildcard exclude patterns.\n *\n * @example ['node_modules', '*.log', '.cache']\n */\n excludes?: string[];\n /**\n * Use local R2 binding for backup storage instead of presigned URLs.\n * Required for local development where presigned URLs and FUSE are unavailable.\n * When true, the DO resolves BACKUP_BUCKET from its own env as an R2 binding.\n */\n localBucket?: boolean;\n compression?: BackupCompressionOptions;\n /**\n * Use parallel multipart upload to R2 for large archives.\n * Significantly speeds up uploads for archives over 10 MiB.\n * Default: true.\n */\n multipart?: boolean;\n}\n/**\n * Handle representing a stored directory backup.\n * Serializable metadata returned by createBackup().\n * Store it anywhere and later pass it to restoreBackup().\n */\nexport interface DirectoryBackup {\n /** Unique backup identifier */\n readonly id: string;\n /** Directory to restore into. Must be under `/workspace`, `/home`, `/tmp`, `/var/tmp`, or `/app`. */\n readonly dir: string;\n /** Whether this backup was created with local R2 binding mode. */\n readonly localBucket?: boolean;\n}\n/**\n * Result returned from a successful restoreBackup() call\n */\nexport interface RestoreBackupResult {\n success: boolean;\n /** The directory that was restored */\n dir: string;\n /** Backup ID that was restored */\n id: string;\n}\n/**\n * Supported S3-compatible storage providers\n */\nexport type BucketProvider = 'r2' | 's3' | 'gcs';\n/**\n * Credentials for S3-compatible storage\n */\nexport interface BucketCredentials {\n accessKeyId: string;\n secretAccessKey: string;\n}\n/**\n * Options for mounting an S3-compatible bucket via s3fs-FUSE (production)\n */\nexport interface RemoteMountBucketOptions {\n /**\n * S3-compatible endpoint URL\n *\n * Examples:\n * - R2: 'https://abc123.r2.cloudflarestorage.com'\n * - AWS S3: 'https://s3.us-west-2.amazonaws.com'\n * - GCS: 'https://storage.googleapis.com'\n */\n endpoint: string;\n /**\n * Optional provider hint for automatic s3fs flag configuration\n * If not specified, will attempt to detect from endpoint URL.\n *\n * Examples:\n * - 'r2' - Cloudflare R2 (adds nomixupload)\n * - 's3' - Amazon S3 (standard configuration)\n * - 'gcs' - Google Cloud Storage (no special flags needed)\n */\n provider?: BucketProvider;\n /**\n * Explicit credentials (overrides env var auto-detection)\n */\n credentials?: BucketCredentials;\n /**\n * Mount filesystem as read-only\n * Default: false\n */\n readOnly?: boolean;\n /**\n * Advanced: Override or extend s3fs options\n *\n * These will be merged with provider-specific defaults.\n * To override defaults completely, specify all options here.\n *\n * Common options:\n * - 'use_path_request_style' - Use path-style URLs (bucket/path vs bucket.host/path)\n * - 'nomixupload' - Disable mixed multipart uploads (needed for some providers)\n * - 'nomultipart' - Disable all multipart operations\n * - 'sigv2' - Use signature version 2 instead of v4\n * - 'no_check_certificate' - Skip SSL certificate validation (dev/testing only)\n */\n s3fsOptions?: string[];\n /**\n * Optional prefix/subdirectory within the bucket to mount.\n *\n * When specified, only the contents under this prefix are visible at the\n * mount point, scoping the mount to a subdirectory of the bucket.\n *\n * Must start with '/' (e.g., '/workspaces/project123' or '/data/uploads/')\n */\n prefix?: string;\n /**\n * Keep real credentials in the Durable Object; write dummy credentials into\n * the container-side s3fs password file. Outbound s3fs requests are\n * intercepted by the DO, signed with real credentials, and forwarded to the\n * configured endpoint.\n *\n * Default: false (real credentials are written into the container)\n */\n credentialProxy?: boolean;\n}\n/**\n * Options for mounting a local R2 binding via bidirectional sync (local dev)\n *\n * Used during local development with `wrangler dev`. The Durable Object\n * resolves the R2 binding from its own env using the `bucket` parameter\n * and syncs files via polling instead of s3fs-FUSE.\n */\nexport interface LocalMountBucketOptions {\n /**\n * Must be true to indicate local R2 binding mode.\n */\n localBucket: true;\n /**\n * Optional prefix/subdirectory within the bucket to sync.\n *\n * When specified, only the contents under this prefix will be visible\n * at the mount point.\n */\n prefix?: string;\n /**\n * Mount filesystem as read-only\n * Default: false\n */\n readOnly?: boolean;\n}\n/**\n * Options for mounting an R2 binding via credential-less egress interception.\n */\nexport interface R2BindingMountBucketOptions {\n /**\n * Must not be set — distinguishes this variant from RemoteMountBucketOptions.\n */\n endpoint?: never;\n /**\n * Optional prefix/subdirectory within the bucket to mount.\n *\n * When specified, only the contents under this prefix will be visible\n * at the mount point.\n */\n prefix?: string;\n /**\n * Mount filesystem as read-only\n * Default: false\n */\n readOnly?: boolean;\n /**\n * Advanced: Override or extend s3fs options.\n * Provider defaults for R2 are still applied automatically.\n */\n s3fsOptions?: string[];\n}\n/**\n * Options for mounting a bucket — remote (s3fs-FUSE), local (R2 binding sync),\n * or R2 egress (credential-less s3fs via egress interception).\n */\nexport type MountBucketOptions = RemoteMountBucketOptions | LocalMountBucketOptions | R2BindingMountBucketOptions;\n//# sourceMappingURL=backup-mounts.d.ts.map","export interface MkdirResult {\n success: boolean;\n path: string;\n recursive: boolean;\n timestamp: string;\n exitCode?: number;\n}\nexport interface WriteFileResult {\n success: boolean;\n path: string;\n timestamp: string;\n exitCode?: number;\n}\n/**\n * Valid `encoding` values accepted by `readFile` / `writeFile` options.\n *\n * - `'utf-8'` / `'utf8'` — treat content as text.\n * - `'base64'` — treat content as base64-encoded binary.\n * - `'none'` — streaming variant of `readFile`, returns a\n * `ReadableStream<Uint8Array>` of raw bytes (see `ReadFileStreamResult`).\n */\nexport type FileEncoding = 'utf-8' | 'utf8' | 'base64' | 'none';\nexport interface ReadFileResult {\n success: boolean;\n path: string;\n content: string;\n timestamp: string;\n exitCode?: number;\n /**\n * Encoding used for content (utf-8 for text, base64 for binary)\n */\n encoding?: 'utf-8' | 'base64';\n /**\n * Whether the file is detected as binary\n */\n isBinary?: boolean;\n /**\n * MIME type of the file (e.g., 'image/png', 'text/plain')\n */\n mimeType?: string;\n /**\n * File size in bytes\n */\n size?: number;\n}\n/**\n * Result of `readFile()` with `encoding: 'none'`.\n *\n * `content` is a raw binary `ReadableStream<Uint8Array>` delivered directly\n * over the capnp channel — no base64 encoding, no SSE framing, no buffering.\n */\nexport interface ReadFileStreamResult {\n success: true;\n path: string;\n content: ReadableStream<Uint8Array>;\n size: number;\n mimeType: string;\n timestamp: string;\n}\nexport interface DeleteFileResult {\n success: boolean;\n path: string;\n timestamp: string;\n exitCode?: number;\n}\nexport interface RenameFileResult {\n success: boolean;\n path: string;\n newPath: string;\n timestamp: string;\n exitCode?: number;\n}\nexport interface MoveFileResult {\n success: boolean;\n path: string;\n newPath: string;\n timestamp: string;\n exitCode?: number;\n}\nexport interface FileExistsResult {\n success: boolean;\n path: string;\n exists: boolean;\n timestamp: string;\n}\nexport interface FileInfo {\n name: string;\n absolutePath: string;\n relativePath: string;\n type: 'file' | 'directory' | 'symlink' | 'other';\n size: number;\n modifiedAt: string;\n mode: string;\n permissions: {\n readable: boolean;\n writable: boolean;\n executable: boolean;\n };\n}\nexport interface ListFilesOptions {\n recursive?: boolean;\n includeHidden?: boolean;\n}\nexport interface ListFilesResult {\n success: boolean;\n path: string;\n files: FileInfo[];\n count: number;\n timestamp: string;\n exitCode?: number;\n}\n/**\n * SSE events for file streaming\n */\nexport type FileStreamEvent = {\n type: 'metadata';\n mimeType: string;\n size: number;\n isBinary: boolean;\n encoding: 'utf-8' | 'base64';\n} | {\n type: 'chunk';\n data: string;\n} | {\n type: 'complete';\n bytesRead: number;\n} | {\n type: 'error';\n error: string;\n};\n/**\n * File metadata from streaming\n */\nexport interface FileMetadata {\n mimeType: string;\n size: number;\n isBinary: boolean;\n encoding: 'utf-8' | 'base64';\n}\n/**\n * File stream chunk - either string (text) or Uint8Array (binary, auto-decoded)\n */\nexport type FileChunk = string | Uint8Array;\n/**\n * Options for watching a directory.\n *\n * `watch()` resolves only after the watcher is established on the filesystem.\n * The returned SSE stream can be consumed with `parseSSEStream()`.\n */\nexport interface WatchOptions {\n /**\n * Watch subdirectories recursively\n * @default true\n */\n recursive?: boolean;\n /**\n * Glob patterns to include (e.g., '*.ts', '*.js').\n * If not specified, all files are included.\n * Cannot be used together with `exclude`.\n */\n include?: string[];\n /**\n * Glob patterns to exclude (e.g., 'node_modules', '.git').\n * Cannot be used together with `include`.\n * @default ['.git', 'node_modules', '.DS_Store']\n */\n exclude?: string[];\n}\n/**\n * Options for checking whether a path changed while disconnected.\n *\n * Pass the `version` returned from a previous `checkChanges()` call to learn\n * whether the path is unchanged, changed, or needs a full resync because the\n * retained change state was reset. Change state lives only for the current\n * container lifetime and may expire while idle.\n */\nexport interface CheckChangesOptions extends WatchOptions {\n /**\n * Version returned by a previous `checkChanges()` call.\n */\n since?: string;\n}\n/**\n * @internal SSE event types for container communication\n */\nexport type FileWatchEventType = 'create' | 'modify' | 'delete' | 'move_from' | 'move_to' | 'attrib';\n/**\n * @internal Request body for starting a file watch\n */\nexport interface WatchRequest {\n path: string;\n recursive?: boolean;\n events?: FileWatchEventType[];\n include?: string[];\n exclude?: string[];\n}\n/**\n * @internal Request body for checking retained change state.\n */\nexport interface CheckChangesRequest extends WatchRequest {\n since?: string;\n}\n/**\n * SSE events emitted by `sandbox.watch()`.\n */\nexport type FileWatchSSEEvent = {\n type: 'watching';\n path: string;\n watchId: string;\n} | {\n type: 'event';\n eventType: FileWatchEventType;\n path: string;\n isDirectory: boolean;\n timestamp: string;\n} | {\n type: 'error';\n error: string;\n} | {\n type: 'stopped';\n reason: string;\n};\n/**\n * Result returned by `checkChanges()`.\n */\nexport type CheckChangesResult = {\n success: true;\n status: 'unchanged' | 'changed';\n version: string;\n timestamp: string;\n} | {\n success: true;\n status: 'resync';\n reason: 'expired' | 'restarted';\n version: string;\n timestamp: string;\n};\nexport interface EnvSetResult {\n success: boolean;\n timestamp: string;\n}\nexport interface PortExposeResult {\n url: string;\n port: number;\n name?: string;\n}\nexport interface HealthCheckResult {\n success: boolean;\n status: 'healthy' | 'unhealthy';\n timestamp: string;\n}\nexport interface ShutdownResult {\n success: boolean;\n message: string;\n timestamp: string;\n}\n//# sourceMappingURL=filesystem.d.ts.map"],"mappings":";;;;AAkCiBc,UA1BAR,WAAAA,CA0BoB;EAGpBS,GAAAA,CAAAA,EAAAA,MAAAA;EAGAC,GAAAA,CAAAA,EA9BPT,MA8BOS,CAAAA,MAAc,EAAA,MAAA,CAAA;EAGRC,OAAAA,CAAAA,EAAAA,MAAAA;;AACTA,UA/BGT,kBAAAA,CA+BHS;EACKT,KAAAA,CAAAA,EA/BPP,gBA+BOO;EAA4CN,MAAAA,CAAAA,EAAAA,OAAAA;EAAfgB,MAAAA,CAAAA,EAAAA,OAAAA;EAARD,MAAAA,CAAAA,EA5B3BR,WA4B2BQ;;AACWN,UA3BlCD,kBAAAA,CA2BkCC;EAA4BP,OAAAA,CAAAA,EAAAA,MAAAA;EAARa,MAAAA,CAAAA,EAzB1DR,WAyB0DQ;;AAChBjB,UAxBtCW,iBAAAA,SAA0BD,kBAwBYV,CAAAA;EAARiB,MAAAA,CAAAA,EAAAA,QAAAA,GAAAA,QAAAA,GAAAA,MAAAA;;AACQL,UAtBtCA,aAsBsCA,CAAAA,CAAAA,CAAAA,CAAAA;EAARK,MAAAA,EArBnCJ,CAqBmCI;EAC1BH,MAAAA,EArBTD,CAqBSC;EAA6CM,QAAAA,EAAAA,MAAAA;EAAdR,MAAAA,CAAAA,EAAAA,MAAAA;EAARK,QAAAA,EAAAA,OAAAA;EACJI,SAAAA,EAAAA,OAAAA;;AACbJ,UAjBVH,oBAAAA,SAA6BJ,kBAiBnBO,CAAAA;EAAO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