@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
@@ -19,181 +19,185 @@ const otel_decorator_1 = require("./utils/otel.decorator");
19
19
  * @class
20
20
  * @param {ObjectStorageConfig} config - The configuration for the object storage service.
21
21
  */
22
- class ObjectStorage {
23
- bucketName;
24
- s3Client;
25
- constructor(config) {
26
- this.bucketName = config.bucketName || 'daytona-volume-builds';
27
- this.s3Client = new client_s3_1.S3Client({
28
- region: this.extractAwsRegion(config.endpointUrl) || 'us-east-1',
29
- endpoint: config.endpointUrl,
30
- credentials: {
31
- accessKeyId: config.accessKeyId,
32
- secretAccessKey: config.secretAccessKey,
33
- sessionToken: config.sessionToken,
34
- },
35
- forcePathStyle: true,
36
- });
37
- }
38
- /**
39
- * Upload a file or directory to object storage.
40
- *
41
- * @param {string} path - The path to the file or directory to upload.
42
- * @param {string} organizationId - The organization ID to use for the upload.
43
- * @param {string} archiveBasePath - The base path to use for the archive.
44
- * @returns {Promise<string>} The hash of the uploaded file or directory.
45
- */
46
- async upload(path, organizationId, archiveBasePath) {
47
- const fs = await (0, Import_1.dynamicImport)('fs', '"upload" is not supported: ');
48
- if (!fs.existsSync(path)) {
49
- const errMsg = `Path does not exist: ${path}`;
50
- throw new DaytonaError_1.DaytonaNotFoundError(errMsg);
22
+ let ObjectStorage = (() => {
23
+ let _instanceExtraInitializers = [];
24
+ let _upload_decorators;
25
+ return class ObjectStorage {
26
+ static {
27
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
28
+ _upload_decorators = [(0, otel_decorator_1.WithInstrumentation)()];
29
+ tslib_1.__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);
30
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
51
31
  }
52
- // Compute hash for the path
53
- const pathHash = await this.computeHashForPathMd5(path, archiveBasePath);
54
- // Define the S3 prefix
55
- const prefix = `${organizationId}/${pathHash}/`;
56
- const s3Key = `${prefix}context.tar`;
57
- // Check if it already exists in S3
58
- if (await this.folderExistsInS3(prefix)) {
32
+ bucketName = tslib_1.__runInitializers(this, _instanceExtraInitializers);
33
+ s3Client;
34
+ constructor(config) {
35
+ this.bucketName = config.bucketName || 'daytona-volume-builds';
36
+ this.s3Client = new client_s3_1.S3Client({
37
+ region: this.extractAwsRegion(config.endpointUrl) || 'us-east-1',
38
+ endpoint: config.endpointUrl,
39
+ credentials: {
40
+ accessKeyId: config.accessKeyId,
41
+ secretAccessKey: config.secretAccessKey,
42
+ sessionToken: config.sessionToken,
43
+ },
44
+ forcePathStyle: true,
45
+ });
46
+ }
47
+ /**
48
+ * Upload a file or directory to object storage.
49
+ *
50
+ * @param {string} path - The path to the file or directory to upload.
51
+ * @param {string} organizationId - The organization ID to use for the upload.
52
+ * @param {string} archiveBasePath - The base path to use for the archive.
53
+ * @returns {Promise<string>} The hash of the uploaded file or directory.
54
+ */
55
+ async upload(path, organizationId, archiveBasePath) {
56
+ const fs = await (0, Import_1.dynamicImport)('fs', '"upload" is not supported: ');
57
+ if (!fs.existsSync(path)) {
58
+ const errMsg = `Path does not exist: ${path}`;
59
+ throw new DaytonaError_1.DaytonaNotFoundError(errMsg);
60
+ }
61
+ // Compute hash for the path
62
+ const pathHash = await this.computeHashForPathMd5(path, archiveBasePath);
63
+ // Define the S3 prefix
64
+ const prefix = `${organizationId}/${pathHash}/`;
65
+ const s3Key = `${prefix}context.tar`;
66
+ // Check if it already exists in S3
67
+ if (await this.folderExistsInS3(prefix)) {
68
+ return pathHash;
69
+ }
70
+ // Upload to S3
71
+ await this.uploadAsTar(s3Key, path, archiveBasePath);
59
72
  return pathHash;
60
73
  }
61
- // Upload to S3
62
- await this.uploadAsTar(s3Key, path, archiveBasePath);
63
- return pathHash;
64
- }
65
- /**
66
- * Compute a hash for a file or directory.
67
- *
68
- * @param {string} pathStr - The path to the file or directory to hash.
69
- * @param {string} archiveBasePath - The base path to use for the archive.
70
- * @returns {Promise<string>} The hash of the file or directory.
71
- */
72
- async computeHashForPathMd5(pathStr, archiveBasePath) {
73
- const fs = await (0, Import_1.dynamicImport)('fs', '"computeHashForPathMd5" is not supported: ');
74
- const md5Hasher = crypto.createHash('md5');
75
- const absPathStr = pathe.resolve(pathStr);
76
- md5Hasher.update(archiveBasePath);
77
- if (fs.statSync(absPathStr).isFile()) {
78
- // For files, hash the content
79
- await this.hashFile(absPathStr, md5Hasher);
74
+ /**
75
+ * Compute a hash for a file or directory.
76
+ *
77
+ * @param {string} pathStr - The path to the file or directory to hash.
78
+ * @param {string} archiveBasePath - The base path to use for the archive.
79
+ * @returns {Promise<string>} The hash of the file or directory.
80
+ */
81
+ async computeHashForPathMd5(pathStr, archiveBasePath) {
82
+ const fs = await (0, Import_1.dynamicImport)('fs', '"computeHashForPathMd5" is not supported: ');
83
+ const md5Hasher = crypto.createHash('md5');
84
+ const absPathStr = pathe.resolve(pathStr);
85
+ md5Hasher.update(archiveBasePath);
86
+ if (fs.statSync(absPathStr).isFile()) {
87
+ // For files, hash the content
88
+ await this.hashFile(absPathStr, md5Hasher);
89
+ }
90
+ else {
91
+ // For directories, recursively hash all files and their paths
92
+ await this.hashDirectory(absPathStr, pathStr, md5Hasher);
93
+ }
94
+ return md5Hasher.digest('hex');
80
95
  }
81
- else {
82
- // For directories, recursively hash all files and their paths
83
- await this.hashDirectory(absPathStr, pathStr, md5Hasher);
96
+ /**
97
+ * Recursively hash a directory and its contents.
98
+ *
99
+ * @param {string} dirPath - The path to the directory to hash.
100
+ * @param {string} basePath - The base path to use for the hash.
101
+ * @param {crypto.Hash} hasher - The hasher to use for the hash.
102
+ * @returns {Promise<void>} A promise that resolves when the directory has been hashed.
103
+ */
104
+ async hashDirectory(dirPath, basePath, hasher) {
105
+ const fs = await (0, Import_1.dynamicImport)('fs', '"hashDirectory" is not supported: ');
106
+ const entries = fs.readdirSync(dirPath, { withFileTypes: true });
107
+ const hasSubdirs = entries.some((e) => e.isDirectory());
108
+ const hasFiles = entries.some((e) => e.isFile());
109
+ if (!hasSubdirs && !hasFiles) {
110
+ // Empty directory
111
+ const relDir = pathe.relative(basePath, dirPath);
112
+ hasher.update(relDir);
113
+ }
114
+ for (const entry of entries) {
115
+ const fullPath = pathe.join(dirPath, entry.name);
116
+ if (entry.isDirectory()) {
117
+ await this.hashDirectory(fullPath, basePath, hasher);
118
+ }
119
+ else if (entry.isFile()) {
120
+ const relPath = pathe.relative(basePath, fullPath);
121
+ hasher.update(relPath);
122
+ await this.hashFile(fullPath, hasher);
123
+ }
124
+ }
125
+ }
126
+ /**
127
+ * Hash a file.
128
+ *
129
+ * @param {string} filePath - The path to the file to hash.
130
+ * @param {crypto.Hash} hasher - The hasher to use for the hash.
131
+ * @returns {Promise<void>} A promise that resolves when the file has been hashed.
132
+ */
133
+ async hashFile(filePath, hasher) {
134
+ const fs = await (0, Import_1.dynamicImport)('fs', '"hashFile" is not supported: ');
135
+ await new Promise((resolve, reject) => {
136
+ const stream = fs.createReadStream(filePath, { highWaterMark: 8192 });
137
+ stream.on('data', (chunk) => hasher.update(chunk));
138
+ stream.on('end', resolve);
139
+ stream.on('error', reject);
140
+ });
84
141
  }
85
- return md5Hasher.digest('hex');
86
- }
87
- /**
88
- * Recursively hash a directory and its contents.
89
- *
90
- * @param {string} dirPath - The path to the directory to hash.
91
- * @param {string} basePath - The base path to use for the hash.
92
- * @param {crypto.Hash} hasher - The hasher to use for the hash.
93
- * @returns {Promise<void>} A promise that resolves when the directory has been hashed.
94
- */
95
- async hashDirectory(dirPath, basePath, hasher) {
96
- const fs = await (0, Import_1.dynamicImport)('fs', '"hashDirectory" is not supported: ');
97
- const entries = fs.readdirSync(dirPath, { withFileTypes: true });
98
- const hasSubdirs = entries.some((e) => e.isDirectory());
99
- const hasFiles = entries.some((e) => e.isFile());
100
- if (!hasSubdirs && !hasFiles) {
101
- // Empty directory
102
- const relDir = pathe.relative(basePath, dirPath);
103
- hasher.update(relDir);
142
+ /**
143
+ * Check if a prefix (folder) exists in S3.
144
+ *
145
+ * @param {string} prefix - The prefix to check.
146
+ * @returns {Promise<boolean>} True if the prefix exists, false otherwise.
147
+ */
148
+ async folderExistsInS3(prefix) {
149
+ const response = await this.s3Client.send(new client_s3_1.ListObjectsV2Command({
150
+ Bucket: this.bucketName,
151
+ Prefix: prefix,
152
+ MaxKeys: 1,
153
+ }));
154
+ return !!response.Contents && response.Contents.length > 0;
104
155
  }
105
- for (const entry of entries) {
106
- const fullPath = pathe.join(dirPath, entry.name);
107
- if (entry.isDirectory()) {
108
- await this.hashDirectory(fullPath, basePath, hasher);
156
+ /**
157
+ * Create a tar archive of the specified path and upload it to S3.
158
+ *
159
+ * @param {string} s3Key - The key to use for the uploaded file.
160
+ * @param {string} sourcePath - The path to the file or directory to upload.
161
+ * @param {string} archiveBasePath - The base path to use for the archive.
162
+ */
163
+ async uploadAsTar(s3Key, sourcePath, archiveBasePath) {
164
+ const importErrorPrefix = '"uploadAsTar" is not supported: ';
165
+ const tar = await (0, Import_1.dynamicImport)('tar', importErrorPrefix);
166
+ const stream = await (0, Import_1.dynamicImport)('stream', importErrorPrefix);
167
+ sourcePath = pathe.resolve(sourcePath);
168
+ const normalizedSourcePath = pathe.normalize(sourcePath);
169
+ const normalizedArchiveBasePath = pathe.normalize(archiveBasePath);
170
+ let basePrefix;
171
+ if (normalizedArchiveBasePath === '.') {
172
+ // When archiveBasePath is empty (normalized to '.'), use the normalizedSourcePath as cwd and the '.' as target
173
+ basePrefix = normalizedSourcePath;
109
174
  }
110
- else if (entry.isFile()) {
111
- const relPath = pathe.relative(basePath, fullPath);
112
- hasher.update(relPath);
113
- await this.hashFile(fullPath, hasher);
175
+ else {
176
+ // Normal case: extract the base prefix by removing archiveBasePath from the end
177
+ basePrefix = normalizedSourcePath.slice(0, normalizedSourcePath.length - normalizedArchiveBasePath.length);
114
178
  }
179
+ const tarStream = tar.create({
180
+ cwd: basePrefix,
181
+ portable: true,
182
+ gzip: false,
183
+ }, [normalizedArchiveBasePath]);
184
+ const pass = new stream.PassThrough();
185
+ tarStream.pipe(pass);
186
+ const uploader = new lib_storage_1.Upload({
187
+ client: this.s3Client,
188
+ params: {
189
+ Bucket: this.bucketName,
190
+ Key: s3Key,
191
+ Body: pass,
192
+ },
193
+ });
194
+ await uploader.done();
115
195
  }
116
- }
117
- /**
118
- * Hash a file.
119
- *
120
- * @param {string} filePath - The path to the file to hash.
121
- * @param {crypto.Hash} hasher - The hasher to use for the hash.
122
- * @returns {Promise<void>} A promise that resolves when the file has been hashed.
123
- */
124
- async hashFile(filePath, hasher) {
125
- const fs = await (0, Import_1.dynamicImport)('fs', '"hashFile" is not supported: ');
126
- await new Promise((resolve, reject) => {
127
- const stream = fs.createReadStream(filePath, { highWaterMark: 8192 });
128
- stream.on('data', (chunk) => hasher.update(chunk));
129
- stream.on('end', resolve);
130
- stream.on('error', reject);
131
- });
132
- }
133
- /**
134
- * Check if a prefix (folder) exists in S3.
135
- *
136
- * @param {string} prefix - The prefix to check.
137
- * @returns {Promise<boolean>} True if the prefix exists, false otherwise.
138
- */
139
- async folderExistsInS3(prefix) {
140
- const response = await this.s3Client.send(new client_s3_1.ListObjectsV2Command({
141
- Bucket: this.bucketName,
142
- Prefix: prefix,
143
- MaxKeys: 1,
144
- }));
145
- return !!response.Contents && response.Contents.length > 0;
146
- }
147
- /**
148
- * Create a tar archive of the specified path and upload it to S3.
149
- *
150
- * @param {string} s3Key - The key to use for the uploaded file.
151
- * @param {string} sourcePath - The path to the file or directory to upload.
152
- * @param {string} archiveBasePath - The base path to use for the archive.
153
- */
154
- async uploadAsTar(s3Key, sourcePath, archiveBasePath) {
155
- const importErrorPrefix = '"uploadAsTar" is not supported: ';
156
- const tar = await (0, Import_1.dynamicImport)('tar', importErrorPrefix);
157
- const stream = await (0, Import_1.dynamicImport)('stream', importErrorPrefix);
158
- sourcePath = pathe.resolve(sourcePath);
159
- const normalizedSourcePath = pathe.normalize(sourcePath);
160
- const normalizedArchiveBasePath = pathe.normalize(archiveBasePath);
161
- let basePrefix;
162
- if (normalizedArchiveBasePath === '.') {
163
- // When archiveBasePath is empty (normalized to '.'), use the normalizedSourcePath as cwd and the '.' as target
164
- basePrefix = normalizedSourcePath;
196
+ extractAwsRegion(endpoint) {
197
+ const match = endpoint.match(/s3[.-]([a-z0-9-]+)\.amazonaws\.com/);
198
+ return match?.[1];
165
199
  }
166
- else {
167
- // Normal case: extract the base prefix by removing archiveBasePath from the end
168
- basePrefix = normalizedSourcePath.slice(0, normalizedSourcePath.length - normalizedArchiveBasePath.length);
169
- }
170
- const tarStream = tar.create({
171
- cwd: basePrefix,
172
- portable: true,
173
- gzip: false,
174
- }, [normalizedArchiveBasePath]);
175
- const pass = new stream.PassThrough();
176
- tarStream.pipe(pass);
177
- const uploader = new lib_storage_1.Upload({
178
- client: this.s3Client,
179
- params: {
180
- Bucket: this.bucketName,
181
- Key: s3Key,
182
- Body: pass,
183
- },
184
- });
185
- await uploader.done();
186
- }
187
- extractAwsRegion(endpoint) {
188
- const match = endpoint.match(/s3[.-]([a-z0-9-]+)\.amazonaws\.com/);
189
- return match?.[1];
190
- }
191
- }
200
+ };
201
+ })();
192
202
  exports.ObjectStorage = ObjectStorage;
193
- tslib_1.__decorate([
194
- (0, otel_decorator_1.WithInstrumentation)(),
195
- tslib_1.__metadata("design:type", Function),
196
- tslib_1.__metadata("design:paramtypes", [String, String, String]),
197
- tslib_1.__metadata("design:returntype", Promise)
198
- ], ObjectStorage.prototype, "upload", null);
199
203
  //# sourceMappingURL=ObjectStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectStorage.js","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/ObjectStorage.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,yBAAyB,KAAK,GAAG,EAAE,CAAC;gBACtC,+GAA+G;gBAC/G,UAAU,GAAG,oBAAoB,CAAA;YACnC,CAAC;iBAAM,CAAC;gBACN,gFAAgF;gBAChF,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAE,oBAAoB,CAAC,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAA;YAC5G,CAAC;YAED,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAC1B;gBACE,GAAG,EAAE,UAAU;gBACf,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,KAAK;aACZ,EACD,CAAC,yBAAyB,CAAC,CAC5B,CAAA;YAED,MAAM,IAAI,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,CAAA;YACrC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAEpB,MAAM,QAAQ,GAAG,IAAI,oBAAM,CAAC;gBAC1B,MAAM,EAAE,IAAI,CAAC,QAAQ;gBACrB,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,UAAU;oBACvB,GAAG,EAAE,KAAK;oBACV,IAAI,EAAE,IAAI;iBACX;aACF,CAAC,CAAA;YAEF,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QACvB,CAAC;QAEO,gBAAgB,CAAC,QAAgB;YACvC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;YAClE,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;QACnB,CAAC;;;AA3MU,sCAAa"}
package/cjs/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';
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';
3
4
  import { PtyHandle } from './PtyHandle';
4
- import { PtyCreateOptions, PtyConnectOptions } from './types/Pty';
5
+ import type { PtyCreateOptions, PtyConnectOptions } from './types/Pty';
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;