@daytonaio/sdk 0.200.1 → 0.201.0

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 (50) hide show
  1. package/cjs/Daytona.js +2 -2
  2. package/cjs/Daytona.js.map +1 -1
  3. package/cjs/FileSystem.d.ts +5 -1
  4. package/cjs/FileSystem.js +1 -1
  5. package/cjs/FileSystem.js.map +1 -1
  6. package/cjs/ObjectStorage.d.ts +2 -1
  7. package/cjs/ObjectStorage.js +1 -5
  8. package/cjs/ObjectStorage.js.map +1 -1
  9. package/cjs/Sandbox.d.ts +53 -0
  10. package/cjs/Sandbox.js +72 -0
  11. package/cjs/Sandbox.js.map +1 -1
  12. package/cjs/Snapshot.js +1 -0
  13. package/cjs/Snapshot.js.map +1 -1
  14. package/cjs/errors/DaytonaError.d.ts +119 -141
  15. package/cjs/errors/DaytonaError.js +225 -163
  16. package/cjs/errors/DaytonaError.js.map +1 -1
  17. package/cjs/index.d.ts +1 -1
  18. package/cjs/index.js +40 -6
  19. package/cjs/index.js.map +1 -1
  20. package/cjs/utils/FileTransfer.js +5 -2
  21. package/cjs/utils/FileTransfer.js.map +1 -1
  22. package/cjs/utils/fileUrlSigning.d.ts +4 -0
  23. package/cjs/utils/fileUrlSigning.js +47 -0
  24. package/cjs/utils/fileUrlSigning.js.map +1 -0
  25. package/esm/Daytona.js +2 -2
  26. package/esm/Daytona.js.map +1 -1
  27. package/esm/FileSystem.d.ts +5 -1
  28. package/esm/FileSystem.js +1 -1
  29. package/esm/FileSystem.js.map +1 -1
  30. package/esm/ObjectStorage.d.ts +2 -1
  31. package/esm/ObjectStorage.js +1 -5
  32. package/esm/ObjectStorage.js.map +1 -1
  33. package/esm/Sandbox.d.ts +53 -0
  34. package/esm/Sandbox.js +72 -0
  35. package/esm/Sandbox.js.map +1 -1
  36. package/esm/Snapshot.js +1 -0
  37. package/esm/Snapshot.js.map +1 -1
  38. package/esm/errors/DaytonaError.d.ts +119 -141
  39. package/esm/errors/DaytonaError.js +194 -157
  40. package/esm/errors/DaytonaError.js.map +1 -1
  41. package/esm/index.d.ts +1 -1
  42. package/esm/index.js +11 -1
  43. package/esm/index.js.map +1 -1
  44. package/esm/utils/FileTransfer.js +5 -2
  45. package/esm/utils/FileTransfer.js.map +1 -1
  46. package/esm/utils/Import.js +5 -3
  47. package/esm/utils/fileUrlSigning.d.ts +4 -0
  48. package/esm/utils/fileUrlSigning.js +42 -0
  49. package/esm/utils/fileUrlSigning.js.map +1 -0
  50. package/package.json +15 -13
package/cjs/Snapshot.js CHANGED
@@ -230,6 +230,7 @@ let SnapshotService = (() => {
230
230
  secretAccessKey: pushAccessCreds.secret,
231
231
  sessionToken: pushAccessCreds.sessionToken,
232
232
  bucketName: pushAccessCreds.bucket,
233
+ region: pushAccessCreds.region,
233
234
  });
234
235
  const contextHashes = [];
