@daytonaio/sdk 0.175.0 → 0.178.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 (91) hide show
  1. package/cjs/CodeInterpreter.d.ts +3 -2
  2. package/cjs/CodeInterpreter.js.map +1 -1
  3. package/cjs/ComputerUse.d.ts +104 -2
  4. package/cjs/ComputerUse.js +851 -763
  5. package/cjs/ComputerUse.js.map +1 -1
  6. package/cjs/Daytona.d.ts +4 -3
  7. package/cjs/Daytona.js +429 -443
  8. package/cjs/Daytona.js.map +1 -1
  9. package/cjs/FileSystem.d.ts +2 -2
  10. package/cjs/FileSystem.js +491 -521
  11. package/cjs/FileSystem.js.map +1 -1
  12. package/cjs/Git.d.ts +2 -1
  13. package/cjs/Git.js +287 -310
  14. package/cjs/Git.js.map +1 -1
  15. package/cjs/LspServer.d.ts +2 -1
  16. package/cjs/LspServer.js +209 -226
  17. package/cjs/LspServer.js.map +1 -1
  18. package/cjs/ObjectStorage.js +170 -166
  19. package/cjs/ObjectStorage.js.map +1 -1
  20. package/cjs/Process.d.ts +4 -3
  21. package/cjs/Process.js +562 -600
  22. package/cjs/Process.js.map +1 -1
  23. package/cjs/PtyHandle.d.ts +2 -2
  24. package/cjs/PtyHandle.js +327 -338
  25. package/cjs/PtyHandle.js.map +1 -1
  26. package/cjs/Sandbox.d.ts +4 -3
  27. package/cjs/Sandbox.js +756 -821
  28. package/cjs/Sandbox.js.map +1 -1
  29. package/cjs/Snapshot.d.ts +3 -2
  30. package/cjs/Snapshot.js +203 -213
  31. package/cjs/Snapshot.js.map +1 -1
  32. package/cjs/Volume.d.ts +2 -1
  33. package/cjs/Volume.js +90 -92
  34. package/cjs/Volume.js.map +1 -1
  35. package/cjs/errors/DaytonaError.d.ts +2 -1
  36. package/cjs/errors/DaytonaError.js.map +1 -1
  37. package/cjs/index.d.ts +2 -2
  38. package/cjs/index.js +2 -1
  39. package/cjs/index.js.map +1 -1
  40. package/cjs/types/CodeInterpreter.d.ts +1 -1
  41. package/cjs/utils/Binary.js +14 -2
  42. package/cjs/utils/Binary.js.map +1 -1
  43. package/cjs/utils/otel.decorator.d.ts +7 -8
  44. package/cjs/utils/otel.decorator.js +24 -30
  45. package/cjs/utils/otel.decorator.js.map +1 -1
  46. package/esm/CodeInterpreter.d.ts +3 -2
  47. package/esm/CodeInterpreter.js.map +1 -1
  48. package/esm/ComputerUse.d.ts +104 -2
  49. package/esm/ComputerUse.js +857 -763
  50. package/esm/ComputerUse.js.map +1 -1
  51. package/esm/Daytona.d.ts +4 -3
  52. package/esm/Daytona.js +431 -444
  53. package/esm/Daytona.js.map +1 -1
  54. package/esm/FileSystem.d.ts +2 -2
  55. package/esm/FileSystem.js +493 -522
  56. package/esm/FileSystem.js.map +1 -1
  57. package/esm/Git.d.ts +2 -1
  58. package/esm/Git.js +289 -311
  59. package/esm/Git.js.map +1 -1
  60. package/esm/LspServer.d.ts +2 -1
  61. package/esm/LspServer.js +211 -227
  62. package/esm/LspServer.js.map +1 -1
  63. package/esm/ObjectStorage.js +172 -167
  64. package/esm/ObjectStorage.js.map +1 -1
  65. package/esm/Process.d.ts +4 -3
  66. package/esm/Process.js +564 -601
  67. package/esm/Process.js.map +1 -1
  68. package/esm/PtyHandle.d.ts +2 -2
  69. package/esm/PtyHandle.js +329 -339
  70. package/esm/PtyHandle.js.map +1 -1
  71. package/esm/Sandbox.d.ts +4 -3
  72. package/esm/Sandbox.js +759 -823
  73. package/esm/Sandbox.js.map +1 -1
  74. package/esm/Snapshot.d.ts +3 -2
  75. package/esm/Snapshot.js +206 -215
  76. package/esm/Snapshot.js.map +1 -1
  77. package/esm/Volume.d.ts +2 -1
  78. package/esm/Volume.js +92 -93
  79. package/esm/Volume.js.map +1 -1
  80. package/esm/errors/DaytonaError.d.ts +2 -1
  81. package/esm/errors/DaytonaError.js.map +1 -1
  82. package/esm/index.d.ts +2 -2
  83. package/esm/index.js +1 -1
  84. package/esm/index.js.map +1 -1
  85. package/esm/types/CodeInterpreter.d.ts +1 -1
  86. package/esm/utils/Binary.js +14 -2
  87. package/esm/utils/Binary.js.map +1 -1
  88. package/esm/utils/otel.decorator.d.ts +7 -8
  89. package/esm/utils/otel.decorator.js +26 -32
  90. package/esm/utils/otel.decorator.js.map +1 -1
  91. package/package.json +3 -3
