@daytonaio/sdk 0.138.0 → 0.140.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 +3 -3
- package/src/ComputerUse.d.ts +98 -2
- package/src/ComputerUse.js +130 -2
- package/src/ComputerUse.js.map +1 -1
- package/src/utils/Import.d.ts +1 -0
- package/src/utils/Import.js +2 -0
- package/src/utils/Import.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daytonaio/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.140.0",
|
|
4
4
|
"description": "TypeScript SDK for Daytona",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"pathe": "^2.0.3",
|
|
36
36
|
"shell-quote": "^1.8.2",
|
|
37
37
|
"tar": "^7.5.4",
|
|
38
|
-
"@daytonaio/api-client": "0.
|
|
39
|
-
"@daytonaio/toolbox-api-client": "0.
|
|
38
|
+
"@daytonaio/api-client": "0.140.0",
|
|
39
|
+
"@daytonaio/toolbox-api-client": "0.140.0"
|
|
40
40
|
},
|
|
41
41
|
"packageManager": "yarn@4.6.0",
|
|
42
42
|
"type": "commonjs"
|
package/src/ComputerUse.d.ts
CHANGED
|
@@ -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 { ComputerUseApi, MousePositionResponse, MouseClickResponse, MouseDragResponse, ScreenshotResponse, DisplayInfoResponse, WindowsResponse, ComputerUseStartResponse, ComputerUseStopResponse, ComputerUseStatusResponse, ProcessStatusResponse, ProcessRestartResponse, ProcessLogsResponse, ProcessErrorsResponse, Recording, ListRecordingsResponse } from '@daytonaio/toolbox-api-client';
|
|
2
2
|
/**
|
|
3
3
|
* Interface for region coordinates used in screenshot operations
|
|
4
4
|
*/
|
|
@@ -331,16 +331,111 @@ export declare class Display {
|
|
|
331
331
|
*/
|
|
332
332
|
getWindows(): Promise<WindowsResponse>;
|
|
333
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Recording operations for computer use functionality.
|
|
336
|
+
*/
|
|
337
|
+
export declare class RecordingService {
|
|
338
|
+
private readonly apiClient;
|
|
339
|
+
constructor(apiClient: ComputerUseApi);
|
|
340
|
+
/**
|
|
341
|
+
* Starts a new screen recording session
|
|
342
|
+
*
|
|
343
|
+
* @param {string} [label] - Optional custom label for the recording
|
|
344
|
+
* @returns {Promise<Recording>} Started recording details
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```typescript
|
|
348
|
+
* // Start a recording with a label
|
|
349
|
+
* const recording = await sandbox.computerUse.recording.start('my-test-recording');
|
|
350
|
+
* console.log(`Recording started: ${recording.id}`);
|
|
351
|
+
* console.log(`File: ${recording.filePath}`);
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
354
|
+
start(label?: string): Promise<Recording>;
|
|
355
|
+
/**
|
|
356
|
+
* Stops an active screen recording session
|
|
357
|
+
*
|
|
358
|
+
* @param {string} id - The ID of the recording to stop
|
|
359
|
+
* @returns {Promise<Recording>} Stopped recording details
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* ```typescript
|
|
363
|
+
* const result = await sandbox.computerUse.recording.stop(recording.id);
|
|
364
|
+
* console.log(`Recording stopped: ${result.durationSeconds} seconds`);
|
|
365
|
+
* console.log(`Saved to: ${result.filePath}`);
|
|
366
|
+
* ```
|
|
367
|
+
*/
|
|
368
|
+
stop(id: string): Promise<Recording>;
|
|
369
|
+
/**
|
|
370
|
+
* Lists all recordings (active and completed)
|
|
371
|
+
*
|
|
372
|
+
* @returns {Promise<ListRecordingsResponse>} List of all recordings
|
|
373
|
+
*
|
|
374
|
+
* @example
|
|
375
|
+
* ```typescript
|
|
376
|
+
* const recordings = await sandbox.computerUse.recording.list();
|
|
377
|
+
* console.log(`Found ${recordings.recordings.length} recordings`);
|
|
378
|
+
* recordings.recordings.forEach(rec => {
|
|
379
|
+
* console.log(`- ${rec.fileName}: ${rec.status}`);
|
|
380
|
+
* });
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
list(): Promise<ListRecordingsResponse>;
|
|
384
|
+
/**
|
|
385
|
+
* Gets details of a specific recording by ID
|
|
386
|
+
*
|
|
387
|
+
* @param {string} id - The ID of the recording to retrieve
|
|
388
|
+
* @returns {Promise<Recording>} Recording details
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* ```typescript
|
|
392
|
+
* const recording = await sandbox.computerUse.recording.get(recordingId);
|
|
393
|
+
* console.log(`Recording: ${recording.fileName}`);
|
|
394
|
+
* console.log(`Status: ${recording.status}`);
|
|
395
|
+
* console.log(`Duration: ${recording.durationSeconds} seconds`);
|
|
396
|
+
* ```
|
|
397
|
+
*/
|
|
398
|
+
get(id: string): Promise<Recording>;
|
|
399
|
+
/**
|
|
400
|
+
* Deletes a recording by ID
|
|
401
|
+
*
|
|
402
|
+
* @param {string} id - The ID of the recording to delete
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* ```typescript
|
|
406
|
+
* await sandbox.computerUse.recording.delete(recordingId);
|
|
407
|
+
* console.log('Recording deleted');
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
delete(id: string): Promise<void>;
|
|
411
|
+
/**
|
|
412
|
+
* Downloads a recording file and saves it to a local path
|
|
413
|
+
*
|
|
414
|
+
* The file is streamed directly to disk without loading the entire content into memory.
|
|
415
|
+
*
|
|
416
|
+
* @param {string} id - The ID of the recording to download
|
|
417
|
+
* @param {string} localPath - Path to save the recording file locally
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```typescript
|
|
421
|
+
* // Download recording to file
|
|
422
|
+
* await sandbox.computerUse.recording.download(recordingId, 'local_recording.mp4');
|
|
423
|
+
* console.log('Recording downloaded');
|
|
424
|
+
* ```
|
|
425
|
+
*/
|
|
426
|
+
download(id: string, localPath: string): Promise<void>;
|
|
427
|
+
}
|
|
334
428
|
/**
|
|
335
429
|
* Computer Use functionality for interacting with the desktop environment.
|
|
336
430
|
*
|
|
337
|
-
* Provides access to mouse, keyboard, screenshot, and
|
|
431
|
+
* Provides access to mouse, keyboard, screenshot, display, and recording operations
|
|
338
432
|
* for automating desktop interactions within a sandbox.
|
|
339
433
|
*
|
|
340
434
|
* @property {Mouse} mouse - Mouse operations interface
|
|
341
435
|
* @property {Keyboard} keyboard - Keyboard operations interface
|
|
342
436
|
* @property {Screenshot} screenshot - Screenshot operations interface
|
|
343
437
|
* @property {Display} display - Display operations interface
|
|
438
|
+
* @property {RecordingService} recording - Screen recording operations interface
|
|
344
439
|
*
|
|
345
440
|
* @class
|
|
346
441
|
*/
|
|
@@ -350,6 +445,7 @@ export declare class ComputerUse {
|
|
|
350
445
|
readonly keyboard: Keyboard;
|
|
351
446
|
readonly screenshot: Screenshot;
|
|
352
447
|
readonly display: Display;
|
|
448
|
+
readonly recording: RecordingService;
|
|
353
449
|
constructor(apiClient: ComputerUseApi);
|
|
354
450
|
/**
|
|
355
451
|
* Starts all computer use processes (Xvfb, xfce4, x11vnc, novnc)
|
package/src/ComputerUse.js
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ComputerUse = exports.Display = exports.Screenshot = exports.Keyboard = exports.Mouse = void 0;
|
|
7
|
+
exports.ComputerUse = exports.RecordingService = exports.Display = exports.Screenshot = exports.Keyboard = exports.Mouse = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const pathe = tslib_1.__importStar(require("pathe"));
|
|
10
|
+
const Import_1 = require("./utils/Import");
|
|
8
11
|
/**
|
|
9
12
|
* Mouse operations for computer use functionality
|
|
10
13
|
*/
|
|
@@ -377,16 +380,139 @@ class Display {
|
|
|
377
380
|
}
|
|
378
381
|
}
|
|
379
382
|
exports.Display = Display;
|
|
383
|
+
/**
|
|
384
|
+
* Recording operations for computer use functionality.
|
|
385
|
+
*/
|
|
386
|
+
class RecordingService {
|
|
387
|
+
apiClient;
|
|
388
|
+
constructor(apiClient) {
|
|
389
|
+
this.apiClient = apiClient;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Starts a new screen recording session
|
|
393
|
+
*
|
|
394
|
+
* @param {string} [label] - Optional custom label for the recording
|
|
395
|
+
* @returns {Promise<Recording>} Started recording details
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* ```typescript
|
|
399
|
+
* // Start a recording with a label
|
|
400
|
+
* const recording = await sandbox.computerUse.recording.start('my-test-recording');
|
|
401
|
+
* console.log(`Recording started: ${recording.id}`);
|
|
402
|
+
* console.log(`File: ${recording.filePath}`);
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
async start(label) {
|
|
406
|
+
return (await this.apiClient.startRecording({ label })).data;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Stops an active screen recording session
|
|
410
|
+
*
|
|
411
|
+
* @param {string} id - The ID of the recording to stop
|
|
412
|
+
* @returns {Promise<Recording>} Stopped recording details
|
|
413
|
+
*
|
|
414
|
+
* @example
|
|
415
|
+
* ```typescript
|
|
416
|
+
* const result = await sandbox.computerUse.recording.stop(recording.id);
|
|
417
|
+
* console.log(`Recording stopped: ${result.durationSeconds} seconds`);
|
|
418
|
+
* console.log(`Saved to: ${result.filePath}`);
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
async stop(id) {
|
|
422
|
+
return (await this.apiClient.stopRecording({ id })).data;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Lists all recordings (active and completed)
|
|
426
|
+
*
|
|
427
|
+
* @returns {Promise<ListRecordingsResponse>} List of all recordings
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* ```typescript
|
|
431
|
+
* const recordings = await sandbox.computerUse.recording.list();
|
|
432
|
+
* console.log(`Found ${recordings.recordings.length} recordings`);
|
|
433
|
+
* recordings.recordings.forEach(rec => {
|
|
434
|
+
* console.log(`- ${rec.fileName}: ${rec.status}`);
|
|
435
|
+
* });
|
|
436
|
+
* ```
|
|
437
|
+
*/
|
|
438
|
+
async list() {
|
|
439
|
+
return (await this.apiClient.listRecordings()).data;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Gets details of a specific recording by ID
|
|
443
|
+
*
|
|
444
|
+
* @param {string} id - The ID of the recording to retrieve
|
|
445
|
+
* @returns {Promise<Recording>} Recording details
|
|
446
|
+
*
|
|
447
|
+
* @example
|
|
448
|
+
* ```typescript
|
|
449
|
+
* const recording = await sandbox.computerUse.recording.get(recordingId);
|
|
450
|
+
* console.log(`Recording: ${recording.fileName}`);
|
|
451
|
+
* console.log(`Status: ${recording.status}`);
|
|
452
|
+
* console.log(`Duration: ${recording.durationSeconds} seconds`);
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
async get(id) {
|
|
456
|
+
return (await this.apiClient.getRecording(id)).data;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Deletes a recording by ID
|
|
460
|
+
*
|
|
461
|
+
* @param {string} id - The ID of the recording to delete
|
|
462
|
+
*
|
|
463
|
+
* @example
|
|
464
|
+
* ```typescript
|
|
465
|
+
* await sandbox.computerUse.recording.delete(recordingId);
|
|
466
|
+
* console.log('Recording deleted');
|
|
467
|
+
* ```
|
|
468
|
+
*/
|
|
469
|
+
async delete(id) {
|
|
470
|
+
await this.apiClient.deleteRecording(id);
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Downloads a recording file and saves it to a local path
|
|
474
|
+
*
|
|
475
|
+
* The file is streamed directly to disk without loading the entire content into memory.
|
|
476
|
+
*
|
|
477
|
+
* @param {string} id - The ID of the recording to download
|
|
478
|
+
* @param {string} localPath - Path to save the recording file locally
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* ```typescript
|
|
482
|
+
* // Download recording to file
|
|
483
|
+
* await sandbox.computerUse.recording.download(recordingId, 'local_recording.mp4');
|
|
484
|
+
* console.log('Recording downloaded');
|
|
485
|
+
* ```
|
|
486
|
+
*/
|
|
487
|
+
async download(id, localPath) {
|
|
488
|
+
const response = await this.apiClient.downloadRecording(id, { responseType: 'stream' });
|
|
489
|
+
const importErrPrefix = 'Recording download failed: ';
|
|
490
|
+
const fs = await (0, Import_1.dynamicImport)('fs', importErrPrefix);
|
|
491
|
+
const stream = await (0, Import_1.dynamicImport)('stream', importErrPrefix);
|
|
492
|
+
const util = await (0, Import_1.dynamicImport)('util', importErrPrefix);
|
|
493
|
+
const pipeline = util.promisify(stream.pipeline);
|
|
494
|
+
// Create parent directory if it doesn't exist
|
|
495
|
+
const parentDir = pathe.dirname(localPath);
|
|
496
|
+
if (parentDir) {
|
|
497
|
+
await fs.promises.mkdir(parentDir, { recursive: true });
|
|
498
|
+
}
|
|
499
|
+
// Stream the download directly to file
|
|
500
|
+
const writer = fs.createWriteStream(localPath);
|
|
501
|
+
await pipeline(response.data, writer);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
exports.RecordingService = RecordingService;
|
|
380
505
|
/**
|
|
381
506
|
* Computer Use functionality for interacting with the desktop environment.
|
|
382
507
|
*
|
|
383
|
-
* Provides access to mouse, keyboard, screenshot, and
|
|
508
|
+
* Provides access to mouse, keyboard, screenshot, display, and recording operations
|
|
384
509
|
* for automating desktop interactions within a sandbox.
|
|
385
510
|
*
|
|
386
511
|
* @property {Mouse} mouse - Mouse operations interface
|
|
387
512
|
* @property {Keyboard} keyboard - Keyboard operations interface
|
|
388
513
|
* @property {Screenshot} screenshot - Screenshot operations interface
|
|
389
514
|
* @property {Display} display - Display operations interface
|
|
515
|
+
* @property {RecordingService} recording - Screen recording operations interface
|
|
390
516
|
*
|
|
391
517
|
* @class
|
|
392
518
|
*/
|
|
@@ -396,12 +522,14 @@ class ComputerUse {
|
|
|
396
522
|
keyboard;
|
|
397
523
|
screenshot;
|
|
398
524
|
display;
|
|
525
|
+
recording;
|
|
399
526
|
constructor(apiClient) {
|
|
400
527
|
this.apiClient = apiClient;
|
|
401
528
|
this.mouse = new Mouse(apiClient);
|
|
402
529
|
this.keyboard = new Keyboard(apiClient);
|
|
403
530
|
this.screenshot = new Screenshot(apiClient);
|
|
404
531
|
this.display = new Display(apiClient);
|
|
532
|
+
this.recording = new RecordingService(apiClient);
|
|
405
533
|
}
|
|
406
534
|
/**
|
|
407
535
|
* Starts all computer use processes (Xvfb, xfce4, x11vnc, novnc)
|
package/src/ComputerUse.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComputerUse.js","sourceRoot":"","sources":["../../../../libs/sdk-typescript/src/ComputerUse.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"ComputerUse.js","sourceRoot":"","sources":["../../../../libs/sdk-typescript/src/ComputerUse.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,qDAA8B;AA0B9B,2CAA8C;AAsB9C;;GAEG;AACH,MAAa,KAAK;IACa;IAA7B,YAA6B,SAAyB;QAAzB,cAAS,GAAT,SAAS,CAAgB;IAAG,CAAC;IAE1D;;;;;;;;;;OAUG;IACI,KAAK,CAAC,WAAW;QACtB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAA;QACxD,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;;OAYG;IACI,KAAK,CAAC,IAAI,CAAC,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A;QACjE,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,gBAAgB,CAAC,WAAmB;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACnE,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAlID,kCAkIC"}
|
package/src/utils/Import.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ declare const loaderMap: {
|
|
|
79
79
|
EventEmitter: typeof import("events");
|
|
80
80
|
EventEmitterAsyncResource: typeof import("events").EventEmitterAsyncResource;
|
|
81
81
|
}>;
|
|
82
|
+
util: () => Promise<typeof import("util")>;
|
|
82
83
|
};
|
|
83
84
|
declare const requireMap: {
|
|
84
85
|
'fast-glob': () => any;
|
package/src/utils/Import.js
CHANGED
|
@@ -17,6 +17,7 @@ const loaderMap = {
|
|
|
17
17
|
ObjectStorage: () => import('../ObjectStorage.js'),
|
|
18
18
|
fs: () => import('fs'),
|
|
19
19
|
'form-data': () => import('form-data'),
|
|
20
|
+
util: () => import('util'),
|
|
20
21
|
};
|
|
21
22
|
const requireMap = {
|
|
22
23
|
'fast-glob': () => require('fast-glob'),
|
|
@@ -35,6 +36,7 @@ const validateMap = {
|
|
|
35
36
|
'expand-tilde': (mod) => typeof mod === 'function',
|
|
36
37
|
fs: (mod) => typeof mod.createReadStream === 'function' && typeof mod.readFile === 'function',
|
|
37
38
|
'form-data': (mod) => typeof mod === 'function',
|
|
39
|
+
util: (mod) => typeof mod.promisify === 'function',
|
|
38
40
|
};
|
|
39
41
|
async function dynamicImport(name, errorPrefix) {
|
|
40
42
|
const loader = loaderMap[name];
|
package/src/utils/Import.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Import.js","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/utils/Import.ts"],"names":[],"mappings":";AAAA;;;GAGG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