235
236
  for (const context of image.contextList) {
@@ -1 +1 @@
1
- {"version":3,"file":"Snapshot.js","sourceRoot":"","sources":["../../../../sdk-typescript/src/Snapshot.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,oDAAgH;AAEhH,wDAAoD;AAGpD,2CAAyD;AACzD,2CAA8C;AAC9C,2DAA4D;AAwD5D;;;;GAIG;IACU,eAAe;;;;;;;;;iBAAf,eAAe;;;gCAqBzB,IAAA,oCAAmB,GAAE;+BAuBrB,IAAA,oCAAmB,GAAE;kCAmBrB,IAAA,oCAAmB,GAAE;kCAkBrB,IAAA,oCAAmB,GAAE;oCAkHrB,IAAA,oCAAmB,GAAE;sDAYrB,IAAA,oCAAmB,GAAE;YACtB,0NAAa,mBAAmB,2DA0B/B;YApND,uKAAM,IAAI,6DAQT;YAeD,oKAAM,GAAG,6DAGR;YAgBD,6KAAM,MAAM,6DAEX;YAgBD,6KAAa,MAAM,6DAyGlB;YASD,mLAAM,QAAQ,6DAEb;;YAtMU,yDAAe,CAAA;;QAEhB,YAAY,GAFX,2DAAe;QAGhB,YAAY;QACZ,gBAAgB;QAChB,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,UAAU;gBACvC,WAAW,EAAE,eAAe,CAAC,SAAS;gBACtC,eAAe,EAAE,eAAe,CAAC,MAAM;gBACvC,YAAY,EAAE,eAAe,CAAC,YAAY;gBAC1C,UAAU,EAAE,eAAe,CAAC,MAAM;gBAClC,MAAM,EAAE,eAAe,CAAC,MAAM;aAC/B,CAAC,CAAA;YAEF,MAAM,aAAa,GAAG,EAAE,CAAA;YACxB,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;gBACxC,MAAM,WAAW,GAAG,MAAM,aAAa,CAAC,MAAM,CAC5C,OAAO,CAAC,UAAU,EAClB,eAAe,CAAC,cAAc,EAC9B,OAAO,CAAC,WAAW,CACpB,CAAA;gBACD,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;YACjC,CAAC;YAED,OAAO,aAAa,CAAA;QACtB,CAAC;;;AA3OU,0CAAe"}
@@ -5,172 +5,150 @@ import { AxiosHeaders } from 'axios';
5
5
  import type { AxiosError } from 'axios';
6
6
  export type ResponseHeaders = InstanceType<typeof AxiosHeaders>;
7
7
  /**
8
- * Base error for Daytona SDK.
9
- *
10
- * @example
11
- * ```ts
12
- * try {
13
- * await daytona.get('missing-sandbox')
14
- * } catch (error) {
15
- * if (error instanceof DaytonaError) {
16
- * console.log(error.statusCode)
17
- * console.log(error.errorCode)
18
- * console.log(error.message)
19
- * }
20
- * }
21
- * ```
8
+ * Wire-format `source` identifiers set by the translation layer when a
9
+ * Daytona service stamps them on the wire envelope. `source = undefined`
10
+ * means the response did not carry a structured envelope (treat as opaque).
11
+ */
12
+ export declare const SOURCE_API = "DAYTONA_API";
13
+ export declare const SOURCE_DAEMON = "DAYTONA_DAEMON";
14
+ export declare const SOURCE_PROXY = "DAYTONA_PROXY";
15
+ /**
16
+ * Base error for Daytona SDK. `statusCode` and `code` are populated only
17
+ * for errors translated from a server response. `source` is `undefined`
18
+ * unless the caller (or the translation layer) sets it.
22
19
  */
23
20
  export declare class DaytonaError extends Error {
24
- /** HTTP status code if available */
25
21
  statusCode?: number;
26
- /** Machine-readable error code if available */
27
- errorCode?: string;
28
- /** Response headers if available */
22
+ code?: string;
23
+ readonly source?: string;
29
24
  headers?: ResponseHeaders;
30
- constructor(message: string, statusCode?: number, headers?: ResponseHeaders, errorCode?: string);
25
+ constructor(message: string, statusCode?: number, headers?: ResponseHeaders, code?: string, source?: string);
26
+ /**
27
+ * @deprecated Use {@link DaytonaError.code} instead. Kept so existing
28
+ * `err.errorCode` reads keep returning the machine-readable code.
29
+ * @returns the machine-readable error code, or `undefined` when the
30
+ * response did not carry one (same as {@link DaytonaError.code})
31
+ */
32
+ get errorCode(): string | undefined;
31
33
  }
32
- /**
33
- * Error thrown when a resource is not found (HTTP 404).
34
- *
35
- * @example
36
- * ```ts
37
- * try {
38
- * await sandbox.fs.downloadFile('/workspace/missing.txt')
39
- * } catch (error) {
40
- * if (error instanceof DaytonaNotFoundError) {
41
- * console.log(error.statusCode)
42
- * }
43
- * }
44
- * ```
45
- */
34
+ /** The request was malformed or invalid (HTTP 400). */
35
+ export declare class DaytonaBadRequestError extends DaytonaError {
36
+ }
37
+ /** Authentication failed — missing or invalid credentials (HTTP 401). */
38
+ export declare class DaytonaAuthenticationError extends DaytonaError {
39
+ }
40
+ /** The authenticated caller lacks permission for the operation (HTTP 403). */
41
+ export declare class DaytonaForbiddenError extends DaytonaError {
42
+ }
43
+ /** The requested resource does not exist (HTTP 404). */
46
44
  export declare class DaytonaNotFoundError extends DaytonaError {
47
45
  }
48
- /**
49
- * Error thrown when rate limit is exceeded.
50
- *
51
- * @example
52
- * ```ts
53
- * try {
54
- * for await (const sandbox of daytona.list()) {
55
- * console.log(sandbox.id)
56
- * }
57
- * } catch (error) {
58
- * if (error instanceof DaytonaRateLimitError) {
59
- * console.log(error.errorCode)
60
- * }
61
- * }
62
- * ```
63
- */
46
+ /** The operation timed out (HTTP 408, or 504 when a gateway timed out). */
47
+ export declare class DaytonaTimeoutError extends DaytonaError {
48
+ }
49
+ /** The request conflicts with the current state of the resource (HTTP 409). */
50
+ export declare class DaytonaConflictError extends DaytonaError {
51
+ }
52
+ /** The resource existed but is permanently gone (HTTP 410). */
53
+ export declare class DaytonaGoneError extends DaytonaError {
54
+ }
55
+ /** The request was well-formed but semantically invalid (HTTP 422). */
56
+ export declare class DaytonaUnprocessableEntityError extends DaytonaError {
57
+ }
58
+ /** The caller exceeded a rate limit (HTTP 429). */
64
59
  export declare class DaytonaRateLimitError extends DaytonaError {
65
60
  }
66
- /**
67
- * Error thrown when authentication fails (HTTP 401).
68
- *
69
- * @example
70
- * ```ts
71
- * try {
72
- * for await (const sandbox of daytona.list()) {
73
- * console.log(sandbox.id)
74
- * }
75
- * } catch (error) {
76
- * if (error instanceof DaytonaAuthenticationError) {
77
- * console.log(error.statusCode)
78
- * }
79
- * }
80
- * ```
81
- */
82
- export declare class DaytonaAuthenticationError extends DaytonaError {
61
+ /** A Daytona service failed unexpectedly (HTTP 500). */
62
+ export declare class DaytonaInternalServerError extends DaytonaError {
83
63
  }
84
- /**
85
- * Error thrown when the request is forbidden (HTTP 403).
86
- *
87
- * @example
88
- * ```ts
89
- * try {
90
- * await daytona.get('sandbox-without-access')
91
- * } catch (error) {
92
- * if (error instanceof DaytonaAuthorizationError) {
93
- * console.log(error.message)
94
- * }
95
- * }
96
- * ```
97
- */
98
- export declare class DaytonaAuthorizationError extends DaytonaError {
64
+ /** An upstream gateway returned an invalid response (HTTP 502). */
65
+ export declare class DaytonaBadGatewayError extends DaytonaError {
99
66
  }
100
- /**
101
- * Error thrown when a resource conflict occurs (HTTP 409).
102
- *
103
- * @example
104
- * ```ts
105
- * try {
106
- * await daytona.create({ name: 'existing-sandbox' })
107
- * } catch (error) {
108
- * if (error instanceof DaytonaConflictError) {
109
- * console.log(error.errorCode)
110
- * }
111
- * }
112
- * ```
113
- */
114
- export declare class DaytonaConflictError extends DaytonaError {
67
+ /** The service is temporarily unable to handle the request (HTTP 503). */
68
+ export declare class DaytonaServiceUnavailableError extends DaytonaError {
115
69
  }
116
70
  /**
117
- * Error thrown when input validation fails (HTTP 400 or client-side validation).
118
- *
119
- * @example
120
- * ```ts
121
- * try {
122
- * Image.debianSlim('3.8' as never)
123
- * } catch (error) {
124
- * if (error instanceof DaytonaValidationError) {
125
- * console.log(error.message)
126
- * }
127
- * }
128
- * ```
71
+ * @deprecated Use {@link DaytonaBadRequestError} instead. Re-exported so
72
+ * existing `catch (err) { if (err instanceof DaytonaValidationError) ... }`
73
+ * blocks keep working.
129
74
  */
130
- export declare class DaytonaValidationError extends DaytonaError {
75
+ export declare class DaytonaValidationError extends DaytonaBadRequestError {
131
76
  }
132
77
  /**
133
- * Error thrown when a timeout occurs.
134
- *
135
- * @example
136
- * ```ts
137
- * try {
138
- * await sandbox.waitUntilStarted(1)
139
- * } catch (error) {
140
- * if (error instanceof DaytonaTimeoutError) {
141
- * console.log(error.message)
142
- * }
143
- * }
144
- * ```
78
+ * @deprecated Use {@link DaytonaForbiddenError} instead.
145
79
  */
146
- export declare class DaytonaTimeoutError extends DaytonaError {
80
+ export declare class DaytonaAuthorizationError extends DaytonaForbiddenError {
147
81
  }
148
- /**
149
- * Error thrown when a network connection fails.
150
- *
151
- * @example
152
- * ```ts
153
- * try {
154
- * await ptyHandle.waitForConnection()
155
- * } catch (error) {
156
- * if (error instanceof DaytonaConnectionError) {
157
- * console.log(error.message)
158
- * }
159
- * }
160
- * ```
161
- */
82
+ /** Network connection failure (can't connect or mid-request drop). */
162
83
  export declare class DaytonaConnectionError extends DaytonaError {
163
84
  }
164
- /**
165
- * Maps an HTTP status code to the corresponding Daytona error class.
166
- */
85
+ /** Transport-layer timeout (connect / read). Subclass of DaytonaConnectionError. */
86
+ export declare class DaytonaConnectionTimeoutError extends DaytonaConnectionError {
87
+ }
88
+ /** Git authentication against the remote failed (code `GIT_AUTH_FAILED`). */
89
+ export declare class DaytonaGitAuthFailedError extends DaytonaAuthenticationError {
90
+ }
91
+ /** The git remote repository was not found (code `GIT_REPO_NOT_FOUND`). */
92
+ export declare class DaytonaGitRepoNotFoundError extends DaytonaNotFoundError {
93
+ }
94
+ /** The git branch does not exist (code `GIT_BRANCH_NOT_FOUND`). */
95
+ export declare class DaytonaGitBranchNotFoundError extends DaytonaNotFoundError {
96
+ }
97
+ /** The git branch already exists (code `GIT_BRANCH_EXISTS`). */
98
+ export declare class DaytonaGitBranchExistsError extends DaytonaConflictError {
99
+ }
100
+ /** The git push was rejected by the remote (code `GIT_PUSH_REJECTED`). */
101
+ export declare class DaytonaGitPushRejectedError extends DaytonaConflictError {
102
+ }
103
+ /** The operation requires a clean worktree (code `GIT_DIRTY_WORKTREE`). */
104
+ export declare class DaytonaGitDirtyWorktreeError extends DaytonaConflictError {
105
+ }
106
+ /** A git merge produced conflicts (code `GIT_MERGE_CONFLICT`). */
107
+ export declare class DaytonaGitMergeConflictError extends DaytonaConflictError {
108
+ }
109
+ /** The file does not exist in the sandbox (code `FILE_NOT_FOUND`). */
110
+ export declare class DaytonaFileNotFoundError extends DaytonaNotFoundError {
111
+ }
112
+ /** Access to the sandbox file was denied (code `FILE_ACCESS_DENIED`). */
113
+ export declare class DaytonaFileAccessDeniedError extends DaytonaForbiddenError {
114
+ }
115
+ /** The LSP server must be initialized first (code `LSP_SERVER_NOT_INITIALIZED`). */
116
+ export declare class DaytonaLspServerNotInitializedError extends DaytonaBadRequestError {
117
+ }
118
+ /** Command execution exceeded its timeout (code `PROCESS_EXECUTION_TIMEOUT`). */
119
+ export declare class DaytonaProcessExecutionTimeoutError extends DaytonaTimeoutError {
120
+ }
121
+ /** The sandbox process does not exist (code `PROCESS_NOT_FOUND`). */
122
+ export declare class DaytonaProcessNotFoundError extends DaytonaNotFoundError {
123
+ }
124
+ /** The session has already ended (code `SESSION_ENDED`). */
125
+ export declare class DaytonaSessionEndedError extends DaytonaGoneError {
126
+ }
127
+ /** The session command already finished (code `COMMAND_ALREADY_COMPLETED`). */
128
+ export declare class DaytonaCommandAlreadyCompletedError extends DaytonaGoneError {
129
+ }
130
+ /** The accessibility service is unavailable (code `A11Y_UNAVAILABLE`). */
131
+ export declare class DaytonaA11yUnavailableError extends DaytonaServiceUnavailableError {
132
+ }
133
+ /** A screen recording is still active (code `RECORDING_STILL_ACTIVE`). */
134
+ export declare class DaytonaRecordingStillActiveError extends DaytonaConflictError {
135
+ }
136
+ /** ffmpeg is not available for recording (code `RECORDING_FFMPEG_NOT_FOUND`). */
137
+ export declare class DaytonaRecordingFfmpegNotFoundError extends DaytonaServiceUnavailableError {
138
+ }
139
+ /** Maps an HTTP status code to the corresponding Daytona error class. */
167
140
  export declare function errorClassFromStatusCode(statusCode?: number): typeof DaytonaError;
168
141
  /**
169
142
  * Creates the appropriate Daytona error subclass from structured error metadata.
143
+ *
144
+ * Resolution order: (source, code) override -> HTTP status code -> DaytonaError.
170
145
  */
171
- export declare function createDaytonaError(message: string, statusCode?: number, headers?: ResponseHeaders, errorCode?: string): DaytonaError;
146
+ export declare function createDaytonaError(message: string, statusCode?: number, headers?: ResponseHeaders, code?: string, source?: string): DaytonaError;
172
147
  /**
173
- * Creates the appropriate Daytona error subclass from an Axios error.
148
+ * Creates the appropriate Daytona error subclass from an Axios error. Maps
149
+ * client-side timeouts to DaytonaConnectionTimeoutError, networking failures
150
+ * (no response received) to DaytonaConnectionError, and HTTP responses to
151
+ * the most specific subclass via `createDaytonaError`.
174
152
  */
175
153
  export declare function createAxiosDaytonaError(error: AxiosError): DaytonaError;
176
154
  //# sourceMappingURL=DaytonaError.d.ts.map