@daytonaio/sdk 0.108.0-rc1 → 0.108.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daytonaio/sdk",
3
- "version": "0.108.0-rc1",
3
+ "version": "0.108.0",
4
4
  "description": "TypeScript SDK for Daytona",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -35,8 +35,7 @@
35
35
  "pathe": "^2.0.3",
36
36
  "shell-quote": "^1.8.2",
37
37
  "tar": "^6.2.0",
38
- "@daytonaio/api-client": "0.108.0-rc1",
39
- "@daytonaio/toolbox-api-client": "0.108.0-rc1"
38
+ "@daytonaio/api-client": "0.108.0"
40
39
  },
41
40
  "packageManager": "yarn@4.6.0",
42
41
  "type": "commonjs"
@@ -1,4 +1,4 @@
1
- import { ComputerUseApi, MousePositionResponse, MouseClickResponse, MouseDragResponse, ScreenshotResponse, DisplayInfoResponse, WindowsResponse, ComputerUseStartResponse, ComputerUseStopResponse, ComputerUseStatusResponse, ProcessStatusResponse, ProcessRestartResponse, ProcessLogsResponse, ProcessErrorsResponse } from '@daytonaio/toolbox-api-client';
1
+ import { ToolboxApi, MousePosition, MouseMoveResponse, MouseClickResponse, MouseDragResponse, ScreenshotResponse, RegionScreenshotResponse, CompressedScreenshotResponse, DisplayInfoResponse, WindowsResponse, ComputerUseStartResponse, ComputerUseStopResponse, ComputerUseStatusResponse, ProcessStatusResponse, ProcessRestartResponse, ProcessLogsResponse, ProcessErrorsResponse } from '@daytonaio/api-client';
2
2
  /**
3
3
  * Interface for region coordinates used in screenshot operations
4
4
  */