@@ -2,7 +2,7 @@
2
2
  * Copyright 2025 Daytona Platforms Inc.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import { __decorate, __metadata } from "tslib";
5
+ import { __esDecorate, __runInitializers } from "tslib";
6
6
  import { ListObjectsV2Command, S3Client } from '@aws-sdk/client-s3';
7
7
  import { Upload } from '@aws-sdk/lib-storage';
8
8
  import * as crypto from 'crypto';
@@ -16,180 +16,185 @@ import { WithInstrumentation } from './utils/otel.decorator.js';
16
16
  * @class
17
17
  * @param {ObjectStorageConfig} config - The configuration for the object storage service.
18
18
  */
19
- export class ObjectStorage {
20
- bucketName;
21
- s3Client;
22
- constructor(config) {
23
- this.bucketName = config.bucketName || 'daytona-volume-builds';
24
- this.s3Client = new S3Client({
25
- region: this.extractAwsRegion(config.endpointUrl) || 'us-east-1',
26
- endpoint: config.endpointUrl,
27
- credentials: {
28
- accessKeyId: config.accessKeyId,
29
- secretAccessKey: config.secretAccessKey,
30
- sessionToken: config.sessionToken,
31
- },
32
- forcePathStyle: true,
33
- });
34
- }
35
- /**
36
- * Upload a file or directory to object storage.
37
- *
38
- * @param {string} path - The path to the file or directory to upload.
39
- * @param {string} organizationId - The organization ID to use for the upload.
40
- * @param {string} archiveBasePath - The base path to use for the archive.
41
- * @returns {Promise<string>} The hash of the uploaded file or directory.
42
- */
43
- async upload(path, organizationId, archiveBasePath) {
44
- const fs = await dynamicImport('fs', '"upload" is not supported: ');
45
- if (!fs.existsSync(path)) {
46
- const errMsg = `Path does not exist: ${path}`;
47
- throw new DaytonaNotFoundError(errMsg);
19
+ let ObjectStorage = (() => {
20
+ let _instanceExtraInitializers = [];
21
+ let _upload_decorators;
22
+ return class ObjectStorage {
23
+ static {
24
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
25
+ _upload_decorators = [WithInstrumentation()];
26
+ __esDecorate(this, null, _upload_decorators, { kind: "method", name: "upload", static: false, private: false, access: { has: obj => "upload" in obj, get: obj => obj.upload }, metadata: _metadata }, null, _instanceExtraInitializers);
27
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
48
28
  }
49
- // Compute hash for the path
50
- const pathHash = await this.computeHashForPathMd5(path, archiveBasePath);
51
- // Define the S3 prefix
52
- const prefix = `${organizationId}/${pathHash}/`;
53
- const s3Key = `${prefix}context.tar`;
54
- // Check if it already exists in S3
55
- if (await this.folderExistsInS3(prefix)) {
29
+ bucketName = __runInitializers(this, _instanceExtraInitializers);
30
+ s3Client;
31
+ constructor(config) {
32
+ this.bucketName = config.bucketName || 'daytona-volume-builds';
33
+ this.s3Client = new S3Client({
34
+ region: this.extractAwsRegion(config.endpointUrl) || 'us-east-1',
35
+ endpoint: config.endpointUrl,
36
+ credentials: {
37
+ accessKeyId: config.accessKeyId,
38
+ secretAccessKey: config.secretAccessKey,
39
+ sessionToken: config.sessionToken,
40
+ },
41
+ forcePathStyle: true,
42
+ });
43
+ }
44
+ /**
45
+ * Upload a file or directory to object storage.
46
+ *
47
+ * @param {string} path - The path to the file or directory to upload.
48
+ * @param {string} organizationId - The organization ID to use for the upload.
49
+ * @param {string} archiveBasePath - The base path to use for the archive.
50
+ * @returns {Promise<string>} The hash of the uploaded file or directory.
51
+ */
52
+ async upload(path, organizationId, archiveBasePath) {
53
+ const fs = await dynamicImport('fs', '"upload" is not supported: ');
54
+ if (!fs.existsSync(path)) {
55
+ const errMsg = `Path does not exist: ${path}`;
56
+ throw new DaytonaNotFoundError(errMsg);
57
+ }
58
+ // Compute hash for the path
59
+ const pathHash = await this.computeHashForPathMd5(path, archiveBasePath);
60
+ // Define the S3 prefix
61
+ const prefix = `${organizationId}/${pathHash}/`;
62
+ const s3Key = `${prefix}context.tar`;
63
+ // Check if it already exists in S3
64
+ if (await this.folderExistsInS3(prefix)) {
65
+ return pathHash;
66
+ }
67
+ // Upload to S3
68
+ await this.uploadAsTar(s3Key, path, archiveBasePath);
56
69
  return pathHash;
57
70
  }
58
- // Upload to S3
59
- await this.uploadAsTar(s3Key, path, archiveBasePath);
60
- return pathHash;
61
- }
62
- /**
63
- * Compute a hash for a file or directory.
64
- *
65
- * @param {string} pathStr - The path to the file or directory to hash.
66
- * @param {string} archiveBasePath - The base path to use for the archive.
67
- * @returns {Promise<string>} The hash of the file or directory.
68
- */
69
- async computeHashForPathMd5(pathStr, archiveBasePath) {
70
- const fs = await dynamicImport('fs', '"computeHashForPathMd5" is not supported: ');
71
- const md5Hasher = crypto.createHash('md5');
72
- const absPathStr = pathe.resolve(pathStr);
73
- md5Hasher.update(archiveBasePath);
74
- if (fs.statSync(absPathStr).isFile()) {
75
- // For files, hash the content
76
- await this.hashFile(absPathStr, md5Hasher);
71
+ /**
72
+ * Compute a hash for a file or directory.
73
+ *
74
+ * @param {string} pathStr - The path to the file or directory to hash.
75
+ * @param {string} archiveBasePath - The base path to use for the archive.
76
+ * @returns {Promise<string>} The hash of the file or directory.
77
+ */
78
+ async computeHashForPathMd5(pathStr, archiveBasePath) {
79
+ const fs = await dynamicImport('fs', '"computeHashForPathMd5" is not supported: ');
80
+ const md5Hasher = crypto.createHash('md5');
81
+ const absPathStr = pathe.resolve(pathStr);
82
+ md5Hasher.update(archiveBasePath);
83
+ if (fs.statSync(absPathStr).isFile()) {
84
+ // For files, hash the content
85
+ await this.hashFile(absPathStr, md5Hasher);
86
+ }
87
+ else {
88
+ // For directories, recursively hash all files and their paths
89
+ await this.hashDirectory(absPathStr, pathStr, md5Hasher);
90
+ }
91
+ return md5Hasher.digest('hex');
77
92
  }
78
- else {
79
- // For directories, recursively hash all files and their paths
80
- await this.hashDirectory(absPathStr, pathStr, md5Hasher);
93
+ /**
94
+ * Recursively hash a directory and its contents.
95
+ *
96
+ * @param {string} dirPath - The path to the directory to hash.
97
+ * @param {string} basePath - The base path to use for the hash.
98
+ * @param {crypto.Hash} hasher - The hasher to use for the hash.
99
+ * @returns {Promise<void>} A promise that resolves when the directory has been hashed.
100
+ */
101
+ async hashDirectory(dirPath, basePath, hasher) {
102
+ const fs = await dynamicImport('fs', '"hashDirectory" is not supported: ');
103
+ const entries = fs.readdirSync(dirPath, { withFileTypes: true });
104
+ const hasSubdirs = entries.some((e) => e.isDirectory());
105
+ const hasFiles = entries.some((e) => e.isFile());
106
+ if (!hasSubdirs && !hasFiles) {
107
+ // Empty directory
108
+ const relDir = pathe.relative(basePath, dirPath);
109
+ hasher.update(relDir);
110
+ }
111
+ for (const entry of entries) {
112
+ const fullPath = pathe.join(dirPath, entry.name);
113
+ if (entry.isDirectory()) {
114
+ await this.hashDirectory(fullPath, basePath, hasher);
115
+ }
116
+ else if (entry.isFile()) {
117
+ const relPath = pathe.relative(basePath, fullPath);
118
+ hasher.update(relPath);
119
+ await this.hashFile(fullPath, hasher);
120
+ }
121
+ }
122
+ }
123
+ /**
124
+ * Hash a file.
125
+ *
126
+ * @param {string} filePath - The path to the file to hash.
127
+ * @param {crypto.Hash} hasher - The hasher to use for the hash.
128
+ * @returns {Promise<void>} A promise that resolves when the file has been hashed.
129
+ */
130
+ async hashFile(filePath, hasher) {
131
+ const fs = await dynamicImport('fs', '"hashFile" is not supported: ');
132
+ await new Promise((resolve, reject) => {
133
+ const stream = fs.createReadStream(filePath, { highWaterMark: 8192 });
134
+ stream.on('data', (chunk) => hasher.update(chunk));
135
+ stream.on('end', resolve);
136
+ stream.on('error', reject);
137
+ });
81
138
  }
82
- return md5Hasher.digest('hex');
83
- }
84
- /**
85
- * Recursively hash a directory and its contents.
86
- *
87
- * @param {string} dirPath - The path to the directory to hash.
88
- * @param {string} basePath - The base path to use for the hash.
89
- * @param {crypto.Hash} hasher - The hasher to use for the hash.
90
- * @returns {Promise<void>} A promise that resolves when the directory has been hashed.
91
- */
92
- async hashDirectory(dirPath, basePath, hasher) {
93
- const fs = await dynamicImport('fs', '"hashDirectory" is not supported: ');
94
- const entries = fs.readdirSync(dirPath, { withFileTypes: true });
95
- const hasSubdirs = entries.some((e) => e.isDirectory());
96
- const hasFiles = entries.some((e) => e.isFile());
97
- if (!hasSubdirs && !hasFiles) {
98
- // Empty directory
99
- const relDir = pathe.relative(basePath, dirPath);
100
- hasher.update(relDir);
139
+ /**
140
+ * Check if a prefix (folder) exists in S3.
141
+ *
142
+ * @param {string} prefix - The prefix to check.
143
+ * @returns {Promise<boolean>} True if the prefix exists, false otherwise.
144
+ */
145
+ async folderExistsInS3(prefix) {
146
+ const response = await this.s3Client.send(new ListObjectsV2Command({
147
+ Bucket: this.bucketName,
148
+ Prefix: prefix,
149
+ MaxKeys: 1,
150
+ }));
151
+ return !!response.Contents && response.Contents.length > 0;
101
152
  }
102
- for (const entry of entries) {
103
- const fullPath = pathe.join(dirPath, entry.name);
104
- if (entry.isDirectory()) {
105
- await this.hashDirectory(fullPath, basePath, hasher);
153
+ /**
154
+ * Create a tar archive of the specified path and upload it to S3.
155
+ *
156
+ * @param {string} s3Key - The key to use for the uploaded file.
157
+ * @param {string} sourcePath - The path to the file or directory to upload.
158
+ * @param {string} archiveBasePath - The base path to use for the archive.
159
+ */
160
+ async uploadAsTar(s3Key, sourcePath, archiveBasePath) {
161
+ const importErrorPrefix = '"uploadAsTar" is not supported: ';
162
+ const tar = await dynamicImport('tar', importErrorPrefix);
163
+ const stream = await dynamicImport('stream', importErrorPrefix);
164
+ sourcePath = pathe.resolve(sourcePath);
165
+ const normalizedSourcePath = pathe.normalize(sourcePath);
166
+ const normalizedArchiveBasePath = pathe.normalize(archiveBasePath);
167
+ let basePrefix;
168
+ if (normalizedArchiveBasePath === '.') {
169
+ // When archiveBasePath is empty (normalized to '.'), use the normalizedSourcePath as cwd and the '.' as target
170
+ basePrefix = normalizedSourcePath;
106
171
  }
107
- else if (entry.isFile()) {
108
- const relPath = pathe.relative(basePath, fullPath);
109
- hasher.update(relPath);
110
- await this.hashFile(fullPath, hasher);
172
+ else {
173
+ // Normal case: extract the base prefix by removing archiveBasePath from the end
174
+ basePrefix = normalizedSourcePath.slice(0, normalizedSourcePath.length - normalizedArchiveBasePath.length);
111
175
  }
176
+ const tarStream = tar.create({
177
+ cwd: basePrefix,
178
+ portable: true,
179
+ gzip: false,
180
+ }, [normalizedArchiveBasePath]);
181
+ const pass = new stream.PassThrough();
182
+ tarStream.pipe(pass);
183
+ const uploader = new Upload({
184
+ client: this.s3Client,
185
+ params: {
186
+ Bucket: this.bucketName,
187
+ Key: s3Key,
188
+ Body: pass,
189
+ },
190
+ });
191
+ await uploader.done();
112
192
  }
113
- }
114
- /**
115
- * Hash a file.
116
- *
117
- * @param {string} filePath - The path to the file to hash.
118
- * @param {crypto.Hash} hasher - The hasher to use for the hash.
119
- * @returns {Promise<void>} A promise that resolves when the file has been hashed.
120
- */
121
- async hashFile(filePath, hasher) {
122
- const fs = await dynamicImport('fs', '"hashFile" is not supported: ');
123
- await new Promise((resolve, reject) => {
124
- const stream = fs.createReadStream(filePath, { highWaterMark: 8192 });
125
- stream.on('data', (chunk) => hasher.update(chunk));
126
- stream.on('end', resolve);
127
- stream.on('error', reject);
128
- });
129
- }
130
- /**
131
- * Check if a prefix (folder) exists in S3.
132
- *
133
- * @param {string} prefix - The prefix to check.
134
- * @returns {Promise<boolean>} True if the prefix exists, false otherwise.
135
- */
136
- async folderExistsInS3(prefix) {
137
- const response = await this.s3Client.send(new ListObjectsV2Command({
138
- Bucket: this.bucketName,
139
- Prefix: prefix,
140
- MaxKeys: 1,
141
- }));
142
- return !!response.Contents && response.Contents.length > 0;
143
- }
144
- /**
145
- * Create a tar archive of the specified path and upload it to S3.
146
- *
147
- * @param {string} s3Key - The key to use for the uploaded file.
148
- * @param {string} sourcePath - The path to the file or directory to upload.
149
- * @param {string} archiveBasePath - The base path to use for the archive.
150
- */
151
- async uploadAsTar(s3Key, sourcePath, archiveBasePath) {
152
- const importErrorPrefix = '"uploadAsTar" is not supported: ';
153
- const tar = await dynamicImport('tar', importErrorPrefix);
154
- const stream = await dynamicImport('stream', importErrorPrefix);
155
- sourcePath = pathe.resolve(sourcePath);
156
- const normalizedSourcePath = pathe.normalize(sourcePath);
157
- const normalizedArchiveBasePath = pathe.normalize(archiveBasePath);
158
- let basePrefix;
159
- if (normalizedArchiveBasePath === '.') {
160
- // When archiveBasePath is empty (normalized to '.'), use the normalizedSourcePath as cwd and the '.' as target
161
- basePrefix = normalizedSourcePath;
193
+ extractAwsRegion(endpoint) {
194
+ const match = endpoint.match(/s3[.-]([a-z0-9-]+)\.amazonaws\.com/);
195
+ return match?.[1];
162
196
  }
163
- else {
164
- // Normal case: extract the base prefix by removing archiveBasePath from the end
165
- basePrefix = normalizedSourcePath.slice(0, normalizedSourcePath.length - normalizedArchiveBasePath.length);
166
- }
167
- const tarStream = tar.create({
168
- cwd: basePrefix,
169
- portable: true,
170
- gzip: false,
171
- }, [normalizedArchiveBasePath]);
172
- const pass = new stream.PassThrough();
173
- tarStream.pipe(pass);
174
- const uploader = new Upload({
175
- client: this.s3Client,
176
- params: {
177
- Bucket: this.bucketName,
178
- Key: s3Key,
179
- Body: pass,
180
- },
181
- });
182
- await uploader.done();
183
- }
184
- extractAwsRegion(endpoint) {
185
- const match = endpoint.match(/s3[.-]([a-z0-9-]+)\.amazonaws\.com/);
186
- return match?.[1];
187
- }
188
- }
189
- __decorate([
190
- WithInstrumentation(),
191
- __metadata("design:type", Function),
192
- __metadata("design:paramtypes", [String, String, String]),
193
- __metadata("design:returntype", Promise)
194
- ], ObjectStorage.prototype, "upload", null);
197
+ };
198
+ })();
199
+ export { ObjectStorage };
195
200
  //# sourceMappingURL=ObjectStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectStorage.js","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/ObjectStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;;A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C,oCAAoC,CAAC,CAAA;YAClE,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;QACnB,CAAC;;;SA3MU,aAAa"}
package/esm/Process.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { Configuration, ProcessApi, Command, Session, SessionExecuteRequest, SessionExecuteResponse as ApiSessionExecuteResponse, PtySessionInfo } from '@daytona/toolbox-api-client';
2
- import { ExecuteResponse } from './types/ExecuteResponse.js';
1
+ import { Configuration, ProcessApi } from '@daytona/toolbox-api-client';
2
+ import type { Command, Session, SessionExecuteRequest, SessionExecuteResponse as ApiSessionExecuteResponse, PtySessionInfo } from '@daytona/toolbox-api-client';
3
+ import type { ExecuteResponse } from './types/ExecuteResponse.js';
3
4
  import { PtyHandle } from './PtyHandle.js';
4
- import { PtyCreateOptions, PtyConnectOptions } from './types/Pty.js';
5
+ import type { PtyCreateOptions, PtyConnectOptions } from './types/Pty.js';
5
6
  export declare const STDOUT_PREFIX_BYTES: Uint8Array<ArrayBuffer>;
6
7
  export declare const STDERR_PREFIX_BYTES: Uint8Array<ArrayBuffer>;
7
8
  export declare const MAX_PREFIX_LEN: number;