wuying-agentbay-sdk 0.8.0 → 0.9.1
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/README.md +24 -11
- package/dist/chunk-HKUD6LHR.mjs +612 -0
- package/dist/chunk-HKUD6LHR.mjs.map +1 -0
- package/dist/chunk-KOCCRN77.cjs +601 -0
- package/dist/chunk-KOCCRN77.cjs.map +1 -0
- package/dist/index.cjs +4504 -2730
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +857 -276
- package/dist/index.d.ts +857 -276
- package/dist/index.mjs +4369 -2597
- package/dist/index.mjs.map +1 -1
- package/dist/window-ATD33TEL.cjs +7 -0
- package/dist/window-ATD33TEL.cjs.map +1 -0
- package/dist/window-TMK7MJI6.mjs +16 -0
- package/dist/window-TMK7MJI6.mjs.map +1 -0
- package/package.json +11 -9
package/dist/index.d.mts
CHANGED
|
@@ -47,6 +47,7 @@ declare class CreateMcpSessionResponseBodyData extends $dara.Model {
|
|
|
47
47
|
resourceUrl?: string;
|
|
48
48
|
sessionId?: string;
|
|
49
49
|
success?: boolean;
|
|
50
|
+
token?: string;
|
|
50
51
|
vpcResource?: boolean;
|
|
51
52
|
static names(): {
|
|
52
53
|
[key: string]: string;
|
|
@@ -107,6 +108,28 @@ declare class GetLabelResponseBodyData extends $dara.Model {
|
|
|
107
108
|
});
|
|
108
109
|
}
|
|
109
110
|
|
|
111
|
+
declare class GetSessionResponseBodyData extends $dara.Model {
|
|
112
|
+
appInstanceId?: string;
|
|
113
|
+
resourceId?: string;
|
|
114
|
+
sessionId?: string;
|
|
115
|
+
success?: boolean;
|
|
116
|
+
httpPort?: string;
|
|
117
|
+
networkInterfaceIp?: string;
|
|
118
|
+
token?: string;
|
|
119
|
+
vpcResource?: boolean;
|
|
120
|
+
resourceUrl?: string;
|
|
121
|
+
static names(): {
|
|
122
|
+
[key: string]: string;
|
|
123
|
+
};
|
|
124
|
+
static types(): {
|
|
125
|
+
[key: string]: any;
|
|
126
|
+
};
|
|
127
|
+
validate(): void;
|
|
128
|
+
constructor(map?: {
|
|
129
|
+
[key: string]: any;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
110
133
|
declare class GetLinkResponseBodyData extends $dara.Model {
|
|
111
134
|
url?: string;
|
|
112
135
|
static names(): {
|
|
@@ -177,6 +200,7 @@ declare class ListContextsResponseBodyData extends $dara.Model {
|
|
|
177
200
|
|
|
178
201
|
declare class ListSessionResponseBodyData extends $dara.Model {
|
|
179
202
|
sessionId?: string;
|
|
203
|
+
sessionStatus?: string;
|
|
180
204
|
static names(): {
|
|
181
205
|
[key: string]: string;
|
|
182
206
|
};
|
|
@@ -596,6 +620,58 @@ declare class GetLabelResponse extends $dara.Model {
|
|
|
596
620
|
});
|
|
597
621
|
}
|
|
598
622
|
|
|
623
|
+
declare class GetSessionRequest extends $dara.Model {
|
|
624
|
+
authorization?: string;
|
|
625
|
+
sessionId?: string;
|
|
626
|
+
static names(): {
|
|
627
|
+
[key: string]: string;
|
|
628
|
+
};
|
|
629
|
+
static types(): {
|
|
630
|
+
[key: string]: any;
|
|
631
|
+
};
|
|
632
|
+
validate(): void;
|
|
633
|
+
constructor(map?: {
|
|
634
|
+
[key: string]: any;
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
declare class GetSessionResponseBody extends $dara.Model {
|
|
639
|
+
code?: string;
|
|
640
|
+
data?: GetSessionResponseBodyData;
|
|
641
|
+
httpStatusCode?: number;
|
|
642
|
+
message?: string;
|
|
643
|
+
requestId?: string;
|
|
644
|
+
success?: boolean;
|
|
645
|
+
static names(): {
|
|
646
|
+
[key: string]: string;
|
|
647
|
+
};
|
|
648
|
+
static types(): {
|
|
649
|
+
[key: string]: any;
|
|
650
|
+
};
|
|
651
|
+
validate(): void;
|
|
652
|
+
constructor(map?: {
|
|
653
|
+
[key: string]: any;
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
declare class GetSessionResponse extends $dara.Model {
|
|
658
|
+
headers?: {
|
|
659
|
+
[key: string]: string;
|
|
660
|
+
};
|
|
661
|
+
statusCode?: number;
|
|
662
|
+
body?: GetSessionResponseBody;
|
|
663
|
+
static names(): {
|
|
664
|
+
[key: string]: string;
|
|
665
|
+
};
|
|
666
|
+
static types(): {
|
|
667
|
+
[key: string]: any;
|
|
668
|
+
};
|
|
669
|
+
validate(): void;
|
|
670
|
+
constructor(map?: {
|
|
671
|
+
[key: string]: any;
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
|
|
599
675
|
declare class GetLinkRequest extends $dara.Model {
|
|
600
676
|
authorization?: string;
|
|
601
677
|
port?: number;
|
|
@@ -1515,6 +1591,21 @@ declare class Client extends OpenApi {
|
|
|
1515
1591
|
* @returns GetLabelResponse
|
|
1516
1592
|
*/
|
|
1517
1593
|
getLabel(request: GetLabelRequest): Promise<GetLabelResponse>;
|
|
1594
|
+
/**
|
|
1595
|
+
* Get session information
|
|
1596
|
+
*
|
|
1597
|
+
* @param request - GetSessionRequest
|
|
1598
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1599
|
+
* @returns GetSessionResponse
|
|
1600
|
+
*/
|
|
1601
|
+
getSessionWithOptions(request: GetSessionRequest, runtime: $dara.RuntimeOptions): Promise<GetSessionResponse>;
|
|
1602
|
+
/**
|
|
1603
|
+
* Get session information
|
|
1604
|
+
*
|
|
1605
|
+
* @param request - GetSessionRequest
|
|
1606
|
+
* @returns GetSessionResponse
|
|
1607
|
+
*/
|
|
1608
|
+
getSession(request: GetSessionRequest): Promise<GetSessionResponse>;
|
|
1518
1609
|
/**
|
|
1519
1610
|
* Get forwarding link for specific port
|
|
1520
1611
|
*
|
|
@@ -1735,13 +1826,13 @@ declare class Client extends OpenApi {
|
|
|
1735
1826
|
}
|
|
1736
1827
|
|
|
1737
1828
|
interface Config {
|
|
1738
|
-
region_id: string;
|
|
1739
1829
|
endpoint: string;
|
|
1740
1830
|
timeout_ms: number;
|
|
1741
1831
|
}
|
|
1742
1832
|
/**
|
|
1743
1833
|
* Load .env file into process.env if it exists
|
|
1744
1834
|
* This function should be called early to ensure .env variables are available
|
|
1835
|
+
* @deprecated Use loadDotEnvWithFallback instead
|
|
1745
1836
|
*/
|
|
1746
1837
|
declare function loadDotEnv(): void;
|
|
1747
1838
|
/**
|
|
@@ -1751,7 +1842,14 @@ declare function loadDotEnv(): void;
|
|
|
1751
1842
|
* 3. .env file.
|
|
1752
1843
|
* 4. Default configuration.
|
|
1753
1844
|
*/
|
|
1754
|
-
|
|
1845
|
+
/**
|
|
1846
|
+
* Load configuration with improved .env file search.
|
|
1847
|
+
*
|
|
1848
|
+
* @param customConfig Configuration object (if provided, skips env loading)
|
|
1849
|
+
* @param customEnvPath Custom path to .env file (optional)
|
|
1850
|
+
* @returns Configuration object
|
|
1851
|
+
*/
|
|
1852
|
+
declare function loadConfig(customConfig?: Config, customEnvPath?: string): Config;
|
|
1755
1853
|
|
|
1756
1854
|
/**
|
|
1757
1855
|
* Base interface for API responses
|
|
@@ -1773,6 +1871,46 @@ interface DeleteResult extends ApiResponse {
|
|
|
1773
1871
|
/** Optional error message if the operation failed */
|
|
1774
1872
|
errorMessage?: string;
|
|
1775
1873
|
}
|
|
1874
|
+
/**
|
|
1875
|
+
* Interface for GetSession data
|
|
1876
|
+
*/
|
|
1877
|
+
interface GetSessionData {
|
|
1878
|
+
/** Application instance ID */
|
|
1879
|
+
appInstanceId: string;
|
|
1880
|
+
/** Resource ID */
|
|
1881
|
+
resourceId: string;
|
|
1882
|
+
/** Session ID */
|
|
1883
|
+
sessionId: string;
|
|
1884
|
+
/** Success status */
|
|
1885
|
+
success: boolean;
|
|
1886
|
+
/** HTTP port for VPC sessions */
|
|
1887
|
+
httpPort: string;
|
|
1888
|
+
/** Network interface IP for VPC sessions */
|
|
1889
|
+
networkInterfaceIp: string;
|
|
1890
|
+
/** Token for VPC sessions */
|
|
1891
|
+
token: string;
|
|
1892
|
+
/** Whether this session uses VPC resources */
|
|
1893
|
+
vpcResource: boolean;
|
|
1894
|
+
/** Resource URL for accessing the session */
|
|
1895
|
+
resourceUrl: string;
|
|
1896
|
+
}
|
|
1897
|
+
/**
|
|
1898
|
+
* Interface for GetSession operation responses
|
|
1899
|
+
*/
|
|
1900
|
+
interface GetSessionResult extends ApiResponse {
|
|
1901
|
+
/** Request identifier for tracking API calls */
|
|
1902
|
+
requestId: string;
|
|
1903
|
+
/** HTTP status code */
|
|
1904
|
+
httpStatusCode: number;
|
|
1905
|
+
/** Response code */
|
|
1906
|
+
code: string;
|
|
1907
|
+
/** Whether the operation was successful */
|
|
1908
|
+
success: boolean;
|
|
1909
|
+
/** Session data */
|
|
1910
|
+
data?: GetSessionData;
|
|
1911
|
+
/** Optional error message if the operation failed */
|
|
1912
|
+
errorMessage?: string;
|
|
1913
|
+
}
|
|
1776
1914
|
/**
|
|
1777
1915
|
* Interface for session creation operation responses
|
|
1778
1916
|
* Corresponds to Python's SessionResult type
|
|
@@ -1873,7 +2011,7 @@ interface CodeExecutionResult extends ApiResponse {
|
|
|
1873
2011
|
* Interface for boolean operation responses
|
|
1874
2012
|
* Corresponds to Python's BoolResult type
|
|
1875
2013
|
*/
|
|
1876
|
-
interface BoolResult extends ApiResponse {
|
|
2014
|
+
interface BoolResult$2 extends ApiResponse {
|
|
1877
2015
|
/** Request identifier for tracking API calls */
|
|
1878
2016
|
requestId: string;
|
|
1879
2017
|
/** Whether the operation was successful */
|
|
@@ -2130,7 +2268,7 @@ declare class Context {
|
|
|
2130
2268
|
*/
|
|
2131
2269
|
name: string;
|
|
2132
2270
|
/**
|
|
2133
|
-
*
|
|
2271
|
+
* @deprecated This field is no longer used and will be removed in a future version.
|
|
2134
2272
|
*/
|
|
2135
2273
|
state: string;
|
|
2136
2274
|
/**
|
|
@@ -2142,7 +2280,7 @@ declare class Context {
|
|
|
2142
2280
|
*/
|
|
2143
2281
|
lastUsedAt?: string;
|
|
2144
2282
|
/**
|
|
2145
|
-
*
|
|
2283
|
+
* @deprecated This field is no longer used and will be removed in a future version.
|
|
2146
2284
|
*/
|
|
2147
2285
|
osType?: string;
|
|
2148
2286
|
/**
|
|
@@ -2150,10 +2288,10 @@ declare class Context {
|
|
|
2150
2288
|
*
|
|
2151
2289
|
* @param id - The unique identifier of the context.
|
|
2152
2290
|
* @param name - The name of the context.
|
|
2153
|
-
* @param state -
|
|
2291
|
+
* @param state - **Deprecated.** This parameter is no longer used.
|
|
2154
2292
|
* @param createdAt - Date and time when the Context was created.
|
|
2155
2293
|
* @param lastUsedAt - Date and time when the Context was last used.
|
|
2156
|
-
* @param osType -
|
|
2294
|
+
* @param osType - **Deprecated.** This parameter is no longer used.
|
|
2157
2295
|
*/
|
|
2158
2296
|
constructor(id: string, name: string, state?: string, createdAt?: string, lastUsedAt?: string, osType?: string);
|
|
2159
2297
|
}
|
|
@@ -2247,10 +2385,21 @@ declare enum UploadStrategy {
|
|
|
2247
2385
|
declare enum DownloadStrategy {
|
|
2248
2386
|
DownloadAsync = "DownloadAsync"
|
|
2249
2387
|
}
|
|
2388
|
+
declare enum Lifecycle {
|
|
2389
|
+
Lifecycle_1Day = "Lifecycle_1Day",
|
|
2390
|
+
Lifecycle_3Days = "Lifecycle_3Days",
|
|
2391
|
+
Lifecycle_5Days = "Lifecycle_5Days",
|
|
2392
|
+
Lifecycle_10Days = "Lifecycle_10Days",
|
|
2393
|
+
Lifecycle_15Days = "Lifecycle_15Days",
|
|
2394
|
+
Lifecycle_30Days = "Lifecycle_30Days",
|
|
2395
|
+
Lifecycle_90Days = "Lifecycle_90Days",
|
|
2396
|
+
Lifecycle_180Days = "Lifecycle_180Days",
|
|
2397
|
+
Lifecycle_360Days = "Lifecycle_360Days",
|
|
2398
|
+
Lifecycle_Forever = "Lifecycle_Forever"
|
|
2399
|
+
}
|
|
2250
2400
|
interface UploadPolicy {
|
|
2251
2401
|
autoUpload: boolean;
|
|
2252
2402
|
uploadStrategy: UploadStrategy;
|
|
2253
|
-
period?: number;
|
|
2254
2403
|
}
|
|
2255
2404
|
interface DownloadPolicy {
|
|
2256
2405
|
autoDownload: boolean;
|
|
@@ -2264,6 +2413,10 @@ interface ExtractPolicy {
|
|
|
2264
2413
|
deleteSrcFile: boolean;
|
|
2265
2414
|
extractToCurrentFolder: boolean;
|
|
2266
2415
|
}
|
|
2416
|
+
interface RecyclePolicy {
|
|
2417
|
+
lifecycle: Lifecycle;
|
|
2418
|
+
paths: string[];
|
|
2419
|
+
}
|
|
2267
2420
|
declare class ExtractPolicyClass implements ExtractPolicy {
|
|
2268
2421
|
extract: boolean;
|
|
2269
2422
|
deleteSrcFile: boolean;
|
|
@@ -2282,6 +2435,10 @@ interface WhiteList {
|
|
|
2282
2435
|
path: string;
|
|
2283
2436
|
excludePaths?: string[];
|
|
2284
2437
|
}
|
|
2438
|
+
declare class WhiteListValidator {
|
|
2439
|
+
private static containsWildcard;
|
|
2440
|
+
static validate(whitelist: WhiteList): void;
|
|
2441
|
+
}
|
|
2285
2442
|
interface BWList {
|
|
2286
2443
|
whiteLists?: WhiteList[];
|
|
2287
2444
|
}
|
|
@@ -2290,6 +2447,7 @@ interface SyncPolicy {
|
|
|
2290
2447
|
downloadPolicy?: DownloadPolicy;
|
|
2291
2448
|
deletePolicy?: DeletePolicy;
|
|
2292
2449
|
extractPolicy?: ExtractPolicy;
|
|
2450
|
+
recyclePolicy?: RecyclePolicy;
|
|
2293
2451
|
bwList?: BWList;
|
|
2294
2452
|
}
|
|
2295
2453
|
declare class SyncPolicyImpl implements SyncPolicy {
|
|
@@ -2297,6 +2455,7 @@ declare class SyncPolicyImpl implements SyncPolicy {
|
|
|
2297
2455
|
downloadPolicy?: DownloadPolicy;
|
|
2298
2456
|
deletePolicy?: DeletePolicy;
|
|
2299
2457
|
extractPolicy?: ExtractPolicy;
|
|
2458
|
+
recyclePolicy?: RecyclePolicy;
|
|
2300
2459
|
bwList?: BWList;
|
|
2301
2460
|
constructor(policy?: Partial<SyncPolicy>);
|
|
2302
2461
|
private ensureDefaults;
|
|
@@ -2313,7 +2472,9 @@ declare function newUploadPolicy(): UploadPolicy;
|
|
|
2313
2472
|
declare function newDownloadPolicy(): DownloadPolicy;
|
|
2314
2473
|
declare function newDeletePolicy(): DeletePolicy;
|
|
2315
2474
|
declare function newExtractPolicy(): ExtractPolicy;
|
|
2475
|
+
declare function newRecyclePolicy(): RecyclePolicy;
|
|
2316
2476
|
declare function newSyncPolicy(): SyncPolicy;
|
|
2477
|
+
declare function validateSyncPolicy(policy?: SyncPolicy): void;
|
|
2317
2478
|
declare function newSyncPolicyWithDefaults(policy?: Partial<SyncPolicy>): SyncPolicy;
|
|
2318
2479
|
declare function newContextSync(contextId: string, path: string, policy?: SyncPolicy): ContextSync;
|
|
2319
2480
|
|
|
@@ -2389,7 +2550,7 @@ declare class Agent {
|
|
|
2389
2550
|
/**
|
|
2390
2551
|
* Represents an installed application
|
|
2391
2552
|
*/
|
|
2392
|
-
interface InstalledApp {
|
|
2553
|
+
interface InstalledApp$1 {
|
|
2393
2554
|
name: string;
|
|
2394
2555
|
start_cmd: string;
|
|
2395
2556
|
stop_cmd?: string;
|
|
@@ -2398,7 +2559,7 @@ interface InstalledApp {
|
|
|
2398
2559
|
/**
|
|
2399
2560
|
* Represents a running process
|
|
2400
2561
|
*/
|
|
2401
|
-
interface Process {
|
|
2562
|
+
interface Process$1 {
|
|
2402
2563
|
pname: string;
|
|
2403
2564
|
pid: number;
|
|
2404
2565
|
cmdline?: string;
|
|
@@ -2406,6 +2567,10 @@ interface Process {
|
|
|
2406
2567
|
}
|
|
2407
2568
|
/**
|
|
2408
2569
|
* Handles application operations in the AgentBay cloud environment.
|
|
2570
|
+
*
|
|
2571
|
+
* @deprecated This module is deprecated. Use Computer or Mobile modules instead.
|
|
2572
|
+
* - For desktop applications, use session.computer
|
|
2573
|
+
* - For mobile applications, use session.mobile
|
|
2409
2574
|
*/
|
|
2410
2575
|
declare class Application {
|
|
2411
2576
|
private session;
|
|
@@ -2437,34 +2602,34 @@ declare class Application {
|
|
|
2437
2602
|
*/
|
|
2438
2603
|
private parseJSON;
|
|
2439
2604
|
/**
|
|
2440
|
-
*
|
|
2441
|
-
* Corresponds to Python's get_installed_apps() method
|
|
2605
|
+
* Get a list of installed applications.
|
|
2442
2606
|
*
|
|
2443
|
-
* @param startMenu - Whether to include
|
|
2444
|
-
* @param desktop - Whether to include
|
|
2445
|
-
* @param ignoreSystemApps - Whether to ignore system applications.
|
|
2446
|
-
* @returns
|
|
2447
|
-
*
|
|
2607
|
+
* @param startMenu - Whether to include start menu applications.
|
|
2608
|
+
* @param desktop - Whether to include desktop applications.
|
|
2609
|
+
* @param ignoreSystemApps - Whether to ignore system applications.
|
|
2610
|
+
* @returns A promise that resolves to the list of installed applications.
|
|
2611
|
+
*
|
|
2612
|
+
* @deprecated Use session.computer.getInstalledApps() for desktop or session.mobile.getInstalledApps() for mobile instead.
|
|
2448
2613
|
*/
|
|
2449
2614
|
getInstalledApps(startMenu?: boolean, desktop?: boolean, ignoreSystemApps?: boolean): Promise<InstalledAppListResult>;
|
|
2450
2615
|
/**
|
|
2451
|
-
*
|
|
2452
|
-
* Corresponds to Python's start_app() method
|
|
2616
|
+
* Start an application.
|
|
2453
2617
|
*
|
|
2454
2618
|
* @param startCmd - The command to start the application.
|
|
2455
|
-
* @param workDirectory - The working directory for the application.
|
|
2456
|
-
* @param activity -
|
|
2457
|
-
* @returns
|
|
2458
|
-
*
|
|
2619
|
+
* @param workDirectory - The working directory for the application.
|
|
2620
|
+
* @param activity - The activity to start (for mobile applications).
|
|
2621
|
+
* @returns A promise that resolves to the result of starting the application.
|
|
2622
|
+
*
|
|
2623
|
+
* @deprecated Use session.computer.startApp() for desktop or session.mobile.startApp() for mobile instead.
|
|
2459
2624
|
*/
|
|
2460
2625
|
startApp(startCmd: string, workDirectory?: string, activity?: string): Promise<ProcessListResult>;
|
|
2461
2626
|
/**
|
|
2462
|
-
*
|
|
2463
|
-
* Corresponds to Python's stop_app_by_pname() method
|
|
2627
|
+
* Stop an application by process name.
|
|
2464
2628
|
*
|
|
2465
|
-
* @param pname - The process name to stop.
|
|
2466
|
-
* @returns
|
|
2467
|
-
*
|
|
2629
|
+
* @param pname - The process name of the application to stop.
|
|
2630
|
+
* @returns A promise that resolves to the result of stopping the application.
|
|
2631
|
+
*
|
|
2632
|
+
* @deprecated Use session.computer.stopAppByPName() for desktop or session.mobile.stopAppByPName() for mobile instead.
|
|
2468
2633
|
*/
|
|
2469
2634
|
stopAppByPName(pname: string): Promise<AppOperationResult>;
|
|
2470
2635
|
/**
|
|
@@ -2477,14 +2642,14 @@ declare class Application {
|
|
|
2477
2642
|
*/
|
|
2478
2643
|
stopAppByPID(pid: number): Promise<AppOperationResult>;
|
|
2479
2644
|
/**
|
|
2480
|
-
*
|
|
2481
|
-
* Corresponds to Python's stop_app_by_cmd() method
|
|
2645
|
+
* Stop an application by command.
|
|
2482
2646
|
*
|
|
2483
|
-
* @param
|
|
2484
|
-
* @returns
|
|
2485
|
-
*
|
|
2647
|
+
* @param cmd - The command to stop the application.
|
|
2648
|
+
* @returns A promise that resolves to the result of stopping the application.
|
|
2649
|
+
*
|
|
2650
|
+
* @deprecated Use session.computer.stopAppByCmd() for desktop or session.mobile.stopAppByCmd() for mobile instead.
|
|
2486
2651
|
*/
|
|
2487
|
-
stopAppByCmd(
|
|
2652
|
+
stopAppByCmd(cmd: string): Promise<AppOperationResult>;
|
|
2488
2653
|
/**
|
|
2489
2654
|
* Returns a list of currently visible applications.
|
|
2490
2655
|
* Corresponds to Python's list_visible_apps() method
|
|
@@ -2493,6 +2658,171 @@ declare class Application {
|
|
|
2493
2658
|
* @throws Error if the operation fails.
|
|
2494
2659
|
*/
|
|
2495
2660
|
listVisibleApps(): Promise<ProcessListResult>;
|
|
2661
|
+
/**
|
|
2662
|
+
* Get a list of running processes.
|
|
2663
|
+
*
|
|
2664
|
+
* @returns A promise that resolves to the list of running processes.
|
|
2665
|
+
*
|
|
2666
|
+
* @deprecated Use session.computer.getRunningProcesses() for desktop or session.mobile.getRunningProcesses() for mobile instead.
|
|
2667
|
+
*/
|
|
2668
|
+
getRunningProcesses(): Promise<ProcessListResult>;
|
|
2669
|
+
/**
|
|
2670
|
+
* Get a list of visible applications.
|
|
2671
|
+
*
|
|
2672
|
+
* @returns A promise that resolves to the list of visible applications.
|
|
2673
|
+
*
|
|
2674
|
+
* @deprecated Use session.computer.getVisibleApps() for desktop instead. This API is not available for mobile.
|
|
2675
|
+
*/
|
|
2676
|
+
getVisibleApps(): Promise<InstalledAppListResult>;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
interface ActOptions {
|
|
2680
|
+
action: string;
|
|
2681
|
+
timeoutMS?: number;
|
|
2682
|
+
iframes?: boolean;
|
|
2683
|
+
domSettleTimeoutMS?: number;
|
|
2684
|
+
variables?: Record<string, string>;
|
|
2685
|
+
use_vision?: boolean;
|
|
2686
|
+
}
|
|
2687
|
+
interface ObserveOptions {
|
|
2688
|
+
instruction: string;
|
|
2689
|
+
iframes?: boolean;
|
|
2690
|
+
domSettleTimeoutMS?: number;
|
|
2691
|
+
use_vision?: boolean;
|
|
2692
|
+
}
|
|
2693
|
+
interface ExtractOptions<T = any> {
|
|
2694
|
+
instruction: string;
|
|
2695
|
+
schema: new (...args: any[]) => T;
|
|
2696
|
+
use_text_extract?: boolean;
|
|
2697
|
+
selector?: string;
|
|
2698
|
+
iframe?: boolean;
|
|
2699
|
+
domSettleTimeoutMS?: number;
|
|
2700
|
+
use_vision?: boolean;
|
|
2701
|
+
}
|
|
2702
|
+
declare class ActResult {
|
|
2703
|
+
success: boolean;
|
|
2704
|
+
message: string;
|
|
2705
|
+
action?: string;
|
|
2706
|
+
constructor(success: boolean, message: string, action?: string);
|
|
2707
|
+
}
|
|
2708
|
+
declare class ObserveResult {
|
|
2709
|
+
selector: string;
|
|
2710
|
+
description: string;
|
|
2711
|
+
method: string;
|
|
2712
|
+
args: Record<string, any>;
|
|
2713
|
+
constructor(selector: string, description: string, method: string, args: Record<string, any>);
|
|
2714
|
+
}
|
|
2715
|
+
declare class BrowserAgent {
|
|
2716
|
+
private session;
|
|
2717
|
+
private browser;
|
|
2718
|
+
constructor(session: Session, browser: Browser);
|
|
2719
|
+
/** ------------------ ACT ------------------ **/
|
|
2720
|
+
act(options: ActOptions, page: any): Promise<ActResult>;
|
|
2721
|
+
actAsync(options: ActOptions, page: any): Promise<ActResult>;
|
|
2722
|
+
/** ------------------ OBSERVE ------------------ **/
|
|
2723
|
+
observe(options: ObserveOptions, page: any): Promise<[boolean, ObserveResult[]]>;
|
|
2724
|
+
observeAsync(options: ObserveOptions, page: any): Promise<[boolean, ObserveResult[]]>;
|
|
2725
|
+
/** ------------------ EXTRACT ------------------ **/
|
|
2726
|
+
extract<T>(options: ExtractOptions<T>, page: any): Promise<[boolean, T | null]>;
|
|
2727
|
+
extractAsync<T>(options: ExtractOptions<T>, page: any): Promise<[boolean, T | null]>;
|
|
2728
|
+
private _getPageAndContextIndexAsync;
|
|
2729
|
+
private _callMcpTool;
|
|
2730
|
+
private _delay;
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
interface BrowserViewport {
|
|
2734
|
+
width: number;
|
|
2735
|
+
height: number;
|
|
2736
|
+
}
|
|
2737
|
+
interface BrowserScreen {
|
|
2738
|
+
width: number;
|
|
2739
|
+
height: number;
|
|
2740
|
+
}
|
|
2741
|
+
interface BrowserFingerprint {
|
|
2742
|
+
devices?: Array<'desktop' | 'mobile'>;
|
|
2743
|
+
operatingSystems?: Array<'windows' | 'macos' | 'linux' | 'android' | 'ios'>;
|
|
2744
|
+
locales?: string[];
|
|
2745
|
+
}
|
|
2746
|
+
interface BrowserProxy {
|
|
2747
|
+
type: 'custom' | 'wuying';
|
|
2748
|
+
server?: string;
|
|
2749
|
+
username?: string;
|
|
2750
|
+
password?: string;
|
|
2751
|
+
strategy?: 'restricted' | 'polling';
|
|
2752
|
+
pollsize?: number;
|
|
2753
|
+
toMap(): Record<string, any>;
|
|
2754
|
+
}
|
|
2755
|
+
declare class BrowserProxyClass implements BrowserProxy {
|
|
2756
|
+
type: 'custom' | 'wuying';
|
|
2757
|
+
server?: string;
|
|
2758
|
+
username?: string;
|
|
2759
|
+
password?: string;
|
|
2760
|
+
strategy?: 'restricted' | 'polling';
|
|
2761
|
+
pollsize?: number;
|
|
2762
|
+
constructor(proxyType: 'custom' | 'wuying', server?: string, username?: string, password?: string, strategy?: 'restricted' | 'polling', pollsize?: number);
|
|
2763
|
+
toMap(): Record<string, any>;
|
|
2764
|
+
static fromMap(m: Record<string, any> | null | undefined): BrowserProxyClass | null;
|
|
2765
|
+
}
|
|
2766
|
+
interface BrowserOption {
|
|
2767
|
+
persistentPath?: string;
|
|
2768
|
+
useStealth?: boolean;
|
|
2769
|
+
userAgent?: string;
|
|
2770
|
+
viewport?: BrowserViewport;
|
|
2771
|
+
screen?: BrowserScreen;
|
|
2772
|
+
fingerprint?: BrowserFingerprint;
|
|
2773
|
+
solveCaptchas?: boolean;
|
|
2774
|
+
proxies?: BrowserProxy[];
|
|
2775
|
+
/** Path to the extensions directory. Defaults to "/tmp/extensions/" */
|
|
2776
|
+
extensionPath?: string;
|
|
2777
|
+
}
|
|
2778
|
+
declare class BrowserOptionClass implements BrowserOption {
|
|
2779
|
+
persistentPath?: string;
|
|
2780
|
+
useStealth?: boolean;
|
|
2781
|
+
userAgent?: string;
|
|
2782
|
+
viewport?: BrowserViewport;
|
|
2783
|
+
screen?: BrowserScreen;
|
|
2784
|
+
fingerprint?: BrowserFingerprint;
|
|
2785
|
+
solveCaptchas?: boolean;
|
|
2786
|
+
proxies?: BrowserProxy[];
|
|
2787
|
+
extensionPath?: string;
|
|
2788
|
+
constructor(useStealth?: boolean, userAgent?: string, viewport?: BrowserViewport, screen?: BrowserScreen, fingerprint?: BrowserFingerprint, solveCaptchas?: boolean, proxies?: BrowserProxy[]);
|
|
2789
|
+
toMap(): Record<string, any>;
|
|
2790
|
+
fromMap(m: Record<string, any> | null | undefined): BrowserOptionClass;
|
|
2791
|
+
}
|
|
2792
|
+
declare class Browser {
|
|
2793
|
+
private session;
|
|
2794
|
+
private _endpointUrl;
|
|
2795
|
+
private _initialized;
|
|
2796
|
+
private _option;
|
|
2797
|
+
agent: BrowserAgent;
|
|
2798
|
+
constructor(session: Session);
|
|
2799
|
+
/**
|
|
2800
|
+
* Initialize the browser instance with the given options.
|
|
2801
|
+
* Returns true if successful, false otherwise.
|
|
2802
|
+
*/
|
|
2803
|
+
initialize(option: BrowserOptionClass | BrowserOption): boolean;
|
|
2804
|
+
/**
|
|
2805
|
+
* Initialize the browser instance with the given options asynchronously.
|
|
2806
|
+
* Returns true if successful, false otherwise.
|
|
2807
|
+
*/
|
|
2808
|
+
initializeAsync(option: BrowserOptionClass | BrowserOption): Promise<boolean>;
|
|
2809
|
+
/**
|
|
2810
|
+
* Returns the endpoint URL if the browser is initialized, otherwise throws an exception.
|
|
2811
|
+
* When initialized, always fetches the latest CDP url from session.getLink().
|
|
2812
|
+
*/
|
|
2813
|
+
getEndpointUrl(): Promise<string>;
|
|
2814
|
+
/**
|
|
2815
|
+
* Returns the current BrowserOption used to initialize the browser, or null if not set.
|
|
2816
|
+
*/
|
|
2817
|
+
getOption(): BrowserOptionClass | null;
|
|
2818
|
+
/**
|
|
2819
|
+
* Returns true if the browser was initialized, false otherwise.
|
|
2820
|
+
*/
|
|
2821
|
+
isInitialized(): boolean;
|
|
2822
|
+
/**
|
|
2823
|
+
* Stop the browser instance, internal use only.
|
|
2824
|
+
*/
|
|
2825
|
+
private _stopBrowser;
|
|
2496
2826
|
}
|
|
2497
2827
|
|
|
2498
2828
|
/**
|
|
@@ -2521,7 +2851,8 @@ declare class Code {
|
|
|
2521
2851
|
*
|
|
2522
2852
|
* @param code - The code to execute.
|
|
2523
2853
|
* @param language - The programming language of the code. Must be either 'python' or 'javascript'.
|
|
2524
|
-
* @param timeoutS - The timeout for the code execution in seconds. Default is
|
|
2854
|
+
* @param timeoutS - The timeout for the code execution in seconds. Default is 60s.
|
|
2855
|
+
* Note: Due to gateway limitations, each request cannot exceed 60 seconds.
|
|
2525
2856
|
* @returns CodeExecutionResult with code execution output and requestId
|
|
2526
2857
|
* @throws Error if an unsupported language is specified.
|
|
2527
2858
|
*/
|
|
@@ -2558,8 +2889,131 @@ declare class Command {
|
|
|
2558
2889
|
executeCommand(command: string, timeoutMs?: number): Promise<CommandResult>;
|
|
2559
2890
|
}
|
|
2560
2891
|
|
|
2561
|
-
|
|
2562
|
-
|
|
2892
|
+
/**
|
|
2893
|
+
* Computer module for desktop UI automation.
|
|
2894
|
+
* Provides mouse, keyboard, and screen operations for desktop environments.
|
|
2895
|
+
*/
|
|
2896
|
+
|
|
2897
|
+
declare enum MouseButton {
|
|
2898
|
+
LEFT = "left",
|
|
2899
|
+
RIGHT = "right",
|
|
2900
|
+
MIDDLE = "middle",
|
|
2901
|
+
DOUBLE_LEFT = "double_left"
|
|
2902
|
+
}
|
|
2903
|
+
declare enum ScrollDirection {
|
|
2904
|
+
UP = "up",
|
|
2905
|
+
DOWN = "down",
|
|
2906
|
+
LEFT = "left",
|
|
2907
|
+
RIGHT = "right"
|
|
2908
|
+
}
|
|
2909
|
+
interface BoolResult$1 extends OperationResult {
|
|
2910
|
+
data?: boolean;
|
|
2911
|
+
}
|
|
2912
|
+
interface CursorPosition extends OperationResult {
|
|
2913
|
+
x: number;
|
|
2914
|
+
y: number;
|
|
2915
|
+
}
|
|
2916
|
+
interface ScreenSize extends OperationResult {
|
|
2917
|
+
width: number;
|
|
2918
|
+
height: number;
|
|
2919
|
+
dpiScalingFactor: number;
|
|
2920
|
+
}
|
|
2921
|
+
interface ScreenshotResult$1 extends OperationResult {
|
|
2922
|
+
data: string;
|
|
2923
|
+
}
|
|
2924
|
+
interface ComputerSession {
|
|
2925
|
+
callMcpTool(toolName: string, args: Record<string, any>): Promise<any>;
|
|
2926
|
+
sessionId: string;
|
|
2927
|
+
getAPIKey(): string;
|
|
2928
|
+
getSessionId(): string;
|
|
2929
|
+
}
|
|
2930
|
+
declare class Computer {
|
|
2931
|
+
private session;
|
|
2932
|
+
constructor(session: ComputerSession);
|
|
2933
|
+
/**
|
|
2934
|
+
* Click mouse at specified coordinates.
|
|
2935
|
+
*/
|
|
2936
|
+
clickMouse(x: number, y: number, button?: MouseButton | string): Promise<BoolResult$1>;
|
|
2937
|
+
/**
|
|
2938
|
+
* Move mouse to specified coordinates.
|
|
2939
|
+
*/
|
|
2940
|
+
moveMouse(x: number, y: number): Promise<BoolResult$1>;
|
|
2941
|
+
/**
|
|
2942
|
+
* Drag mouse from one position to another.
|
|
2943
|
+
*/
|
|
2944
|
+
dragMouse(fromX: number, fromY: number, toX: number, toY: number, button?: MouseButton | string): Promise<BoolResult$1>;
|
|
2945
|
+
/**
|
|
2946
|
+
* Scroll at specified coordinates.
|
|
2947
|
+
*/
|
|
2948
|
+
scroll(x: number, y: number, direction?: ScrollDirection | string, amount?: number): Promise<BoolResult$1>;
|
|
2949
|
+
/**
|
|
2950
|
+
* Input text.
|
|
2951
|
+
*/
|
|
2952
|
+
inputText(text: string): Promise<BoolResult$1>;
|
|
2953
|
+
/**
|
|
2954
|
+
* Press keys.
|
|
2955
|
+
*/
|
|
2956
|
+
pressKeys(keys: string[], hold?: boolean): Promise<BoolResult$1>;
|
|
2957
|
+
/**
|
|
2958
|
+
* Release keys.
|
|
2959
|
+
*/
|
|
2960
|
+
releaseKeys(keys: string[]): Promise<BoolResult$1>;
|
|
2961
|
+
/**
|
|
2962
|
+
* Get cursor position.
|
|
2963
|
+
*/
|
|
2964
|
+
getCursorPosition(): Promise<CursorPosition>;
|
|
2965
|
+
/**
|
|
2966
|
+
* Get screen size.
|
|
2967
|
+
*/
|
|
2968
|
+
getScreenSize(): Promise<ScreenSize>;
|
|
2969
|
+
/**
|
|
2970
|
+
* Take a screenshot.
|
|
2971
|
+
*/
|
|
2972
|
+
screenshot(): Promise<ScreenshotResult$1>;
|
|
2973
|
+
/**
|
|
2974
|
+
* Lists all root windows.
|
|
2975
|
+
*/
|
|
2976
|
+
listRootWindows(timeoutMs?: number): Promise<WindowListResult>;
|
|
2977
|
+
/**
|
|
2978
|
+
* Gets the currently active window.
|
|
2979
|
+
*/
|
|
2980
|
+
getActiveWindow(timeoutMs?: number): Promise<WindowInfoResult>;
|
|
2981
|
+
/**
|
|
2982
|
+
* Activates the specified window.
|
|
2983
|
+
*/
|
|
2984
|
+
activateWindow(windowId: number): Promise<BoolResult$2>;
|
|
2985
|
+
/**
|
|
2986
|
+
* Closes the specified window.
|
|
2987
|
+
*/
|
|
2988
|
+
closeWindow(windowId: number): Promise<BoolResult$2>;
|
|
2989
|
+
/**
|
|
2990
|
+
* Maximizes the specified window.
|
|
2991
|
+
*/
|
|
2992
|
+
maximizeWindow(windowId: number): Promise<BoolResult$2>;
|
|
2993
|
+
/**
|
|
2994
|
+
* Minimizes the specified window.
|
|
2995
|
+
*/
|
|
2996
|
+
minimizeWindow(windowId: number): Promise<BoolResult$2>;
|
|
2997
|
+
/**
|
|
2998
|
+
* Restores the specified window.
|
|
2999
|
+
*/
|
|
3000
|
+
restoreWindow(windowId: number): Promise<BoolResult$2>;
|
|
3001
|
+
/**
|
|
3002
|
+
* Resizes the specified window.
|
|
3003
|
+
*/
|
|
3004
|
+
resizeWindow(windowId: number, width: number, height: number): Promise<BoolResult$2>;
|
|
3005
|
+
/**
|
|
3006
|
+
* Makes the specified window fullscreen.
|
|
3007
|
+
*/
|
|
3008
|
+
fullscreenWindow(windowId: number): Promise<BoolResult$2>;
|
|
3009
|
+
/**
|
|
3010
|
+
* Toggles focus mode on or off.
|
|
3011
|
+
*/
|
|
3012
|
+
focusMode(on: boolean): Promise<BoolResult$2>;
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
interface ContextStatusData {
|
|
3016
|
+
contextId: string;
|
|
2563
3017
|
path: string;
|
|
2564
3018
|
errorMessage: string;
|
|
2565
3019
|
status: string;
|
|
@@ -2572,11 +3026,15 @@ interface ContextStatusItem {
|
|
|
2572
3026
|
data: string;
|
|
2573
3027
|
}
|
|
2574
3028
|
interface ContextInfoResult extends ApiResponse {
|
|
3029
|
+
success?: boolean;
|
|
2575
3030
|
contextStatusData: ContextStatusData[];
|
|
3031
|
+
errorMessage?: string;
|
|
2576
3032
|
}
|
|
2577
3033
|
interface ContextSyncResult extends ApiResponse {
|
|
2578
3034
|
success: boolean;
|
|
3035
|
+
errorMessage?: string;
|
|
2579
3036
|
}
|
|
3037
|
+
type SyncCallback = (success: boolean) => void;
|
|
2580
3038
|
interface SessionInterface {
|
|
2581
3039
|
getAPIKey(): string;
|
|
2582
3040
|
getClient(): Client;
|
|
@@ -2587,8 +3045,19 @@ declare class ContextManager {
|
|
|
2587
3045
|
constructor(session: SessionInterface);
|
|
2588
3046
|
info(): Promise<ContextInfoResult>;
|
|
2589
3047
|
infoWithParams(contextId?: string, path?: string, taskType?: string): Promise<ContextInfoResult>;
|
|
2590
|
-
sync(): Promise<ContextSyncResult>;
|
|
2591
|
-
|
|
3048
|
+
sync(contextId?: string, path?: string, mode?: string, callback?: SyncCallback, maxRetries?: number, retryInterval?: number): Promise<ContextSyncResult>;
|
|
3049
|
+
/**
|
|
3050
|
+
* Polls the info interface to check if sync is completed and calls callback.
|
|
3051
|
+
*/
|
|
3052
|
+
private pollForCompletion;
|
|
3053
|
+
/**
|
|
3054
|
+
* Async version of polling for sync completion.
|
|
3055
|
+
*/
|
|
3056
|
+
private pollForCompletionAsync;
|
|
3057
|
+
/**
|
|
3058
|
+
* Sleep utility function for TypeScript
|
|
3059
|
+
*/
|
|
3060
|
+
private sleep;
|
|
2592
3061
|
}
|
|
2593
3062
|
declare function newContextManager(session: SessionInterface): ContextManager;
|
|
2594
3063
|
|
|
@@ -2649,21 +3118,19 @@ interface DirectoryEntry {
|
|
|
2649
3118
|
*/
|
|
2650
3119
|
declare class FileSystem {
|
|
2651
3120
|
private session;
|
|
3121
|
+
private _fileTransfer;
|
|
2652
3122
|
/**
|
|
2653
3123
|
* Initialize a FileSystem object.
|
|
2654
3124
|
*
|
|
2655
3125
|
* @param session - The Session instance that this FileSystem belongs to.
|
|
2656
3126
|
*/
|
|
2657
|
-
constructor(session:
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
requestId: string;
|
|
2665
|
-
}>;
|
|
2666
|
-
});
|
|
3127
|
+
constructor(session: Session);
|
|
3128
|
+
/**
|
|
3129
|
+
* Ensure FileTransfer is initialized with the current session.
|
|
3130
|
+
*
|
|
3131
|
+
* @returns The FileTransfer instance
|
|
3132
|
+
*/
|
|
3133
|
+
private _ensureFileTransfer;
|
|
2667
3134
|
/**
|
|
2668
3135
|
* Creates a new directory at the specified path.
|
|
2669
3136
|
* Corresponds to Python's create_directory() method
|
|
@@ -2671,7 +3138,7 @@ declare class FileSystem {
|
|
|
2671
3138
|
* @param path - Path to the directory to create.
|
|
2672
3139
|
* @returns BoolResult with creation result and requestId
|
|
2673
3140
|
*/
|
|
2674
|
-
createDirectory(path: string): Promise<BoolResult>;
|
|
3141
|
+
createDirectory(path: string): Promise<BoolResult$2>;
|
|
2675
3142
|
/**
|
|
2676
3143
|
* Edits a file by replacing occurrences of oldText with newText.
|
|
2677
3144
|
* Corresponds to Python's edit_file() method
|
|
@@ -2684,7 +3151,7 @@ declare class FileSystem {
|
|
|
2684
3151
|
editFile(path: string, edits: Array<{
|
|
2685
3152
|
oldText: string;
|
|
2686
3153
|
newText: string;
|
|
2687
|
-
}>, dryRun?: boolean): Promise<BoolResult>;
|
|
3154
|
+
}>, dryRun?: boolean): Promise<BoolResult$2>;
|
|
2688
3155
|
/**
|
|
2689
3156
|
* Gets information about a file or directory.
|
|
2690
3157
|
* Corresponds to Python's get_file_info() method
|
|
@@ -2709,7 +3176,7 @@ declare class FileSystem {
|
|
|
2709
3176
|
* @param destination - Path to the destination file or directory.
|
|
2710
3177
|
* @returns BoolResult with move result and requestId
|
|
2711
3178
|
*/
|
|
2712
|
-
moveFile(source: string, destination: string): Promise<BoolResult>;
|
|
3179
|
+
moveFile(source: string, destination: string): Promise<BoolResult$2>;
|
|
2713
3180
|
/**
|
|
2714
3181
|
* Internal method to read a file chunk. Used for chunked file operations.
|
|
2715
3182
|
*
|
|
@@ -2761,7 +3228,7 @@ declare class FileSystem {
|
|
|
2761
3228
|
* @param mode - Optional: Write mode. One of "overwrite", "append", or "create_new". Default is "overwrite".
|
|
2762
3229
|
* @returns BoolResult indicating success or failure with requestId
|
|
2763
3230
|
*/
|
|
2764
|
-
writeFile(path: string, content: string, mode?: string): Promise<BoolResult>;
|
|
3231
|
+
writeFile(path: string, content: string, mode?: string): Promise<BoolResult$2>;
|
|
2765
3232
|
/**
|
|
2766
3233
|
* Get file change information for the specified directory path
|
|
2767
3234
|
*/
|
|
@@ -2774,6 +3241,127 @@ declare class FileSystem {
|
|
|
2774
3241
|
* Watch a directory for file changes and call the callback function when changes occur
|
|
2775
3242
|
*/
|
|
2776
3243
|
watchDirectory(path: string, callback: (events: FileChangeEvent[]) => void, interval?: number, signal?: AbortSignal): Promise<void>;
|
|
3244
|
+
/**
|
|
3245
|
+
* Upload a file from local to remote path using pre-signed URLs.
|
|
3246
|
+
* This is a synchronous wrapper around the FileTransfer.upload method.
|
|
3247
|
+
*
|
|
3248
|
+
* @param localPath - Local file path to upload
|
|
3249
|
+
* @param remotePath - Remote file path to upload to
|
|
3250
|
+
* @param options - Optional parameters
|
|
3251
|
+
* @returns UploadResult with upload result and requestId
|
|
3252
|
+
*/
|
|
3253
|
+
uploadFile(localPath: string, remotePath: string, options?: {
|
|
3254
|
+
contentType?: string;
|
|
3255
|
+
wait?: boolean;
|
|
3256
|
+
waitTimeout?: number;
|
|
3257
|
+
pollInterval?: number;
|
|
3258
|
+
progressCb?: (bytesTransferred: number) => void;
|
|
3259
|
+
}): Promise<any>;
|
|
3260
|
+
/**
|
|
3261
|
+
* Download a file from remote path to local path using pre-signed URLs.
|
|
3262
|
+
* This is a synchronous wrapper around the FileTransfer.download method.
|
|
3263
|
+
*
|
|
3264
|
+
* @param remotePath - Remote file path to download from
|
|
3265
|
+
* @param localPath - Local file path to download to
|
|
3266
|
+
* @param options - Optional parameters
|
|
3267
|
+
* @returns DownloadResult with download result and requestId
|
|
3268
|
+
*/
|
|
3269
|
+
downloadFile(remotePath: string, localPath: string, options?: {
|
|
3270
|
+
overwrite?: boolean;
|
|
3271
|
+
wait?: boolean;
|
|
3272
|
+
waitTimeout?: number;
|
|
3273
|
+
pollInterval?: number;
|
|
3274
|
+
progressCb?: (bytesReceived: number) => void;
|
|
3275
|
+
}): Promise<any>;
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
/**
|
|
3279
|
+
* Mobile module for mobile UI automation.
|
|
3280
|
+
* Provides touch, input, and app management operations for mobile environments.
|
|
3281
|
+
*/
|
|
3282
|
+
|
|
3283
|
+
interface BoolResult extends OperationResult {
|
|
3284
|
+
data?: boolean;
|
|
3285
|
+
}
|
|
3286
|
+
interface UIElement$1 {
|
|
3287
|
+
text: string;
|
|
3288
|
+
className: string;
|
|
3289
|
+
bounds: {
|
|
3290
|
+
left: number;
|
|
3291
|
+
top: number;
|
|
3292
|
+
right: number;
|
|
3293
|
+
bottom: number;
|
|
3294
|
+
};
|
|
3295
|
+
}
|
|
3296
|
+
interface UIElementsResult extends OperationResult {
|
|
3297
|
+
elements: UIElement$1[];
|
|
3298
|
+
}
|
|
3299
|
+
interface InstalledApp {
|
|
3300
|
+
name: string;
|
|
3301
|
+
startCmd: string;
|
|
3302
|
+
workDirectory: string;
|
|
3303
|
+
}
|
|
3304
|
+
interface InstalledAppsResult extends OperationResult {
|
|
3305
|
+
apps: InstalledApp[];
|
|
3306
|
+
}
|
|
3307
|
+
interface Process {
|
|
3308
|
+
pid: number;
|
|
3309
|
+
pname: string;
|
|
3310
|
+
}
|
|
3311
|
+
interface ProcessResult extends OperationResult {
|
|
3312
|
+
processes: Process[];
|
|
3313
|
+
}
|
|
3314
|
+
interface ScreenshotResult extends OperationResult {
|
|
3315
|
+
data: string;
|
|
3316
|
+
}
|
|
3317
|
+
interface MobileSession {
|
|
3318
|
+
callMcpTool(toolName: string, args: Record<string, any>): Promise<any>;
|
|
3319
|
+
sessionId: string;
|
|
3320
|
+
getAPIKey(): string;
|
|
3321
|
+
}
|
|
3322
|
+
declare class Mobile {
|
|
3323
|
+
private session;
|
|
3324
|
+
constructor(session: MobileSession);
|
|
3325
|
+
/**
|
|
3326
|
+
* Tap at specified coordinates.
|
|
3327
|
+
*/
|
|
3328
|
+
tap(x: number, y: number): Promise<BoolResult>;
|
|
3329
|
+
/**
|
|
3330
|
+
* Swipe from one position to another.
|
|
3331
|
+
*/
|
|
3332
|
+
swipe(startX: number, startY: number, endX: number, endY: number, durationMs?: number): Promise<BoolResult>;
|
|
3333
|
+
/**
|
|
3334
|
+
* Input text.
|
|
3335
|
+
*/
|
|
3336
|
+
inputText(text: string): Promise<BoolResult>;
|
|
3337
|
+
/**
|
|
3338
|
+
* Send Android key code.
|
|
3339
|
+
*/
|
|
3340
|
+
sendKey(key: number): Promise<BoolResult>;
|
|
3341
|
+
/**
|
|
3342
|
+
* Get clickable UI elements.
|
|
3343
|
+
*/
|
|
3344
|
+
getClickableUIElements(timeoutMs?: number): Promise<UIElementsResult>;
|
|
3345
|
+
/**
|
|
3346
|
+
* Get all UI elements.
|
|
3347
|
+
*/
|
|
3348
|
+
getAllUIElements(timeoutMs?: number): Promise<UIElementsResult>;
|
|
3349
|
+
/**
|
|
3350
|
+
* Get installed apps.
|
|
3351
|
+
*/
|
|
3352
|
+
getInstalledApps(startMenu?: boolean, desktop?: boolean, ignoreSystemApps?: boolean): Promise<InstalledAppsResult>;
|
|
3353
|
+
/**
|
|
3354
|
+
* Start an app.
|
|
3355
|
+
*/
|
|
3356
|
+
startApp(startCmd: string, workDirectory?: string, activity?: string): Promise<ProcessResult>;
|
|
3357
|
+
/**
|
|
3358
|
+
* Stop app by package name.
|
|
3359
|
+
*/
|
|
3360
|
+
stopAppByPName(pname: string): Promise<BoolResult>;
|
|
3361
|
+
/**
|
|
3362
|
+
* Take a screenshot.
|
|
3363
|
+
*/
|
|
3364
|
+
screenshot(): Promise<ScreenshotResult>;
|
|
2777
3365
|
}
|
|
2778
3366
|
|
|
2779
3367
|
/**
|
|
@@ -2877,6 +3465,10 @@ interface UIElement {
|
|
|
2877
3465
|
}
|
|
2878
3466
|
/**
|
|
2879
3467
|
* Handles UI operations in the AgentBay cloud environment.
|
|
3468
|
+
*
|
|
3469
|
+
* @deprecated This module is deprecated. Use Computer or Mobile modules instead.
|
|
3470
|
+
* - For desktop UI operations, use session.computer
|
|
3471
|
+
* - For mobile UI operations, use session.mobile
|
|
2880
3472
|
*/
|
|
2881
3473
|
declare class UI {
|
|
2882
3474
|
private session;
|
|
@@ -2908,8 +3500,10 @@ declare class UI {
|
|
|
2908
3500
|
* Corresponds to Python's get_clickable_ui_elements() method
|
|
2909
3501
|
*
|
|
2910
3502
|
* @param timeoutMs - The timeout in milliseconds. Default is 2000ms.
|
|
2911
|
-
* @returns UIElementListResult with clickable
|
|
2912
|
-
* @throws
|
|
3503
|
+
* @returns UIElementListResult with clickable elements and requestId
|
|
3504
|
+
* @throws Error if the operation fails.
|
|
3505
|
+
*
|
|
3506
|
+
* @deprecated Use session.computer.getClickableUIElements() for desktop or session.mobile.getClickableUIElements() for mobile instead.
|
|
2913
3507
|
*/
|
|
2914
3508
|
getClickableUIElements(timeoutMs?: number): Promise<UIElementListResult>;
|
|
2915
3509
|
/**
|
|
@@ -2917,8 +3511,10 @@ declare class UI {
|
|
|
2917
3511
|
* Corresponds to Python's get_all_ui_elements() method
|
|
2918
3512
|
*
|
|
2919
3513
|
* @param timeoutMs - The timeout in milliseconds. Default is 2000ms.
|
|
2920
|
-
* @returns UIElementListResult with all
|
|
2921
|
-
* @throws
|
|
3514
|
+
* @returns UIElementListResult with all elements and requestId
|
|
3515
|
+
* @throws Error if the operation fails.
|
|
3516
|
+
*
|
|
3517
|
+
* @deprecated Use session.computer.getAllUIElements() for desktop or session.mobile.getAllUIElements() for mobile instead.
|
|
2922
3518
|
*/
|
|
2923
3519
|
getAllUIElements(timeoutMs?: number): Promise<UIElementListResult>;
|
|
2924
3520
|
/**
|
|
@@ -2933,18 +3529,22 @@ declare class UI {
|
|
|
2933
3529
|
* - 26 : POWER
|
|
2934
3530
|
* - 82 : MENU
|
|
2935
3531
|
* @returns BoolResult with success status and requestId
|
|
2936
|
-
* @throws
|
|
3532
|
+
* @throws Error if the operation fails.
|
|
3533
|
+
*
|
|
3534
|
+
* @deprecated Use session.computer.pressKeys() for desktop or session.mobile.sendKey() for mobile instead.
|
|
2937
3535
|
*/
|
|
2938
|
-
sendKey(key: number): Promise<BoolResult>;
|
|
3536
|
+
sendKey(key: number): Promise<BoolResult$2>;
|
|
2939
3537
|
/**
|
|
2940
3538
|
* Inputs text into the currently focused UI element.
|
|
2941
3539
|
* Corresponds to Python's input_text() method
|
|
2942
3540
|
*
|
|
2943
3541
|
* @param text - The text to input
|
|
2944
3542
|
* @returns BoolResult with success status and requestId
|
|
2945
|
-
* @throws
|
|
3543
|
+
* @throws Error if the operation fails.
|
|
3544
|
+
*
|
|
3545
|
+
* @deprecated Use session.computer.inputText() for desktop or session.mobile.inputText() for mobile instead.
|
|
2946
3546
|
*/
|
|
2947
|
-
inputText(text: string): Promise<BoolResult>;
|
|
3547
|
+
inputText(text: string): Promise<BoolResult$2>;
|
|
2948
3548
|
/**
|
|
2949
3549
|
* Performs a swipe gesture on the screen.
|
|
2950
3550
|
* Corresponds to Python's swipe() method
|
|
@@ -2955,9 +3555,11 @@ declare class UI {
|
|
|
2955
3555
|
* @param endY - The ending Y coordinate
|
|
2956
3556
|
* @param durationMs - The duration of the swipe in milliseconds. Default is 300ms.
|
|
2957
3557
|
* @returns BoolResult with success status and requestId
|
|
2958
|
-
* @throws
|
|
3558
|
+
* @throws Error if the operation fails.
|
|
3559
|
+
*
|
|
3560
|
+
* @deprecated Use session.computer.dragMouse() for desktop or session.mobile.swipe() for mobile instead.
|
|
2959
3561
|
*/
|
|
2960
|
-
swipe(startX: number, startY: number, endX: number, endY: number, durationMs?: number): Promise<BoolResult>;
|
|
3562
|
+
swipe(startX: number, startY: number, endX: number, endY: number, durationMs?: number): Promise<BoolResult$2>;
|
|
2961
3563
|
/**
|
|
2962
3564
|
* Clicks on the screen at the specified coordinates.
|
|
2963
3565
|
* Corresponds to Python's click() method
|
|
@@ -2966,21 +3568,29 @@ declare class UI {
|
|
|
2966
3568
|
* @param y - The Y coordinate
|
|
2967
3569
|
* @param button - The mouse button to use. Default is 'left'
|
|
2968
3570
|
* @returns BoolResult with success status and requestId
|
|
2969
|
-
* @throws
|
|
3571
|
+
* @throws Error if the operation fails.
|
|
3572
|
+
*
|
|
3573
|
+
* @deprecated Use session.computer.clickMouse() for desktop or session.mobile.tap() for mobile instead.
|
|
2970
3574
|
*/
|
|
2971
|
-
click(x: number, y: number, button?: string): Promise<BoolResult>;
|
|
3575
|
+
click(x: number, y: number, button?: string): Promise<BoolResult$2>;
|
|
2972
3576
|
/**
|
|
2973
3577
|
* Takes a screenshot of the current screen.
|
|
2974
3578
|
* Corresponds to Python's screenshot() method
|
|
2975
3579
|
*
|
|
2976
3580
|
* @returns OperationResult with success status and requestId
|
|
2977
|
-
* @throws
|
|
3581
|
+
* @throws Error if the operation fails.
|
|
3582
|
+
*
|
|
3583
|
+
* @deprecated Use session.computer.screenshot() for desktop or session.mobile.screenshot() for mobile instead.
|
|
2978
3584
|
*/
|
|
2979
3585
|
screenshot(): Promise<OperationResult>;
|
|
2980
3586
|
}
|
|
2981
3587
|
|
|
2982
3588
|
/**
|
|
2983
3589
|
* Handles window management operations in the AgentBay cloud environment.
|
|
3590
|
+
*
|
|
3591
|
+
* @deprecated This module is deprecated. Use Computer module instead.
|
|
3592
|
+
* - For desktop window operations, use session.computer
|
|
3593
|
+
* - Window operations are not available for mobile
|
|
2984
3594
|
*/
|
|
2985
3595
|
declare class WindowManager {
|
|
2986
3596
|
private session;
|
|
@@ -3010,40 +3620,60 @@ declare class WindowManager {
|
|
|
3010
3620
|
*
|
|
3011
3621
|
* @param timeoutMs - The timeout in milliseconds. Default is 3000ms.
|
|
3012
3622
|
* @returns WindowListResult with windows array and requestId
|
|
3623
|
+
*
|
|
3624
|
+
* @deprecated Use session.computer.listRootWindows() instead.
|
|
3013
3625
|
*/
|
|
3014
3626
|
listRootWindows(timeoutMs?: number): Promise<WindowListResult>;
|
|
3015
3627
|
/**
|
|
3016
|
-
*
|
|
3017
|
-
* Corresponds to Python's
|
|
3628
|
+
* Lists all windows in the system.
|
|
3629
|
+
* Corresponds to Python's list_all_windows() method
|
|
3018
3630
|
*
|
|
3019
3631
|
* @param timeoutMs - The timeout in milliseconds. Default is 3000ms.
|
|
3020
|
-
* @returns
|
|
3632
|
+
* @returns WindowListResult with windows array and requestId
|
|
3633
|
+
*
|
|
3634
|
+
* @deprecated Use session.computer.listAllWindows() instead.
|
|
3021
3635
|
*/
|
|
3022
|
-
|
|
3636
|
+
listAllWindows(timeoutMs?: number): Promise<WindowListResult>;
|
|
3023
3637
|
/**
|
|
3024
|
-
*
|
|
3638
|
+
* Gets information about a specific window.
|
|
3639
|
+
* Corresponds to Python's get_window_info() method
|
|
3640
|
+
*
|
|
3641
|
+
* @param windowId - The ID of the window to get information for.
|
|
3642
|
+
* @returns WindowInfoResult with window information and requestId
|
|
3643
|
+
*
|
|
3644
|
+
* @deprecated Use session.computer.getWindowInfo() instead.
|
|
3645
|
+
*/
|
|
3646
|
+
getWindowInfo(windowId: number): Promise<WindowInfoResult>;
|
|
3647
|
+
/**
|
|
3648
|
+
* Activates a window by bringing it to the foreground.
|
|
3025
3649
|
* Corresponds to Python's activate_window() method
|
|
3026
3650
|
*
|
|
3027
|
-
* @param windowId The ID of the window to activate.
|
|
3028
|
-
* @returns BoolResult with requestId
|
|
3651
|
+
* @param windowId - The ID of the window to activate.
|
|
3652
|
+
* @returns BoolResult with success status and requestId
|
|
3653
|
+
*
|
|
3654
|
+
* @deprecated Use session.computer.activateWindow() instead.
|
|
3029
3655
|
*/
|
|
3030
|
-
activateWindow(windowId: number): Promise<BoolResult>;
|
|
3656
|
+
activateWindow(windowId: number): Promise<BoolResult$2>;
|
|
3031
3657
|
/**
|
|
3032
|
-
* Maximizes a window
|
|
3658
|
+
* Maximizes a window.
|
|
3033
3659
|
* Corresponds to Python's maximize_window() method
|
|
3034
3660
|
*
|
|
3035
|
-
* @param windowId The ID of the window to maximize.
|
|
3036
|
-
* @returns BoolResult with requestId
|
|
3661
|
+
* @param windowId - The ID of the window to maximize.
|
|
3662
|
+
* @returns BoolResult with success status and requestId
|
|
3663
|
+
*
|
|
3664
|
+
* @deprecated Use session.computer.maximizeWindow() instead.
|
|
3037
3665
|
*/
|
|
3038
|
-
maximizeWindow(windowId: number): Promise<BoolResult>;
|
|
3666
|
+
maximizeWindow(windowId: number): Promise<BoolResult$2>;
|
|
3039
3667
|
/**
|
|
3040
|
-
* Minimizes a window
|
|
3668
|
+
* Minimizes a window.
|
|
3041
3669
|
* Corresponds to Python's minimize_window() method
|
|
3042
3670
|
*
|
|
3043
|
-
* @param windowId The ID of the window to minimize.
|
|
3044
|
-
* @returns BoolResult with requestId
|
|
3671
|
+
* @param windowId - The ID of the window to minimize.
|
|
3672
|
+
* @returns BoolResult with success status and requestId
|
|
3673
|
+
*
|
|
3674
|
+
* @deprecated Use session.computer.minimizeWindow() instead.
|
|
3045
3675
|
*/
|
|
3046
|
-
minimizeWindow(windowId: number): Promise<BoolResult>;
|
|
3676
|
+
minimizeWindow(windowId: number): Promise<BoolResult$2>;
|
|
3047
3677
|
/**
|
|
3048
3678
|
* Restores a window by ID.
|
|
3049
3679
|
* Corresponds to Python's restore_window() method
|
|
@@ -3051,15 +3681,17 @@ declare class WindowManager {
|
|
|
3051
3681
|
* @param windowId The ID of the window to restore.
|
|
3052
3682
|
* @returns BoolResult with requestId
|
|
3053
3683
|
*/
|
|
3054
|
-
restoreWindow(windowId: number): Promise<BoolResult>;
|
|
3684
|
+
restoreWindow(windowId: number): Promise<BoolResult$2>;
|
|
3055
3685
|
/**
|
|
3056
|
-
* Closes a window
|
|
3686
|
+
* Closes a window.
|
|
3057
3687
|
* Corresponds to Python's close_window() method
|
|
3058
3688
|
*
|
|
3059
|
-
* @param windowId The ID of the window to close.
|
|
3060
|
-
* @returns BoolResult with requestId
|
|
3689
|
+
* @param windowId - The ID of the window to close.
|
|
3690
|
+
* @returns BoolResult with success status and requestId
|
|
3691
|
+
*
|
|
3692
|
+
* @deprecated Use session.computer.closeWindow() instead.
|
|
3061
3693
|
*/
|
|
3062
|
-
closeWindow(windowId: number): Promise<BoolResult>;
|
|
3694
|
+
closeWindow(windowId: number): Promise<BoolResult$2>;
|
|
3063
3695
|
/**
|
|
3064
3696
|
* Sets a window to fullscreen by ID.
|
|
3065
3697
|
* Corresponds to Python's fullscreen_window() method
|
|
@@ -3067,17 +3699,31 @@ declare class WindowManager {
|
|
|
3067
3699
|
* @param windowId The ID of the window to set to fullscreen.
|
|
3068
3700
|
* @returns BoolResult with requestId
|
|
3069
3701
|
*/
|
|
3070
|
-
fullscreenWindow(windowId: number): Promise<BoolResult>;
|
|
3702
|
+
fullscreenWindow(windowId: number): Promise<BoolResult$2>;
|
|
3071
3703
|
/**
|
|
3072
|
-
* Resizes a window
|
|
3704
|
+
* Resizes a window to the specified dimensions.
|
|
3073
3705
|
* Corresponds to Python's resize_window() method
|
|
3074
3706
|
*
|
|
3075
|
-
* @param windowId The ID of the window to resize.
|
|
3076
|
-
* @param width The new width of the window.
|
|
3077
|
-
* @param height The new height of the window.
|
|
3078
|
-
* @returns BoolResult with requestId
|
|
3707
|
+
* @param windowId - The ID of the window to resize.
|
|
3708
|
+
* @param width - The new width of the window.
|
|
3709
|
+
* @param height - The new height of the window.
|
|
3710
|
+
* @returns BoolResult with success status and requestId
|
|
3711
|
+
*
|
|
3712
|
+
* @deprecated Use session.computer.resizeWindow() instead.
|
|
3713
|
+
*/
|
|
3714
|
+
resizeWindow(windowId: number, width: number, height: number): Promise<BoolResult$2>;
|
|
3715
|
+
/**
|
|
3716
|
+
* Moves a window to the specified position.
|
|
3717
|
+
* Corresponds to Python's move_window() method
|
|
3718
|
+
*
|
|
3719
|
+
* @param windowId - The ID of the window to move.
|
|
3720
|
+
* @param x - The new x coordinate of the window.
|
|
3721
|
+
* @param y - The new y coordinate of the window.
|
|
3722
|
+
* @returns BoolResult with success status and requestId
|
|
3723
|
+
*
|
|
3724
|
+
* @deprecated Use session.computer.moveWindow() instead.
|
|
3079
3725
|
*/
|
|
3080
|
-
|
|
3726
|
+
moveWindow(windowId: number, x: number, y: number): Promise<BoolResult$2>;
|
|
3081
3727
|
/**
|
|
3082
3728
|
* Enables or disables focus mode.
|
|
3083
3729
|
* Corresponds to Python's focus_mode() method
|
|
@@ -3085,170 +3731,17 @@ declare class WindowManager {
|
|
|
3085
3731
|
* @param on Whether to enable focus mode.
|
|
3086
3732
|
* @returns BoolResult with requestId
|
|
3087
3733
|
*/
|
|
3088
|
-
focusMode(on: boolean): Promise<BoolResult>;
|
|
3089
|
-
}
|
|
3090
|
-
|
|
3091
|
-
interface ActOptions {
|
|
3092
|
-
action: string;
|
|
3093
|
-
timeoutMS?: number;
|
|
3094
|
-
iframes?: boolean;
|
|
3095
|
-
domSettleTimeoutMS?: number;
|
|
3096
|
-
}
|
|
3097
|
-
interface ObserveOptions {
|
|
3098
|
-
instruction: string;
|
|
3099
|
-
returnActions?: number;
|
|
3100
|
-
iframes?: boolean;
|
|
3101
|
-
domSettleTimeoutMS?: number;
|
|
3102
|
-
}
|
|
3103
|
-
interface ExtractOptions<T = any> {
|
|
3104
|
-
instruction: string;
|
|
3105
|
-
schema: new (...args: any[]) => T;
|
|
3106
|
-
use_text_extract: boolean;
|
|
3107
|
-
selector?: string;
|
|
3108
|
-
iframe?: boolean;
|
|
3109
|
-
domSettleTimeoutsMS?: number;
|
|
3110
|
-
}
|
|
3111
|
-
declare class ActResult {
|
|
3112
|
-
success: boolean;
|
|
3113
|
-
message: string;
|
|
3114
|
-
action: string;
|
|
3115
|
-
constructor(success: boolean, message: string, action: string);
|
|
3116
|
-
}
|
|
3117
|
-
declare class ObserveResult {
|
|
3118
|
-
selector: string;
|
|
3119
|
-
description: string;
|
|
3120
|
-
method: string;
|
|
3121
|
-
args: Record<string, any>;
|
|
3122
|
-
constructor(selector: string, description: string, method: string, args: Record<string, any>);
|
|
3123
|
-
}
|
|
3124
|
-
declare class BrowserAgent {
|
|
3125
|
-
private session;
|
|
3126
|
-
private browser;
|
|
3127
|
-
constructor(session: Session, browser: Browser);
|
|
3128
|
-
/**
|
|
3129
|
-
* Perform an action on the given Playwright Page object, using ActOptions to configure behavior.
|
|
3130
|
-
* Returns the result of the action.
|
|
3131
|
-
*/
|
|
3132
|
-
act(options: ActOptions, page: any): Promise<ActResult>;
|
|
3133
|
-
/**
|
|
3134
|
-
* Async version of act method for performing actions on the given Playwright Page object.
|
|
3135
|
-
*/
|
|
3136
|
-
actAsync(options: ActOptions, page: any): Promise<ActResult>;
|
|
3137
|
-
/**
|
|
3138
|
-
* Observe elements or state on the given Playwright Page object.
|
|
3139
|
-
* Returns a tuple containing (success, results).
|
|
3140
|
-
*/
|
|
3141
|
-
observe(options: ObserveOptions, page: any): Promise<[boolean, ObserveResult[]]>;
|
|
3142
|
-
/**
|
|
3143
|
-
* Async version of observe method.
|
|
3144
|
-
*/
|
|
3145
|
-
observeAsync(options: ObserveOptions, page: any): Promise<[boolean, ObserveResult[]]>;
|
|
3146
|
-
/**
|
|
3147
|
-
* Extract information from the given Playwright Page object.
|
|
3148
|
-
*/
|
|
3149
|
-
extract<T>(options: ExtractOptions<T>, page: any): Promise<[boolean, T[]]>;
|
|
3150
|
-
/**
|
|
3151
|
-
* Async version of extract method.
|
|
3152
|
-
*/
|
|
3153
|
-
extractAsync<T>(options: ExtractOptions<T>, page: any): Promise<[boolean, T[]]>;
|
|
3154
|
-
private _getPageAndContextIndex;
|
|
3155
|
-
private _getPageAndContextIndexAsync;
|
|
3156
|
-
private _callMcpTool;
|
|
3157
|
-
}
|
|
3158
|
-
|
|
3159
|
-
interface BrowserViewport {
|
|
3160
|
-
width: number;
|
|
3161
|
-
height: number;
|
|
3162
|
-
}
|
|
3163
|
-
interface BrowserScreen {
|
|
3164
|
-
width: number;
|
|
3165
|
-
height: number;
|
|
3166
|
-
}
|
|
3167
|
-
interface BrowserFingerprint {
|
|
3168
|
-
devices?: Array<'desktop' | 'mobile'>;
|
|
3169
|
-
operatingSystems?: Array<'windows' | 'macos' | 'linux' | 'android' | 'ios'>;
|
|
3170
|
-
locales?: string[];
|
|
3171
|
-
}
|
|
3172
|
-
interface BrowserProxy {
|
|
3173
|
-
type: 'custom' | 'wuying';
|
|
3174
|
-
server?: string;
|
|
3175
|
-
username?: string;
|
|
3176
|
-
password?: string;
|
|
3177
|
-
strategy?: 'restricted' | 'polling';
|
|
3178
|
-
pollsize?: number;
|
|
3179
|
-
toMap(): Record<string, any>;
|
|
3180
|
-
}
|
|
3181
|
-
declare class BrowserProxyClass implements BrowserProxy {
|
|
3182
|
-
type: 'custom' | 'wuying';
|
|
3183
|
-
server?: string;
|
|
3184
|
-
username?: string;
|
|
3185
|
-
password?: string;
|
|
3186
|
-
strategy?: 'restricted' | 'polling';
|
|
3187
|
-
pollsize?: number;
|
|
3188
|
-
constructor(proxyType: 'custom' | 'wuying', server?: string, username?: string, password?: string, strategy?: 'restricted' | 'polling', pollsize?: number);
|
|
3189
|
-
toMap(): Record<string, any>;
|
|
3190
|
-
static fromMap(m: Record<string, any> | null | undefined): BrowserProxyClass | null;
|
|
3191
|
-
}
|
|
3192
|
-
interface BrowserOption {
|
|
3193
|
-
persistentPath?: string;
|
|
3194
|
-
useStealth?: boolean;
|
|
3195
|
-
userAgent?: string;
|
|
3196
|
-
viewport?: BrowserViewport;
|
|
3197
|
-
screen?: BrowserScreen;
|
|
3198
|
-
fingerprint?: BrowserFingerprint;
|
|
3199
|
-
solveCaptchas?: boolean;
|
|
3200
|
-
proxies?: BrowserProxy[];
|
|
3201
|
-
/** Path to the extensions directory. Defaults to "/tmp/extensions/" */
|
|
3202
|
-
extensionPath?: string;
|
|
3203
|
-
}
|
|
3204
|
-
declare class BrowserOptionClass implements BrowserOption {
|
|
3205
|
-
persistentPath?: string;
|
|
3206
|
-
useStealth?: boolean;
|
|
3207
|
-
userAgent?: string;
|
|
3208
|
-
viewport?: BrowserViewport;
|
|
3209
|
-
screen?: BrowserScreen;
|
|
3210
|
-
fingerprint?: BrowserFingerprint;
|
|
3211
|
-
solveCaptchas?: boolean;
|
|
3212
|
-
proxies?: BrowserProxy[];
|
|
3213
|
-
extensionPath?: string;
|
|
3214
|
-
constructor(useStealth?: boolean, userAgent?: string, viewport?: BrowserViewport, screen?: BrowserScreen, fingerprint?: BrowserFingerprint, solveCaptchas?: boolean, proxies?: BrowserProxy[]);
|
|
3215
|
-
toMap(): Record<string, any>;
|
|
3216
|
-
fromMap(m: Record<string, any> | null | undefined): BrowserOptionClass;
|
|
3217
|
-
}
|
|
3218
|
-
declare class Browser {
|
|
3219
|
-
private session;
|
|
3220
|
-
private _endpointUrl;
|
|
3221
|
-
private _initialized;
|
|
3222
|
-
private _option;
|
|
3223
|
-
agent: BrowserAgent;
|
|
3224
|
-
constructor(session: Session);
|
|
3225
|
-
/**
|
|
3226
|
-
* Initialize the browser instance with the given options.
|
|
3227
|
-
* Returns true if successful, false otherwise.
|
|
3228
|
-
*/
|
|
3229
|
-
initialize(option: BrowserOptionClass | BrowserOption): boolean;
|
|
3230
|
-
/**
|
|
3231
|
-
* Initialize the browser instance with the given options asynchronously.
|
|
3232
|
-
* Returns true if successful, false otherwise.
|
|
3233
|
-
*/
|
|
3234
|
-
initializeAsync(option: BrowserOptionClass | BrowserOption): Promise<boolean>;
|
|
3235
|
-
/**
|
|
3236
|
-
* Returns the endpoint URL if the browser is initialized, otherwise throws an exception.
|
|
3237
|
-
* When initialized, always fetches the latest CDP url from session.getLink().
|
|
3238
|
-
*/
|
|
3239
|
-
getEndpointUrl(): Promise<string>;
|
|
3240
|
-
/**
|
|
3241
|
-
* Returns the current BrowserOption used to initialize the browser, or null if not set.
|
|
3242
|
-
*/
|
|
3243
|
-
getOption(): BrowserOptionClass | null;
|
|
3244
|
-
/**
|
|
3245
|
-
* Returns true if the browser was initialized, false otherwise.
|
|
3246
|
-
*/
|
|
3247
|
-
isInitialized(): boolean;
|
|
3734
|
+
focusMode(on: boolean): Promise<BoolResult$2>;
|
|
3248
3735
|
/**
|
|
3249
|
-
*
|
|
3736
|
+
* Gets the currently active window.
|
|
3737
|
+
* Corresponds to Python's get_active_window() method
|
|
3738
|
+
*
|
|
3739
|
+
* @param timeoutMs - The timeout in milliseconds. Default is 3000ms.
|
|
3740
|
+
* @returns WindowInfoResult with active window information and requestId
|
|
3741
|
+
*
|
|
3742
|
+
* @deprecated Use session.computer.getActiveWindow() instead.
|
|
3250
3743
|
*/
|
|
3251
|
-
|
|
3744
|
+
getActiveWindow(timeoutMs?: number): Promise<WindowInfoResult>;
|
|
3252
3745
|
}
|
|
3253
3746
|
|
|
3254
3747
|
/**
|
|
@@ -3273,9 +3766,13 @@ interface McpToolsResult extends OperationResult {
|
|
|
3273
3766
|
declare class Session {
|
|
3274
3767
|
private agentBay;
|
|
3275
3768
|
sessionId: string;
|
|
3769
|
+
fileTransferContextId: string | null;
|
|
3276
3770
|
isVpc: boolean;
|
|
3277
3771
|
networkInterfaceIp: string;
|
|
3278
3772
|
httpPort: string;
|
|
3773
|
+
token: string;
|
|
3774
|
+
resourceUrl: string;
|
|
3775
|
+
enableBrowserReplay: boolean;
|
|
3279
3776
|
fileSystem: FileSystem;
|
|
3280
3777
|
command: Command;
|
|
3281
3778
|
code: Code;
|
|
@@ -3283,6 +3780,8 @@ declare class Session {
|
|
|
3283
3780
|
application: Application;
|
|
3284
3781
|
window: WindowManager;
|
|
3285
3782
|
ui: UI;
|
|
3783
|
+
computer: Computer;
|
|
3784
|
+
mobile: Mobile;
|
|
3286
3785
|
agent: Agent;
|
|
3287
3786
|
browser: Browser;
|
|
3288
3787
|
context: ContextManager;
|
|
@@ -3294,6 +3793,10 @@ declare class Session {
|
|
|
3294
3793
|
* @param sessionId - The ID of this session.
|
|
3295
3794
|
*/
|
|
3296
3795
|
constructor(agentBay: AgentBay, sessionId: string);
|
|
3796
|
+
/**
|
|
3797
|
+
* Return the AgentBay instance that created this session.
|
|
3798
|
+
*/
|
|
3799
|
+
getAgentBay(): AgentBay;
|
|
3297
3800
|
/**
|
|
3298
3801
|
* Return the API key for this session.
|
|
3299
3802
|
*/
|
|
@@ -3318,6 +3821,10 @@ declare class Session {
|
|
|
3318
3821
|
* Return the HTTP port for VPC sessions.
|
|
3319
3822
|
*/
|
|
3320
3823
|
getHttpPort(): string;
|
|
3824
|
+
/**
|
|
3825
|
+
* Return the token for VPC sessions.
|
|
3826
|
+
*/
|
|
3827
|
+
getToken(): string;
|
|
3321
3828
|
/**
|
|
3322
3829
|
* Find the server that provides the given tool.
|
|
3323
3830
|
*/
|
|
@@ -3362,7 +3869,7 @@ declare class Session {
|
|
|
3362
3869
|
* Get a link associated with the current session.
|
|
3363
3870
|
*
|
|
3364
3871
|
* @param protocolType - Optional protocol type to use for the link
|
|
3365
|
-
* @param port - Optional port to use for the link
|
|
3872
|
+
* @param port - Optional port to use for the link (must be in range [30100, 30199])
|
|
3366
3873
|
* @returns OperationResult containing the link as data and request ID
|
|
3367
3874
|
* @throws Error if the operation fails (matching Python SessionError)
|
|
3368
3875
|
*/
|
|
@@ -3371,7 +3878,7 @@ declare class Session {
|
|
|
3371
3878
|
* Asynchronously get a link associated with the current session.
|
|
3372
3879
|
*
|
|
3373
3880
|
* @param protocolType - Optional protocol type to use for the link
|
|
3374
|
-
* @param port - Optional port to use for the link
|
|
3881
|
+
* @param port - Optional port to use for the link (must be in range [30100, 30199])
|
|
3375
3882
|
* @returns OperationResult containing the link as data and request ID
|
|
3376
3883
|
* @throws Error if the operation fails (matching Python SessionError)
|
|
3377
3884
|
*/
|
|
@@ -3730,8 +4237,10 @@ interface CreateSessionParamsConfig {
|
|
|
3730
4237
|
browserContext?: BrowserContext;
|
|
3731
4238
|
/** Whether to create a VPC-based session. Defaults to false. */
|
|
3732
4239
|
isVpc?: boolean;
|
|
3733
|
-
/**
|
|
3734
|
-
|
|
4240
|
+
/** Policy id to apply when creating the session. */
|
|
4241
|
+
policyId?: string;
|
|
4242
|
+
/** Whether to enable browser recording for the session. Defaults to false. */
|
|
4243
|
+
enableBrowserReplay?: boolean;
|
|
3735
4244
|
}
|
|
3736
4245
|
/**
|
|
3737
4246
|
* CreateSessionParams provides a way to configure the parameters for creating a new session
|
|
@@ -3751,8 +4260,10 @@ declare class CreateSessionParams$1 implements CreateSessionParamsConfig {
|
|
|
3751
4260
|
browserContext?: BrowserContext;
|
|
3752
4261
|
/** Whether to create a VPC-based session. Defaults to false. */
|
|
3753
4262
|
isVpc: boolean;
|
|
3754
|
-
/**
|
|
3755
|
-
|
|
4263
|
+
/** Policy id to apply when creating the session. */
|
|
4264
|
+
policyId?: string;
|
|
4265
|
+
/** Whether to enable browser recording for the session. Defaults to false. */
|
|
4266
|
+
enableBrowserReplay: boolean;
|
|
3756
4267
|
constructor();
|
|
3757
4268
|
/**
|
|
3758
4269
|
* WithLabels sets the labels for the session parameters and returns the updated parameters.
|
|
@@ -3771,9 +4282,17 @@ declare class CreateSessionParams$1 implements CreateSessionParamsConfig {
|
|
|
3771
4282
|
*/
|
|
3772
4283
|
withIsVpc(isVpc: boolean): CreateSessionParams$1;
|
|
3773
4284
|
/**
|
|
3774
|
-
*
|
|
4285
|
+
* WithPolicyId sets the policy id for the session parameters and returns the updated parameters.
|
|
4286
|
+
*/
|
|
4287
|
+
withPolicyId(policyId: string): CreateSessionParams$1;
|
|
4288
|
+
/**
|
|
4289
|
+
* WithenableBrowserReplay sets the browser recording flag for the session parameters and returns the updated parameters.
|
|
4290
|
+
*/
|
|
4291
|
+
withEnableBrowserReplay(enableBrowserReplay: boolean): CreateSessionParams$1;
|
|
4292
|
+
/**
|
|
4293
|
+
* Alias for withEnableBrowserReplay for backward compatibility.
|
|
3775
4294
|
*/
|
|
3776
|
-
|
|
4295
|
+
withEnableRecord(enableRecord: boolean): CreateSessionParams$1;
|
|
3777
4296
|
/**
|
|
3778
4297
|
* GetLabelsJSON returns the labels as a JSON string.
|
|
3779
4298
|
* Returns an object with success status and result/error message to match Go version behavior.
|
|
@@ -3821,11 +4340,10 @@ interface ListSessionParams {
|
|
|
3821
4340
|
}
|
|
3822
4341
|
/**
|
|
3823
4342
|
* Result type for session listing with pagination information
|
|
3824
|
-
* Maintain consistency with the existing TypeScript SDK return structure and use the data field
|
|
3825
4343
|
*/
|
|
3826
4344
|
interface SessionListResult extends ApiResponse {
|
|
3827
|
-
/** Array of
|
|
3828
|
-
|
|
4345
|
+
/** Array of session IDs */
|
|
4346
|
+
sessionIds: string[];
|
|
3829
4347
|
/** Token for the next page (if available) */
|
|
3830
4348
|
nextToken?: string;
|
|
3831
4349
|
/** Number of results per page */
|
|
@@ -3843,7 +4361,8 @@ interface CreateSessionParams {
|
|
|
3843
4361
|
contextSync?: ContextSync[];
|
|
3844
4362
|
browserContext?: BrowserContext;
|
|
3845
4363
|
isVpc?: boolean;
|
|
3846
|
-
|
|
4364
|
+
policyId?: string;
|
|
4365
|
+
enableBrowserReplay?: boolean;
|
|
3847
4366
|
}
|
|
3848
4367
|
/**
|
|
3849
4368
|
* Main class for interacting with the AgentBay cloud runtime environment.
|
|
@@ -3851,9 +4370,9 @@ interface CreateSessionParams {
|
|
|
3851
4370
|
declare class AgentBay {
|
|
3852
4371
|
private apiKey;
|
|
3853
4372
|
private client;
|
|
3854
|
-
private regionId;
|
|
3855
4373
|
private endpoint;
|
|
3856
4374
|
private sessions;
|
|
4375
|
+
private fileTransferContext;
|
|
3857
4376
|
/**
|
|
3858
4377
|
* Context service for managing persistent contexts.
|
|
3859
4378
|
*/
|
|
@@ -3864,11 +4383,20 @@ declare class AgentBay {
|
|
|
3864
4383
|
* @param options - Configuration options
|
|
3865
4384
|
* @param options.apiKey - API key for authentication. If not provided, will look for AGENTBAY_API_KEY environment variable.
|
|
3866
4385
|
* @param options.config - Custom configuration object. If not provided, will use environment-based configuration.
|
|
4386
|
+
* @param options.envFile - Custom path to .env file. If not provided, will search upward from current directory.
|
|
3867
4387
|
*/
|
|
3868
4388
|
constructor(options?: {
|
|
3869
4389
|
apiKey?: string;
|
|
3870
4390
|
config?: Config;
|
|
4391
|
+
envFile?: string;
|
|
3871
4392
|
});
|
|
4393
|
+
/**
|
|
4394
|
+
* Update browser replay context with AppInstanceId from response data.
|
|
4395
|
+
*
|
|
4396
|
+
* @param responseData - Response data containing AppInstanceId
|
|
4397
|
+
* @param recordContextId - The record context ID to update
|
|
4398
|
+
*/
|
|
4399
|
+
private _updateBrowserReplayContext;
|
|
3872
4400
|
/**
|
|
3873
4401
|
* Create a new session in the AgentBay cloud environment.
|
|
3874
4402
|
*
|
|
@@ -3876,22 +4404,49 @@ declare class AgentBay {
|
|
|
3876
4404
|
* @returns SessionResult containing the created session and request ID
|
|
3877
4405
|
*/
|
|
3878
4406
|
create(params?: CreateSessionParams): Promise<SessionResult>;
|
|
3879
|
-
/**
|
|
3880
|
-
* List all available sessions.
|
|
3881
|
-
*
|
|
3882
|
-
* @returns A list of session objects.
|
|
3883
|
-
*/
|
|
3884
|
-
list(): Session[];
|
|
3885
4407
|
/**
|
|
3886
4408
|
* List sessions filtered by the provided labels with pagination support.
|
|
3887
4409
|
* It returns sessions that match all the specified labels.
|
|
3888
4410
|
*
|
|
4411
|
+
* @deprecated This method is deprecated and will be removed in a future version. Use list() instead.
|
|
4412
|
+
*
|
|
3889
4413
|
* **Breaking Change**: This method currently only accepts ListSessionParams parameters,
|
|
3890
4414
|
*
|
|
3891
4415
|
* @param params - Parameters including labels and pagination options (required)
|
|
3892
4416
|
* @returns API response with sessions list and pagination info
|
|
3893
4417
|
*/
|
|
3894
4418
|
listByLabels(params?: ListSessionParams): Promise<SessionListResult>;
|
|
4419
|
+
/**
|
|
4420
|
+
* Returns paginated list of session IDs filtered by labels.
|
|
4421
|
+
*
|
|
4422
|
+
* @param labels - Optional labels to filter sessions (defaults to empty object)
|
|
4423
|
+
* @param page - Optional page number for pagination (starting from 1, defaults to 1)
|
|
4424
|
+
* @param limit - Optional maximum number of items per page (defaults to 10)
|
|
4425
|
+
* @returns SessionListResult - Paginated list of session IDs that match the labels
|
|
4426
|
+
*
|
|
4427
|
+
* @example
|
|
4428
|
+
* ```typescript
|
|
4429
|
+
* const agentBay = new AgentBay({ apiKey: "your_api_key" });
|
|
4430
|
+
*
|
|
4431
|
+
* // List all sessions
|
|
4432
|
+
* const result = await agentBay.list();
|
|
4433
|
+
*
|
|
4434
|
+
* // List sessions with specific labels
|
|
4435
|
+
* const result = await agentBay.list({ project: "demo" });
|
|
4436
|
+
*
|
|
4437
|
+
* // List sessions with pagination
|
|
4438
|
+
* const result = await agentBay.list({ "my-label": "my-value" }, 2, 10);
|
|
4439
|
+
*
|
|
4440
|
+
* if (result.success) {
|
|
4441
|
+
* for (const sessionId of result.sessionIds) {
|
|
4442
|
+
* console.log(`Session ID: ${sessionId}`);
|
|
4443
|
+
* }
|
|
4444
|
+
* console.log(`Total count: ${result.totalCount}`);
|
|
4445
|
+
* console.log(`Request ID: ${result.requestId}`);
|
|
4446
|
+
* }
|
|
4447
|
+
* ```
|
|
4448
|
+
*/
|
|
4449
|
+
list(labels?: Record<string, string>, page?: number, limit?: number): Promise<SessionListResult>;
|
|
3895
4450
|
/**
|
|
3896
4451
|
* Delete a session by session object.
|
|
3897
4452
|
*
|
|
@@ -3905,6 +4460,32 @@ declare class AgentBay {
|
|
|
3905
4460
|
* @param sessionId - The ID of the session to remove.
|
|
3906
4461
|
*/
|
|
3907
4462
|
removeSession(sessionId: string): void;
|
|
4463
|
+
/**
|
|
4464
|
+
* Get session information by session ID.
|
|
4465
|
+
*
|
|
4466
|
+
* @param sessionId - The ID of the session to retrieve.
|
|
4467
|
+
* @returns GetSessionResult containing session information
|
|
4468
|
+
*/
|
|
4469
|
+
getSession(sessionId: string): Promise<GetSessionResult>;
|
|
4470
|
+
/**
|
|
4471
|
+
* Get a session by its ID.
|
|
4472
|
+
*
|
|
4473
|
+
* This method retrieves a session by calling the GetSession API
|
|
4474
|
+
* and returns a SessionResult containing the Session object and request ID.
|
|
4475
|
+
*
|
|
4476
|
+
* @param sessionId - The ID of the session to retrieve
|
|
4477
|
+
* @returns Promise resolving to SessionResult with the Session instance, request ID, and success status
|
|
4478
|
+
*
|
|
4479
|
+
* @example
|
|
4480
|
+
* ```typescript
|
|
4481
|
+
* const result = await agentBay.get("my-session-id");
|
|
4482
|
+
* if (result.success) {
|
|
4483
|
+
* console.log(result.session.sessionId);
|
|
4484
|
+
* console.log(result.requestId);
|
|
4485
|
+
* }
|
|
4486
|
+
* ```
|
|
4487
|
+
*/
|
|
4488
|
+
get(sessionId: string): Promise<SessionResult>;
|
|
3908
4489
|
getClient(): Client;
|
|
3909
4490
|
getAPIKey(): string;
|
|
3910
4491
|
}
|
|
@@ -3988,4 +4569,4 @@ declare function log(message: string, ...args: any[]): void;
|
|
|
3988
4569
|
*/
|
|
3989
4570
|
declare function logError(message: string, error?: any): void;
|
|
3990
4571
|
|
|
3991
|
-
export { APIError, type ActOptions, ActResult, Agent, AgentBay, AgentBayError, Application, ApplicationError, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, type BWList, Browser, BrowserAgent, BrowserContext, BrowserError, type BrowserFingerprint, type BrowserOption, BrowserOptionClass, type BrowserProxy, BrowserProxyClass, type BrowserScreen, type BrowserViewport, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, Client, Command, CommandError, type Config, Context, type ContextInfoResult, ContextManager, ContextService, type ContextStatusData, type ContextStatusItem, ContextSync, type ContextSyncResult, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, type CreateSessionParams, type CreateSessionParamsConfig, DeleteContextFileRequest, DeleteContextFileResponse, DeleteContextFileResponseBody, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DeletePolicy, DescribeContextFilesRequest, DescribeContextFilesResponse, DescribeContextFilesResponseBody, type DirectoryEntry, type DownloadPolicy, DownloadStrategy, type ExecutionResult, Extension, ExtensionOption, ExtensionsService, type ExtractOptions, type ExtractPolicy, ExtractPolicyClass, type FileChangeEvent, FileChangeEventHelper, type FileChangeResult, FileChangeResultHelper, FileError, type FileInfo, FileSystem, GetContextFileDownloadUrlRequest, GetContextFileDownloadUrlResponse, GetContextFileDownloadUrlResponseBody, GetContextFileUploadUrlRequest, GetContextFileUploadUrlResponse, GetContextFileUploadUrlResponseBody, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, InitBrowserRequest, InitBrowserResponse, InitBrowserResponseBody, InitBrowserResponseBodyData, type InstalledApp, KeyCode, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, type McpSession, type McpToolResult, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, type ObserveOptions, ObserveResult, Oss, OssError, type Process, type QueryResult, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, Session, SessionError, type SessionInterface, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, type SyncPolicy, SyncPolicyImpl, UI, type UIElement, UIError, type UploadPolicy, UploadStrategy, type WhiteList, loadConfig, loadDotEnv, log, logError, newContextManager, newContextSync, newCreateSessionParams, newDeletePolicy, newDownloadPolicy, newExtractPolicy, newSyncPolicy, newSyncPolicyWithDefaults, newUploadPolicy };
|
|
4572
|
+
export { APIError, type ActOptions, ActResult, Agent, AgentBay, AgentBayError, Application, ApplicationError, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, type BWList, Browser, BrowserAgent, BrowserContext, BrowserError, type BrowserFingerprint, type BrowserOption, BrowserOptionClass, type BrowserProxy, BrowserProxyClass, type BrowserScreen, type BrowserViewport, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, Client, Command, CommandError, type Config, Context, type ContextInfoResult, ContextManager, ContextService, type ContextStatusData, type ContextStatusItem, ContextSync, type ContextSyncResult, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, type CreateSessionParams, type CreateSessionParamsConfig, DeleteContextFileRequest, DeleteContextFileResponse, DeleteContextFileResponseBody, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DeletePolicy, DescribeContextFilesRequest, DescribeContextFilesResponse, DescribeContextFilesResponseBody, type DirectoryEntry, type DownloadPolicy, DownloadStrategy, type ExecutionResult, Extension, ExtensionOption, ExtensionsService, type ExtractOptions, type ExtractPolicy, ExtractPolicyClass, type FileChangeEvent, FileChangeEventHelper, type FileChangeResult, FileChangeResultHelper, FileError, type FileInfo, FileSystem, GetContextFileDownloadUrlRequest, GetContextFileDownloadUrlResponse, GetContextFileDownloadUrlResponseBody, GetContextFileUploadUrlRequest, GetContextFileUploadUrlResponse, GetContextFileUploadUrlResponseBody, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, GetSessionRequest, GetSessionResponse, GetSessionResponseBody, GetSessionResponseBodyData, InitBrowserRequest, InitBrowserResponse, InitBrowserResponseBody, InitBrowserResponseBodyData, type InstalledApp$1 as InstalledApp, KeyCode, Lifecycle, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, type McpSession, type McpToolResult, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, type ObserveOptions, ObserveResult, Oss, OssError, type Process$1 as Process, type QueryResult, type RecyclePolicy, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, Session, SessionError, type SessionInterface, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, type SyncCallback, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, type SyncPolicy, SyncPolicyImpl, UI, type UIElement, UIError, type UploadPolicy, UploadStrategy, type WhiteList, WhiteListValidator, loadConfig, loadDotEnv, log, logError, newContextManager, newContextSync, newCreateSessionParams, newDeletePolicy, newDownloadPolicy, newExtractPolicy, newRecyclePolicy, newSyncPolicy, newSyncPolicyWithDefaults, newUploadPolicy, validateSyncPolicy };
|