@@ -21,12 +21,13 @@ export interface ScreenshotOptions {
21
21
  * Mouse operations for computer use functionality
22
22
  */
23
23
  export declare class Mouse {
24
- private readonly apiClient;
25
- constructor(apiClient: ComputerUseApi);
24
+ private readonly sandboxId;
25
+ private readonly toolboxApi;
26
+ constructor(sandboxId: string, toolboxApi: ToolboxApi);
26
27
  /**
27
28
  * Gets the current mouse cursor position
28
29
  *
29
- * @returns {Promise<MousePositionResponse>} Current mouse position with x and y coordinates
30
+ * @returns {Promise<MousePosition>} Current mouse position with x and y coordinates
30
31
  *
31
32
  * @example
32
33
  * ```typescript
@@ -34,13 +35,13 @@ export declare class Mouse {
34
35
  * console.log(`Mouse is at: ${position.x}, ${position.y}`);
35
36
  * ```
36
37
  */
37
- getPosition(): Promise<MousePositionResponse>;
38
+ getPosition(): Promise<MousePosition>;
38
39
  /**
39
40
  * Moves the mouse cursor to the specified coordinates
40
41
  *
41
42
  * @param {number} x - The x coordinate to move to
42
43
  * @param {number} y - The y coordinate to move to
43
- * @returns {Promise<MousePositionResponse>} Position after move
44
+ * @returns {Promise<MouseMoveResponse>} Move operation result
44
45
  *
45
46
  * @example
46
47
  * ```typescript
@@ -48,7 +49,7 @@ export declare class Mouse {
48
49
  * console.log(`Mouse moved to: ${result.x}, ${result.y}`);
49
50
  * ```
50
51
  */
51
- move(x: number, y: number): Promise<MousePositionResponse>;
52
+ move(x: number, y: number): Promise<MouseMoveResponse>;
52
53
  /**
53
54
  * Clicks the mouse at the specified coordinates
54
55
  *
@@ -112,8 +113,9 @@ export declare class Mouse {
112
113
  * Keyboard operations for computer use functionality
113
114
  */
114
115
  export declare class Keyboard {
115
- private readonly apiClient;
116
- constructor(apiClient: ComputerUseApi);
116
+ private readonly sandboxId;
117
+ private readonly toolboxApi;
118
+ constructor(sandboxId: string, toolboxApi: ToolboxApi);
117
119
  /**
118
120
  * Types the specified text
119
121
  *
@@ -214,8 +216,9 @@ export declare class Keyboard {
214
216
  * Screenshot operations for computer use functionality
215
217
  */
216
218
  export declare class Screenshot {
217
- private readonly apiClient;
218
- constructor(apiClient: ComputerUseApi);
219
+ private readonly sandboxId;
220
+ private readonly toolboxApi;
221
+ constructor(sandboxId: string, toolboxApi: ToolboxApi);
219
222
  /**
220
223
  * Takes a screenshot of the entire screen
221
224
  *
@@ -246,7 +249,7 @@ export declare class Screenshot {
246
249
  * console.log(`Captured region: ${screenshot.region.width}x${screenshot.region.height}`);
247
250
  * ```
248
251
  */
249
- takeRegion(region: ScreenshotRegion, showCursor?: boolean): Promise<ScreenshotResponse>;
252
+ takeRegion(region: ScreenshotRegion, showCursor?: boolean): Promise<RegionScreenshotResponse>;
250
253
  /**
251
254
  * Takes a compressed screenshot of the entire screen
252
255
  *
@@ -272,7 +275,7 @@ export declare class Screenshot {
272
275
  * });
273
276
  * ```
274
277
  */
275
- takeCompressed(options?: ScreenshotOptions): Promise<ScreenshotResponse>;
278
+ takeCompressed(options?: ScreenshotOptions): Promise<CompressedScreenshotResponse>;
276
279
  /**
277
280
  * Takes a compressed screenshot of a specific region
278
281
  *
@@ -291,14 +294,15 @@ export declare class Screenshot {
291
294
  * console.log(`Compressed size: ${screenshot.size_bytes} bytes`);
292
295
  * ```
293
296
  */
294
- takeCompressedRegion(region: ScreenshotRegion, options?: ScreenshotOptions): Promise<ScreenshotResponse>;
297
+ takeCompressedRegion(region: ScreenshotRegion, options?: ScreenshotOptions): Promise<CompressedScreenshotResponse>;
295
298
  }
296
299
  /**
297
300
  * Display operations for computer use functionality
298
301
  */
299
302
  export declare class Display {
300
- private readonly apiClient;
301
- constructor(apiClient: ComputerUseApi);
303
+ private readonly sandboxId;
304
+ private readonly toolboxApi;
305
+ constructor(sandboxId: string, toolboxApi: ToolboxApi);
302
306
  /**
303
307
  * Gets information about the displays
304
308
  *
@@ -345,12 +349,13 @@ export declare class Display {
345
349
  * @class
346
350
  */
347
351
  export declare class ComputerUse {
348
- private readonly apiClient;
352
+ private readonly sandboxId;
353
+ private readonly toolboxApi;
349
354
  readonly mouse: Mouse;
350
355
  readonly keyboard: Keyboard;
351
356
  readonly screenshot: Screenshot;
352
357
  readonly display: Display;
353
- constructor(apiClient: ComputerUseApi);
358
+ constructor(sandboxId: string, toolboxApi: ToolboxApi);
354
359
  /**
355
360
  * Starts all computer use processes (Xvfb, xfce4, x11vnc, novnc)
356
361
  *
@@ -9,14 +9,16 @@ exports.ComputerUse = exports.Display = exports.Screenshot = exports.Keyboard =
9
9
  * Mouse operations for computer use functionality
10
10
  */
11
11
  class Mouse {
12
- apiClient;
13
- constructor(apiClient) {
14
- this.apiClient = apiClient;
12
+ sandboxId;
13
+ toolboxApi;
14
+ constructor(sandboxId, toolboxApi) {
15
+ this.sandboxId = sandboxId;
16
+ this.toolboxApi = toolboxApi;
15
17
  }
16
18
  /**
17
19
  * Gets the current mouse cursor position
18
20
  *
19
- * @returns {Promise<MousePositionResponse>} Current mouse position with x and y coordinates
21
+ * @returns {Promise<MousePosition>} Current mouse position with x and y coordinates
20
22
  *
21
23
  * @example
22
24
  * ```typescript
@@ -25,7 +27,7 @@ class Mouse {
25
27
  * ```
26
28
  */
27
29
  async getPosition() {
28
- const response = await this.apiClient.getMousePosition();
30
+ const response = await this.toolboxApi.getMousePosition(this.sandboxId);
29
31
  return response.data;
30
32
  }
31
33
  /**
@@ -33,7 +35,7 @@ class Mouse {
33
35
  *
34
36
  * @param {number} x - The x coordinate to move to
35
37
  * @param {number} y - The y coordinate to move to
36
- * @returns {Promise<MousePositionResponse>} Position after move
38
+ * @returns {Promise<MouseMoveResponse>} Move operation result
37
39
  *
38
40
  * @example
39
41
  * ```typescript
@@ -43,7 +45,7 @@ class Mouse {
43
45
  */
44
46
  async move(x, y) {
45
47
  const request = { x, y };
46
- const response = await this.apiClient.moveMouse(request);
48
+ const response = await this.toolboxApi.moveMouse(this.sandboxId, request);
47
49
  return response.data;
48
50
  }
49
51
  /**
@@ -69,7 +71,7 @@ class Mouse {
69
71
  */
70
72
  async click(x, y, button = 'left', double = false) {
71
73
  const request = { x, y, button, double };
72
- const response = await this.apiClient.click(request);
74
+ const response = await this.toolboxApi.clickMouse(this.sandboxId, request);
73
75
  return response.data;
74
76
  }
75
77
  /**
@@ -90,7 +92,7 @@ class Mouse {
90
92
  */
91
93
  async drag(startX, startY, endX, endY, button = 'left') {
92
94
  const request = { startX, startY, endX, endY, button };
93
- const response = await this.apiClient.drag(request);
95
+ const response = await this.toolboxApi.dragMouse(this.sandboxId, request);
94
96
  return response.data;
95
97
  }
96
98
  /**
@@ -113,7 +115,7 @@ class Mouse {
113
115
  */
114
116
  async scroll(x, y, direction, amount = 1) {
115
117
  const request = { x, y, direction, amount };
116
- const response = await this.apiClient.scroll(request);
118
+ const response = await this.toolboxApi.scrollMouse(this.sandboxId, request);
117
119
  return response.data.success;
118
120
  }
119
121
  }
@@ -122,9 +124,11 @@ exports.Mouse = Mouse;
122
124
  * Keyboard operations for computer use functionality
123
125
  */
124
126
  class Keyboard {
125
- apiClient;
126
- constructor(apiClient) {
127
- this.apiClient = apiClient;
127
+ sandboxId;
128
+ toolboxApi;
129
+ constructor(sandboxId, toolboxApi) {
130
+ this.sandboxId = sandboxId;
131
+ this.toolboxApi = toolboxApi;
128
132
  }
129
133
  /**
130
134
  * Types the specified text
@@ -153,7 +157,7 @@ class Keyboard {
153
157
  */
154
158
  async type(text, delay) {
155
159
  const request = { text, delay };
156
- await this.apiClient.typeText(request);
160
+ await this.toolboxApi.typeText(this.sandboxId, request);
157
161
  }
158
162
  /**
159
163
  * Presses a key with optional modifiers
@@ -191,7 +195,7 @@ class Keyboard {
191
195
  */
192
196
  async press(key, modifiers = []) {
193
197
  const request = { key, modifiers };
194
- await this.apiClient.pressKey(request);
198
+ await this.toolboxApi.pressKey(this.sandboxId, request);
195
199
  }
196
200
  /**
197
201
  * Presses a hotkey combination
@@ -228,7 +232,7 @@ class Keyboard {
228
232
  */
229
233
  async hotkey(keys) {
230
234
  const request = { keys };
231
- await this.apiClient.pressHotkey(request);
235
+ await this.toolboxApi.pressHotkey(this.sandboxId, request);
232
236
  }
233
237
  }
234
238
  exports.Keyboard = Keyboard;
@@ -236,9 +240,11 @@ exports.Keyboard = Keyboard;
236
240
  * Screenshot operations for computer use functionality
237
241
  */
238
242
  class Screenshot {
239
- apiClient;
240
- constructor(apiClient) {
241
- this.apiClient = apiClient;
243
+ sandboxId;
244
+ toolboxApi;
245
+ constructor(sandboxId, toolboxApi) {
246
+ this.sandboxId = sandboxId;
247
+ this.toolboxApi = toolboxApi;
242
248
  }
243
249
  /**
244
250
  * Takes a screenshot of the entire screen
@@ -256,7 +262,7 @@ class Screenshot {
256
262
  * ```
257
263
  */
258
264
  async takeFullScreen(showCursor = false) {
259
- const response = await this.apiClient.takeScreenshot(showCursor);
265
+ const response = await this.toolboxApi.takeScreenshot(this.sandboxId, undefined, showCursor);
260
266
  return response.data;
261
267
  }
262
268
  /**
@@ -274,7 +280,7 @@ class Screenshot {
274
280
  * ```
275
281
  */
276
282
  async takeRegion(region, showCursor = false) {
277
- const response = await this.apiClient.takeRegionScreenshot(region.height, region.width, region.y, region.x, showCursor);
283
+ const response = await this.toolboxApi.takeRegionScreenshot(this.sandboxId, region.height, region.width, region.y, region.x, undefined, showCursor);
278
284
  return response.data;
279
285
  }
280
286
  /**
@@ -303,7 +309,7 @@ class Screenshot {
303
309
  * ```
304
310
  */
305
311
  async takeCompressed(options = {}) {
306
- const response = await this.apiClient.takeCompressedScreenshot(options.showCursor, options.format, options.quality, options.scale);
312
+ const response = await this.toolboxApi.takeCompressedScreenshot(this.sandboxId, undefined, options.scale, options.quality, options.format, options.showCursor);
307
313
  return response.data;
308
314
  }
309
315
  /**
@@ -325,7 +331,7 @@ class Screenshot {
325
331
  * ```
326
332
  */
327
333
  async takeCompressedRegion(region, options = {}) {
328
- const response = await this.apiClient.takeCompressedRegionScreenshot(region.x, region.y, region.width, region.height, options.showCursor, options.format, options.quality, options.scale);
334
+ const response = await this.toolboxApi.takeCompressedRegionScreenshot(this.sandboxId, region.height, region.width, region.y, region.x, undefined, options.scale, options.quality, options.format, options.showCursor);
329
335
  return response.data;
330
336
  }
331
337
  }
@@ -334,9 +340,11 @@ exports.Screenshot = Screenshot;
334
340
  * Display operations for computer use functionality
335
341
  */
336
342
  class Display {
337
- apiClient;
338
- constructor(apiClient) {
339
- this.apiClient = apiClient;
343
+ sandboxId;
344
+ toolboxApi;
345
+ constructor(sandboxId, toolboxApi) {
346
+ this.sandboxId = sandboxId;
347
+ this.toolboxApi = toolboxApi;
340
348
  }
341
349
  /**
342
350
  * Gets information about the displays
@@ -354,7 +362,7 @@ class Display {
354
362
  * ```
355
363
  */
356
364
  async getInfo() {
357
- const response = await this.apiClient.getDisplayInfo();
365
+ const response = await this.toolboxApi.getDisplayInfo(this.sandboxId);
358
366
  return response.data;
359
367
  }
360
368
  /**
@@ -372,7 +380,7 @@ class Display {
372
380
  * ```
373
381
  */
374
382
  async getWindows() {
375
- const response = await this.apiClient.getWindows();
383
+ const response = await this.toolboxApi.getWindows(this.sandboxId);
376
384
  return response.data;
377
385
  }
378
386
  }
@@ -391,17 +399,19 @@ exports.Display = Display;
391
399
  * @class
392
400
  */
393
401
  class ComputerUse {
394
- apiClient;
402
+ sandboxId;
403
+ toolboxApi;
395
404
  mouse;
396
405
  keyboard;
397
406
  screenshot;
398
407
  display;
399
- constructor(apiClient) {
400
- this.apiClient = apiClient;
401
- this.mouse = new Mouse(apiClient);
402
- this.keyboard = new Keyboard(apiClient);
403
- this.screenshot = new Screenshot(apiClient);
404
- this.display = new Display(apiClient);
408
+ constructor(sandboxId, toolboxApi) {
409
+ this.sandboxId = sandboxId;
410
+ this.toolboxApi = toolboxApi;
411
+ this.mouse = new Mouse(sandboxId, toolboxApi);
412
+ this.keyboard = new Keyboard(sandboxId, toolboxApi);
413
+ this.screenshot = new Screenshot(sandboxId, toolboxApi);
414
+ this.display = new Display(sandboxId, toolboxApi);
405
415
  }
406
416
  /**
407
417
  * Starts all computer use processes (Xvfb, xfce4, x11vnc, novnc)
@@ -415,7 +425,7 @@ class ComputerUse {
415
425
  * ```
416
426
  */
417
427
  async start() {
418
- const response = await this.apiClient.startComputerUse();
428
+ const response = await this.toolboxApi.startComputerUse(this.sandboxId);
419
429
  return response.data;
420
430
  }
421
431
  /**
@@ -430,7 +440,7 @@ class ComputerUse {
430
440
  * ```
431
441
  */
432
442
  async stop() {
433
- const response = await this.apiClient.stopComputerUse();
443
+ const response = await this.toolboxApi.stopComputerUse(this.sandboxId);
434
444
  return response.data;
435
445
  }
436
446
  /**
@@ -445,7 +455,7 @@ class ComputerUse {
445
455
  * ```
446
456
  */
447
457
  async getStatus() {
448
- const response = await this.apiClient.getComputerUseStatus();
458
+ const response = await this.toolboxApi.getComputerUseStatus(this.sandboxId);
449
459
  return response.data;
450
460
  }
451
461
  /**
@@ -461,7 +471,7 @@ class ComputerUse {
461
471
  * ```
462
472
  */
463
473
  async getProcessStatus(processName) {
464
- const response = await this.apiClient.getProcessStatus(processName);
474
+ const response = await this.toolboxApi.getProcessStatus(processName, this.sandboxId);
465
475
  return response.data;
466
476
  }
467
477
  /**
@@ -477,7 +487,7 @@ class ComputerUse {
477
487
  * ```
478
488
  */
479
489
  async restartProcess(processName) {
480
- const response = await this.apiClient.restartProcess(processName);
490
+ const response = await this.toolboxApi.restartProcess(processName, this.sandboxId);
481
491
  return response.data;
482
492
  }
483
493
  /**
@@ -493,7 +503,7 @@ class ComputerUse {
493
503
  * ```
494
504
  */
495
505
  async getProcessLogs(processName) {
496
- const response = await this.apiClient.getProcessLogs(processName);
506
+ const response = await this.toolboxApi.getProcessLogs(processName, this.sandboxId);
497
507
  return response.data;
498
508
  }
499
509
  /**
@@ -509,7 +519,7 @@ class ComputerUse {
509
519
  * ```
510
520
  */
511
521
  async getProcessErrors(processName) {
512
- const response = await this.apiClient.getProcessErrors(processName);
522
+ const response = await this.toolboxApi.getProcessErrors(processName, this.sandboxId);
513
523
  return response.data;
514
524
  }
515
525
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ComputerUse.js","sourceRoot":"","sources":["../../../../libs/sdk-typescript/src/ComputerUse.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8CH;;GAEG;AACH,MAAa,KAAK;IACa;IAA7B,YAA6B,SAAyB;QAAzB,cAAS,GAAT,SAAS,CAAgB;IAAG,CAAC;IAE1D;;;;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AAS,CAAC,CAAA;QAClF,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,cAAc,CAAC,WAAmB;QAC7C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;QAClF,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,gBAAgB,CAAC,WAAmB;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;QACpF,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAnID,kCAmIC"}
package/src/Daytona.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SandboxVolume } from '@daytonaio/api-client';
2
2
  import { Image } from './Image';
3
- import { Sandbox } from './Sandbox';
3
+ import { Sandbox, PaginatedSandboxes } from './Sandbox';
4
4
  import { SnapshotService } from './Snapshot';
5
5
  import { VolumeService } from './Volume';
6
6
  /**
@@ -178,14 +178,13 @@ export type SandboxFilter = {
178
178
  export declare class Daytona {
179
179
  private readonly clientConfig;
180
180
  private readonly sandboxApi;
181
+ private readonly toolboxApi;
181
182
  private readonly objectStorageApi;
182
- private readonly configApi;
183
183
  private readonly target?;
184
184
  private readonly apiKey?;
185
185
  private readonly jwtToken?;
186
186
  private readonly organizationId?;
187
187
  private readonly apiUrl;
188
- private proxyToolboxUrl?;
189
188
  readonly volume: VolumeService;
190
189
  readonly snapshot: SnapshotService;
191
190
  /**
@@ -286,18 +285,20 @@ export declare class Daytona {
286
285
  */
287
286
  findOne(filter: SandboxFilter): Promise<Sandbox>;
288
287
  /**
289
- * Lists all Sandboxes filtered by labels.
288
+ * Returns paginated list of Sandboxes filtered by labels.
290
289
  *
291
290
  * @param {Record<string, string>} [labels] - Labels to filter Sandboxes
292
- * @returns {Promise<Sandbox[]>} Array of Sandboxes that match the labels.
291
+ * @param {number} [page] - Page number for pagination (starting from 1)
292
+ * @param {number} [limit] - Maximum number of items per page
293
+ * @returns {Promise<PaginatedSandboxes>} Paginated list of Sandboxes that match the labels.
293
294
  *
294
295
  * @example
295
- * const sandboxes = await daytona.list({ 'my-label': 'my-value' });
296
- * for (const sandbox of sandboxes) {
296
+ * const result = await daytona.list({ 'my-label': 'my-value' }, 2, 10);
297
+ * for (const sandbox of result.items) {
297
298
  * console.log(`${sandbox.id}: ${sandbox.state}`);
298
299
  * }
299
300
  */
300
- list(labels?: Record<string, string>): Promise<Sandbox[]>;
301
+ list(labels?: Record<string, string>, page?: number, limit?: number): Promise<PaginatedSandboxes>;
301
302
  /**
302
303
  * Starts a Sandbox and waits for it to be ready.
303
304
  *
@@ -343,6 +344,4 @@ export declare class Daytona {
343
344
  * @throws {DaytonaError} - `DaytonaError` - When an unsupported language is specified
344
345
  */
345
346
  private getCodeToolbox;
346
- private createAxiosInstance;
347
- getProxyToolboxUrl(): Promise<string>;
348
347
  }