@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.
- package/cjs/CodeInterpreter.d.ts +3 -2
- package/cjs/CodeInterpreter.js.map +1 -1
- package/cjs/ComputerUse.d.ts +104 -2
- package/cjs/ComputerUse.js +851 -763
- package/cjs/ComputerUse.js.map +1 -1
- package/cjs/Daytona.d.ts +4 -3
- package/cjs/Daytona.js +429 -443
- package/cjs/Daytona.js.map +1 -1
- package/cjs/FileSystem.d.ts +2 -2
- package/cjs/FileSystem.js +491 -521
- package/cjs/FileSystem.js.map +1 -1
- package/cjs/Git.d.ts +2 -1
- package/cjs/Git.js +287 -310
- package/cjs/Git.js.map +1 -1
- package/cjs/LspServer.d.ts +2 -1
- package/cjs/LspServer.js +209 -226
- package/cjs/LspServer.js.map +1 -1
- package/cjs/ObjectStorage.js +170 -166
- package/cjs/ObjectStorage.js.map +1 -1
- package/cjs/Process.d.ts +4 -3
- package/cjs/Process.js +562 -600
- package/cjs/Process.js.map +1 -1
- package/cjs/PtyHandle.d.ts +2 -2
- package/cjs/PtyHandle.js +327 -338
- package/cjs/PtyHandle.js.map +1 -1
- package/cjs/Sandbox.d.ts +4 -3
- package/cjs/Sandbox.js +756 -821
- package/cjs/Sandbox.js.map +1 -1
- package/cjs/Snapshot.d.ts +3 -2
- package/cjs/Snapshot.js +203 -213
- package/cjs/Snapshot.js.map +1 -1
- package/cjs/Volume.d.ts +2 -1
- package/cjs/Volume.js +90 -92
- package/cjs/Volume.js.map +1 -1
- package/cjs/errors/DaytonaError.d.ts +2 -1
- package/cjs/errors/DaytonaError.js.map +1 -1
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +2 -1
- package/cjs/index.js.map +1 -1
- package/cjs/types/CodeInterpreter.d.ts +1 -1
- package/cjs/utils/Binary.js +14 -2
- package/cjs/utils/Binary.js.map +1 -1
- package/cjs/utils/otel.decorator.d.ts +7 -8
- package/cjs/utils/otel.decorator.js +24 -30
- package/cjs/utils/otel.decorator.js.map +1 -1
- package/esm/CodeInterpreter.d.ts +3 -2
- package/esm/CodeInterpreter.js.map +1 -1
- package/esm/ComputerUse.d.ts +104 -2
- package/esm/ComputerUse.js +857 -763
- package/esm/ComputerUse.js.map +1 -1
- package/esm/Daytona.d.ts +4 -3
- package/esm/Daytona.js +431 -444
- package/esm/Daytona.js.map +1 -1
- package/esm/FileSystem.d.ts +2 -2
- package/esm/FileSystem.js +493 -522
- package/esm/FileSystem.js.map +1 -1
- package/esm/Git.d.ts +2 -1
- package/esm/Git.js +289 -311
- package/esm/Git.js.map +1 -1
- package/esm/LspServer.d.ts +2 -1
- package/esm/LspServer.js +211 -227
- package/esm/LspServer.js.map +1 -1
- package/esm/ObjectStorage.js +172 -167
- package/esm/ObjectStorage.js.map +1 -1
- package/esm/Process.d.ts +4 -3
- package/esm/Process.js +564 -601
- package/esm/Process.js.map +1 -1
- package/esm/PtyHandle.d.ts +2 -2
- package/esm/PtyHandle.js +329 -339
- package/esm/PtyHandle.js.map +1 -1
- package/esm/Sandbox.d.ts +4 -3
- package/esm/Sandbox.js +759 -823
- package/esm/Sandbox.js.map +1 -1
- package/esm/Snapshot.d.ts +3 -2
- package/esm/Snapshot.js +206 -215
- package/esm/Snapshot.js.map +1 -1
- package/esm/Volume.d.ts +2 -1
- package/esm/Volume.js +92 -93
- package/esm/Volume.js.map +1 -1
- package/esm/errors/DaytonaError.d.ts +2 -1
- package/esm/errors/DaytonaError.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/types/CodeInterpreter.d.ts +1 -1
- package/esm/utils/Binary.js +14 -2
- package/esm/utils/Binary.js.map +1 -1
- package/esm/utils/otel.decorator.d.ts +7 -8
- package/esm/utils/otel.decorator.js +26 -32
- package/esm/utils/otel.decorator.js.map +1 -1
- package/package.json +3 -3
package/esm/ComputerUse.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ComputerUseApi
|
|
1
|
+
import { ComputerUseApi } from '@daytona/toolbox-api-client';
|
|
2
|
+
import type { MousePositionResponse, MouseClickResponse, MouseDragResponse, ScreenshotResponse, DisplayInfoResponse, WindowsResponse, ComputerUseStartResponse, ComputerUseStopResponse, ComputerUseStatusResponse, ProcessStatusResponse, ProcessRestartResponse, ProcessLogsResponse, ProcessErrorsResponse, Recording, ListRecordingsResponse, AccessibilityTreeResponse, AccessibilityNodesResponse, FindAccessibilityNodesRequest } from '@daytona/toolbox-api-client';
|
|
2
3
|
/**
|
|
3
4
|
* Interface for region coordinates used in screenshot operations
|
|
4
5
|
*/
|
|
@@ -17,6 +18,21 @@ export interface ScreenshotOptions {
|
|
|
17
18
|
quality?: number;
|
|
18
19
|
scale?: number;
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Options for fetching the AT-SPI accessibility tree.
|
|
23
|
+
*/
|
|
24
|
+
export interface AccessibilityTreeOptions {
|
|
25
|
+
/** Tree scope to inspect: 'focused', 'pid', or 'all'. */
|
|
26
|
+
scope?: string;
|
|
27
|
+
/** Process ID when scope is 'pid'. */
|
|
28
|
+
pid?: number;
|
|
29
|
+
/** Maximum depth to descend. Use 0 for the root only. */
|
|
30
|
+
maxDepth?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Options for finding AT-SPI accessibility nodes.
|
|
34
|
+
*/
|
|
35
|
+
export type AccessibilityFindOptions = FindAccessibilityNodesRequest;
|
|
20
36
|
/**
|
|
21
37
|
* Mouse operations for computer use functionality
|
|
22
38
|
*/
|
|
@@ -425,10 +441,94 @@ export declare class RecordingService {
|
|
|
425
441
|
*/
|
|
426
442
|
download(id: string, localPath: string): Promise<void>;
|
|
427
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* Accessibility operations for computer use functionality.
|
|
446
|
+
*/
|
|
447
|
+
export declare class Accessibility {
|
|
448
|
+
private readonly apiClient;
|
|
449
|
+
constructor(apiClient: ComputerUseApi);
|
|
450
|
+
/**
|
|
451
|
+
* Fetches the AT-SPI accessibility tree.
|
|
452
|
+
*
|
|
453
|
+
* @param {AccessibilityTreeOptions} [options] - Scope and depth options
|
|
454
|
+
* @returns {Promise<AccessibilityTreeResponse>} Accessibility tree response
|
|
455
|
+
*
|
|
456
|
+
* @example
|
|
457
|
+
* ```typescript
|
|
458
|
+
* const tree = await sandbox.computerUse.accessibility.getTree({ scope: 'all', maxDepth: 3 });
|
|
459
|
+
* console.log(tree.root?.name);
|
|
460
|
+
* ```
|
|
461
|
+
*/
|
|
462
|
+
getTree(options?: AccessibilityTreeOptions): Promise<AccessibilityTreeResponse>;
|
|
463
|
+
/**
|
|
464
|
+
* Finds AT-SPI accessibility nodes matching the provided filters.
|
|
465
|
+
*
|
|
466
|
+
* @param {AccessibilityFindOptions} [options] - Search scope, node filters, and result limit
|
|
467
|
+
* @returns {Promise<AccessibilityNodesResponse>} Matching accessibility nodes
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* ```typescript
|
|
471
|
+
* const buttons = await sandbox.computerUse.accessibility.findNodes({
|
|
472
|
+
* scope: 'all',
|
|
473
|
+
* role: 'button',
|
|
474
|
+
* name: 'Submit',
|
|
475
|
+
* nameMatch: 'substring',
|
|
476
|
+
* });
|
|
477
|
+
* console.log(buttons.matches?.length);
|
|
478
|
+
* ```
|
|
479
|
+
*/
|
|
480
|
+
findNodes(options?: AccessibilityFindOptions): Promise<AccessibilityNodesResponse>;
|
|
481
|
+
/**
|
|
482
|
+
* Focuses an AT-SPI accessibility node.
|
|
483
|
+
*
|
|
484
|
+
* @param {string} id - Accessibility node ID returned by getTree or findNodes
|
|
485
|
+
*
|
|
486
|
+
* @example
|
|
487
|
+
* ```typescript
|
|
488
|
+
* const node = (await sandbox.computerUse.accessibility.findNodes({ scope: 'all', limit: 1 })).matches?.[0];
|
|
489
|
+
* if (node?.id) {
|
|
490
|
+
* await sandbox.computerUse.accessibility.focusNode(node.id);
|
|
491
|
+
* }
|
|
492
|
+
* ```
|
|
493
|
+
*/
|
|
494
|
+
focusNode(id: string): Promise<void>;
|
|
495
|
+
/**
|
|
496
|
+
* Invokes an AT-SPI accessibility node action.
|
|
497
|
+
*
|
|
498
|
+
* @param {string} id - Accessibility node ID returned by getTree or findNodes
|
|
499
|
+
* @param {string} [action] - Action name to invoke. If omitted, the API invokes the primary action
|
|
500
|
+
*
|
|
501
|
+
* @example
|
|
502
|
+
* ```typescript
|
|
503
|
+
* const button = (await sandbox.computerUse.accessibility.findNodes({ scope: 'all', role: 'button', limit: 1 }))
|
|
504
|
+
* .matches?.[0];
|
|
505
|
+
* if (button?.id) {
|
|
506
|
+
* await sandbox.computerUse.accessibility.invokeNode(button.id, 'click');
|
|
507
|
+
* }
|
|
508
|
+
* ```
|
|
509
|
+
*/
|
|
510
|
+
invokeNode(id: string, action?: string): Promise<void>;
|
|
511
|
+
/**
|
|
512
|
+
* Sets an AT-SPI accessibility node value.
|
|
513
|
+
*
|
|
514
|
+
* @param {string} id - Accessibility node ID returned by getTree or findNodes
|
|
515
|
+
* @param {string} value - Value to write to the node
|
|
516
|
+
*
|
|
517
|
+
* @example
|
|
518
|
+
* ```typescript
|
|
519
|
+
* const field = (await sandbox.computerUse.accessibility.findNodes({ scope: 'all', role: 'entry', limit: 1 }))
|
|
520
|
+
* .matches?.[0];
|
|
521
|
+
* if (field?.id) {
|
|
522
|
+
* await sandbox.computerUse.accessibility.setNodeValue(field.id, 'hello');
|
|
523
|
+
* }
|
|
524
|
+
* ```
|
|
525
|
+
*/
|
|
526
|
+
setNodeValue(id: string, value: string): Promise<void>;
|
|
527
|
+
}
|
|
428
528
|
/**
|
|
429
529
|
* Computer Use functionality for interacting with the desktop environment.
|
|
430
530
|
*
|
|
431
|
-
* Provides access to mouse, keyboard, screenshot, display, and
|
|
531
|
+
* Provides access to mouse, keyboard, screenshot, display, recording, and accessibility operations
|
|
432
532
|
* for automating desktop interactions within a sandbox.
|
|
433
533
|
*
|
|
434
534
|
* @property {Mouse} mouse - Mouse operations interface
|
|
@@ -436,6 +536,7 @@ export declare class RecordingService {
|
|
|
436
536
|
* @property {Screenshot} screenshot - Screenshot operations interface
|
|
437
537
|
* @property {Display} display - Display operations interface
|
|
438
538
|
* @property {RecordingService} recording - Screen recording operations interface
|
|
539
|
+
* @property {Accessibility} accessibility - Accessibility operations interface
|
|
439
540
|
*
|
|
440
541
|
* @class
|
|
441
542
|
*/
|
|
@@ -446,6 +547,7 @@ export declare class ComputerUse {
|
|
|
446
547
|
readonly screenshot: Screenshot;
|
|
447
548
|
readonly display: Display;
|
|
448
549
|
readonly recording: RecordingService;
|
|
550
|
+
readonly accessibility: Accessibility;
|
|
449
551
|
constructor(apiClient: ComputerUseApi);
|
|
450
552
|
/**
|
|
451
553
|
* Starts all computer use processes (Xvfb, xfce4, x11vnc, novnc)
|