browser-use-sdk 3.3.0 → 3.3.2

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/dist/v3.d.ts CHANGED
@@ -4,6 +4,248 @@ export { B as BrowserUseError } from './errors-BtB79l7x.js';
4
4
 
5
5
  interface components {
6
6
  schemas: {
7
+ /**
8
+ * AccountNotFoundError
9
+ * @description Error response when an account is not found
10
+ */
11
+ AccountNotFoundError: {
12
+ /**
13
+ * Detail
14
+ * @default Account not found
15
+ */
16
+ detail: string;
17
+ };
18
+ /**
19
+ * AccountView
20
+ * @description View model for account information.
21
+ */
22
+ AccountView: {
23
+ /**
24
+ * Name
25
+ * @description The name of the user
26
+ */
27
+ name?: string | null;
28
+ /**
29
+ * Credits Balance USD
30
+ * @description The total credits balance in USD
31
+ */
32
+ totalCreditsBalanceUsd: number;
33
+ /**
34
+ * Monthly Credits Balance USD
35
+ * @description Monthly subscription credits balance in USD
36
+ */
37
+ monthlyCreditsBalanceUsd: number;
38
+ /**
39
+ * Additional Credits Balance USD
40
+ * @description Additional top-up credits balance in USD
41
+ */
42
+ additionalCreditsBalanceUsd: number;
43
+ /**
44
+ * Rate Limit
45
+ * @description The rate limit for the account
46
+ */
47
+ rateLimit: number;
48
+ /**
49
+ * Plan Info
50
+ * @description The plan information
51
+ */
52
+ planInfo: components["schemas"]["PlanInfo"];
53
+ /**
54
+ * Project ID
55
+ * Format: uuid
56
+ * @description The ID of the project
57
+ */
58
+ projectId: string;
59
+ };
60
+ /**
61
+ * BrowserSessionItemView
62
+ * @description View model for representing a browser session in list views.
63
+ */
64
+ BrowserSessionItemView: {
65
+ /**
66
+ * ID
67
+ * Format: uuid
68
+ * @description Unique identifier for the session
69
+ */
70
+ id: string;
71
+ /**
72
+ * Status
73
+ * @description Current status of the session (active/stopped)
74
+ */
75
+ status: components["schemas"]["BrowserSessionStatus"];
76
+ /**
77
+ * Live URL
78
+ * @description URL where the browser can be viewed live in real-time
79
+ */
80
+ liveUrl?: string | null;
81
+ /**
82
+ * CDP URL
83
+ * @description Chrome DevTools Protocol URL for browser automation
84
+ */
85
+ cdpUrl?: string | null;
86
+ /**
87
+ * Timeout At
88
+ * Format: date-time
89
+ * @description Timestamp when the session will timeout
90
+ */
91
+ timeoutAt: string;
92
+ /**
93
+ * Started At
94
+ * Format: date-time
95
+ * @description Timestamp when the session was created and started
96
+ */
97
+ startedAt: string;
98
+ /**
99
+ * Finished At
100
+ * @description Timestamp when the session was stopped (None if still active)
101
+ */
102
+ finishedAt?: string | null;
103
+ /**
104
+ * Proxy Used MB
105
+ * @description Amount of proxy data used in MB
106
+ * @default 0
107
+ */
108
+ proxyUsedMb: string;
109
+ /**
110
+ * Proxy Cost
111
+ * @description Cost of proxy usage in USD
112
+ * @default 0
113
+ */
114
+ proxyCost: string;
115
+ /**
116
+ * Browser Cost
117
+ * @description Cost of browser session hosting in USD
118
+ * @default 0
119
+ */
120
+ browserCost: string;
121
+ /**
122
+ * Agent Session ID
123
+ * @description ID of the agent session that created this browser (None for standalone BaaS sessions)
124
+ */
125
+ agentSessionId?: string | null;
126
+ /**
127
+ * Recording URL
128
+ * @description Presigned URL to download the session recording (available after session ends, if recording was enabled)
129
+ */
130
+ recordingUrl?: string | null;
131
+ };
132
+ /**
133
+ * BrowserSessionListResponse
134
+ * @description Response model for paginated browser session list requests.
135
+ */
136
+ BrowserSessionListResponse: {
137
+ /**
138
+ * Items
139
+ * @description List of browser session views for the current page
140
+ */
141
+ items: components["schemas"]["BrowserSessionItemView"][];
142
+ /**
143
+ * Total Items
144
+ * @description Total number of items in the list
145
+ */
146
+ totalItems: number;
147
+ /**
148
+ * Page Number
149
+ * @description Page number
150
+ */
151
+ pageNumber: number;
152
+ /**
153
+ * Page Size
154
+ * @description Number of items per page
155
+ */
156
+ pageSize: number;
157
+ };
158
+ /**
159
+ * BrowserSessionStatus
160
+ * @description Enumeration of possible browser session states
161
+ *
162
+ * Attributes:
163
+ * ACTIVE: Session is currently active and running (browser is running)
164
+ * STOPPED: Session has been stopped and is no longer active (browser is stopped)
165
+ * @enum {string}
166
+ */
167
+ BrowserSessionStatus: "active" | "stopped";
168
+ /**
169
+ * BrowserSessionUpdateAction
170
+ * @description Available actions that can be performed on a browser session
171
+ *
172
+ * Attributes:
173
+ * STOP: Stop the browser session (cannot be undone)
174
+ * @enum {string}
175
+ */
176
+ BrowserSessionUpdateAction: "stop";
177
+ /**
178
+ * BrowserSessionView
179
+ * @description View model for representing a browser session.
180
+ */
181
+ BrowserSessionView: {
182
+ /**
183
+ * ID
184
+ * Format: uuid
185
+ * @description Unique identifier for the session
186
+ */
187
+ id: string;
188
+ /**
189
+ * Status
190
+ * @description Current status of the session (active/stopped)
191
+ */
192
+ status: components["schemas"]["BrowserSessionStatus"];
193
+ /**
194
+ * Live URL
195
+ * @description URL where the browser can be viewed live in real-time
196
+ */
197
+ liveUrl?: string | null;
198
+ /**
199
+ * CDP URL
200
+ * @description Chrome DevTools Protocol URL for browser automation
201
+ */
202
+ cdpUrl?: string | null;
203
+ /**
204
+ * Timeout At
205
+ * Format: date-time
206
+ * @description Timestamp when the session will timeout
207
+ */
208
+ timeoutAt: string;
209
+ /**
210
+ * Started At
211
+ * Format: date-time
212
+ * @description Timestamp when the session was created and started
213
+ */
214
+ startedAt: string;
215
+ /**
216
+ * Finished At
217
+ * @description Timestamp when the session was stopped (None if still active)
218
+ */
219
+ finishedAt?: string | null;
220
+ /**
221
+ * Proxy Used MB
222
+ * @description Amount of proxy data used in MB
223
+ * @default 0
224
+ */
225
+ proxyUsedMb: string;
226
+ /**
227
+ * Proxy Cost
228
+ * @description Cost of proxy usage in USD
229
+ * @default 0
230
+ */
231
+ proxyCost: string;
232
+ /**
233
+ * Browser Cost
234
+ * @description Cost of browser session hosting in USD
235
+ * @default 0
236
+ */
237
+ browserCost: string;
238
+ /**
239
+ * Agent Session ID
240
+ * @description ID of the agent session that created this browser (None for standalone BaaS sessions)
241
+ */
242
+ agentSessionId?: string | null;
243
+ /**
244
+ * Recording URL
245
+ * @description Presigned URL to download the session recording (available after session ends, if recording was enabled)
246
+ */
247
+ recordingUrl?: string | null;
248
+ };
7
249
  /**
8
250
  * BuAgentSessionStatus
9
251
  * @enum {string}
@@ -13,7 +255,83 @@ interface components {
13
255
  * BuModel
14
256
  * @enum {string}
15
257
  */
16
- BuModel: "bu-mini" | "bu-max";
258
+ BuModel: "bu-mini" | "bu-max" | "bu-ultra";
259
+ /**
260
+ * CreateBrowserSessionRequest
261
+ * @description Request model for creating a browser session.
262
+ */
263
+ CreateBrowserSessionRequest: {
264
+ /**
265
+ * Profile ID
266
+ * @description The ID of the profile to use for the session
267
+ */
268
+ profileId?: string | null;
269
+ /**
270
+ * Proxy Country Code
271
+ * @description Country code for proxy location. Defaults to US. Set to null to disable proxy.
272
+ * @default us
273
+ */
274
+ proxyCountryCode: components["schemas"]["ProxyCountryCode"] | null;
275
+ /**
276
+ * Timeout
277
+ * @description The timeout for the session in minutes. All users can use up to 240 minutes (4 hours). Pay As You Go users are charged $0.06/hour, subscribers get 50% off.
278
+ * @default 60
279
+ */
280
+ timeout: number;
281
+ /**
282
+ * Browser Screen Width
283
+ * @description Custom screen width in pixels for the browser.
284
+ */
285
+ browserScreenWidth?: number | null;
286
+ /**
287
+ * Browser Screen Height
288
+ * @description Custom screen height in pixels for the browser.
289
+ */
290
+ browserScreenHeight?: number | null;
291
+ /**
292
+ * Allow Resizing
293
+ * @description Whether to allow the browser to be resized during the session (not recommended since it reduces stealthiness).
294
+ * @default false
295
+ */
296
+ allowResizing: boolean;
297
+ /**
298
+ * Custom Proxy
299
+ * @description Custom proxy settings to use for the session. If not provided, our proxies will be used. Custom proxies are only available on the Custom Enterprise plan.
300
+ */
301
+ customProxy?: components["schemas"]["CustomProxy"] | null;
302
+ /**
303
+ * Enable Recording
304
+ * @description If True, enables session recording. Defaults to False.
305
+ * @default false
306
+ */
307
+ enableRecording: boolean;
308
+ };
309
+ /**
310
+ * CustomProxy
311
+ * @description Request model for creating a custom proxy.
312
+ */
313
+ CustomProxy: {
314
+ /**
315
+ * Host
316
+ * @description Host of the proxy.
317
+ */
318
+ host: string;
319
+ /**
320
+ * Port
321
+ * @description Port of the proxy.
322
+ */
323
+ port: number;
324
+ /**
325
+ * Username
326
+ * @description Username for proxy authentication.
327
+ */
328
+ username?: string | null;
329
+ /**
330
+ * Password
331
+ * @description Password for proxy authentication.
332
+ */
333
+ password?: string | null;
334
+ };
17
335
  /**
18
336
  * FileInfo
19
337
  * @description A file in a session's workspace.
@@ -109,6 +427,17 @@ interface components {
109
427
  /** Detail */
110
428
  detail?: components["schemas"]["ValidationError"][];
111
429
  };
430
+ /**
431
+ * InsufficientCreditsError
432
+ * @description Error response when there are insufficient credits
433
+ */
434
+ InsufficientCreditsError: {
435
+ /**
436
+ * Detail
437
+ * @default Insufficient credits
438
+ */
439
+ detail: string;
440
+ };
112
441
  /** MessageListResponse */
113
442
  MessageListResponse: {
114
443
  /** Messages */
@@ -132,12 +461,173 @@ interface components {
132
461
  role: string;
133
462
  /** Data */
134
463
  data: string;
464
+ /**
465
+ * Type
466
+ * @description Coarse category: user_message, assistant_message, browser_action, file_operation, code_execution, integration, planning, completion, browser_action_result, browser_action_error, etc.
467
+ * @default
468
+ */
469
+ type: string;
470
+ /**
471
+ * Summary
472
+ * @description One-liner human-readable description of the message (e.g. "Navigating to google.com", "Clicking element #5").
473
+ * @default
474
+ */
475
+ summary: string;
476
+ /** Screenshoturl */
477
+ screenshotUrl?: string | null;
135
478
  /**
136
479
  * Createdat
137
480
  * Format: date-time
138
481
  */
139
482
  createdAt: string;
140
483
  };
484
+ /**
485
+ * PlanInfo
486
+ * @description View model for plan information
487
+ */
488
+ PlanInfo: {
489
+ /**
490
+ * Plan Name
491
+ * @description The name of the plan
492
+ */
493
+ planName: string;
494
+ /**
495
+ * Subscription Status
496
+ * @description The status of the subscription
497
+ */
498
+ subscriptionStatus: string | null;
499
+ /**
500
+ * Subscription ID
501
+ * @description The ID of the subscription
502
+ */
503
+ subscriptionId: string | null;
504
+ /**
505
+ * Subscription Current Period End
506
+ * @description The end of the current period
507
+ */
508
+ subscriptionCurrentPeriodEnd: string | null;
509
+ /**
510
+ * Subscription Canceled At
511
+ * @description The date the subscription was canceled
512
+ */
513
+ subscriptionCanceledAt: string | null;
514
+ };
515
+ /**
516
+ * ProfileCreateRequest
517
+ * @description Request model for creating a new profile.
518
+ */
519
+ ProfileCreateRequest: {
520
+ /**
521
+ * Name
522
+ * @description Optional name for the profile
523
+ */
524
+ name?: string | null;
525
+ /**
526
+ * User ID
527
+ * @description Your internal user identifier for this profile. Use this to associate a profile with a user in your system.
528
+ */
529
+ userId?: string | null;
530
+ };
531
+ /**
532
+ * ProfileListResponse
533
+ * @description Response model for paginated profile list requests.
534
+ */
535
+ ProfileListResponse: {
536
+ /**
537
+ * Items
538
+ * @description List of profile views for the current page
539
+ */
540
+ items: components["schemas"]["ProfileView"][];
541
+ /**
542
+ * Total Items
543
+ * @description Total number of items in the list
544
+ */
545
+ totalItems: number;
546
+ /**
547
+ * Page Number
548
+ * @description Page number
549
+ */
550
+ pageNumber: number;
551
+ /**
552
+ * Page Size
553
+ * @description Number of items per page
554
+ */
555
+ pageSize: number;
556
+ };
557
+ /**
558
+ * ProfileNotFoundError
559
+ * @description Error response when a profile is not found
560
+ */
561
+ ProfileNotFoundError: {
562
+ /**
563
+ * Detail
564
+ * @default Profile not found
565
+ */
566
+ detail: string;
567
+ };
568
+ /**
569
+ * ProfileUpdateRequest
570
+ * @description Request model for updating a profile.
571
+ */
572
+ ProfileUpdateRequest: {
573
+ /**
574
+ * Name
575
+ * @description Optional name for the profile
576
+ */
577
+ name?: string | null;
578
+ /**
579
+ * User ID
580
+ * @description Your internal user identifier for this profile. Use this to associate a profile with a user in your system.
581
+ */
582
+ userId?: string | null;
583
+ };
584
+ /**
585
+ * ProfileView
586
+ * @description View model for representing a profile. A profile lets you preserve the login state between sessions.
587
+ *
588
+ * We recommend that you create a separate profile for each user of your app.
589
+ * You can assign a user_id to each profile to easily identify which user the profile belongs to.
590
+ */
591
+ ProfileView: {
592
+ /**
593
+ * ID
594
+ * Format: uuid
595
+ * @description Unique identifier for the profile
596
+ */
597
+ id: string;
598
+ /**
599
+ * User ID
600
+ * @description Your internal user identifier for this profile. Use this to associate a profile with a user in your system.
601
+ */
602
+ userId?: string | null;
603
+ /**
604
+ * Name
605
+ * @description Optional name for the profile
606
+ */
607
+ name?: string | null;
608
+ /**
609
+ * Last Used At
610
+ * @description Timestamp when the profile was last used
611
+ */
612
+ lastUsedAt?: string | null;
613
+ /**
614
+ * Created At
615
+ * Format: date-time
616
+ * @description Timestamp when the profile was created
617
+ */
618
+ createdAt: string;
619
+ /**
620
+ * Updated At
621
+ * Format: date-time
622
+ * @description Timestamp when the profile was last updated
623
+ */
624
+ updatedAt: string;
625
+ /**
626
+ * Cookie Domains
627
+ * @description List of domain URLs that have cookies stored for this profile
628
+ */
629
+ cookieDomains?: string[] | null;
630
+ };
141
631
  /**
142
632
  * ProxyCountryCode
143
633
  * @enum {string}
@@ -155,7 +645,7 @@ interface components {
155
645
  RunTaskRequest: {
156
646
  /** Task */
157
647
  task?: string | null;
158
- /** @default bu-mini */
648
+ /** @default bu-max */
159
649
  model: components["schemas"]["BuModel"];
160
650
  /** Sessionid */
161
651
  sessionId?: string | null;
@@ -170,11 +660,32 @@ interface components {
170
660
  profileId?: string | null;
171
661
  /** Workspaceid */
172
662
  workspaceId?: string | null;
173
- proxyCountryCode?: components["schemas"]["ProxyCountryCode"] | null;
663
+ /** @default us */
664
+ proxyCountryCode: components["schemas"]["ProxyCountryCode"] | null;
174
665
  /** Outputschema */
175
666
  outputSchema?: {
176
667
  [key: string]: unknown;
177
668
  } | null;
669
+ /**
670
+ * Enablescheduledtasks
671
+ * @default false
672
+ */
673
+ enableScheduledTasks: boolean;
674
+ /**
675
+ * Enablerecording
676
+ * @default false
677
+ */
678
+ enableRecording: boolean;
679
+ /**
680
+ * Skills
681
+ * @default true
682
+ */
683
+ skills: boolean;
684
+ /**
685
+ * Agentmail
686
+ * @default true
687
+ */
688
+ agentmail: boolean;
178
689
  };
179
690
  /** SessionListResponse */
180
691
  SessionListResponse: {
@@ -187,6 +698,17 @@ interface components {
187
698
  /** Pagesize */
188
699
  pageSize: number;
189
700
  };
701
+ /**
702
+ * SessionNotFoundError
703
+ * @description Error response when a session is not found
704
+ */
705
+ SessionNotFoundError: {
706
+ /**
707
+ * Detail
708
+ * @default Session not found
709
+ */
710
+ detail: string;
711
+ };
190
712
  /** SessionResponse */
191
713
  SessionResponse: {
192
714
  /**
@@ -204,8 +726,22 @@ interface components {
204
726
  outputSchema?: {
205
727
  [key: string]: unknown;
206
728
  } | null;
729
+ /**
730
+ * Stepcount
731
+ * @default 0
732
+ */
733
+ stepCount: number;
734
+ /** Laststepsummary */
735
+ lastStepSummary?: string | null;
736
+ /** Istasksuccessful */
737
+ isTaskSuccessful?: boolean | null;
207
738
  /** Liveurl */
208
739
  liveUrl?: string | null;
740
+ /**
741
+ * Recordingurls
742
+ * @default []
743
+ */
744
+ recordingUrls: string[];
209
745
  /** Profileid */
210
746
  profileId?: string | null;
211
747
  /** Workspaceid */
@@ -238,11 +774,20 @@ interface components {
238
774
  * @default 0
239
775
  */
240
776
  proxyCostUsd: string;
777
+ /**
778
+ * Browsercostusd
779
+ * @default 0
780
+ */
781
+ browserCostUsd: string;
241
782
  /**
242
783
  * Totalcostusd
243
784
  * @default 0
244
785
  */
245
786
  totalCostUsd: string;
787
+ /** Screenshoturl */
788
+ screenshotUrl?: string | null;
789
+ /** Agentmailemail */
790
+ agentmailEmail?: string | null;
246
791
  /**
247
792
  * Createdat
248
793
  * Format: date-time
@@ -254,6 +799,17 @@ interface components {
254
799
  */
255
800
  updatedAt: string;
256
801
  };
802
+ /**
803
+ * SessionTimeoutLimitExceededError
804
+ * @description Error response when session timeout exceeds the maximum allowed limit
805
+ */
806
+ SessionTimeoutLimitExceededError: {
807
+ /**
808
+ * Detail
809
+ * @default Maximum session timeout is 4 hours (240 minutes).
810
+ */
811
+ detail: string;
812
+ };
257
813
  /** StopSessionRequest */
258
814
  StopSessionRequest: {
259
815
  /** @default session */
@@ -264,6 +820,28 @@ interface components {
264
820
  * @enum {string}
265
821
  */
266
822
  StopStrategy: "task" | "session";
823
+ /**
824
+ * TooManyConcurrentActiveSessionsError
825
+ * @description Error response when user has too many concurrent active sessions
826
+ */
827
+ TooManyConcurrentActiveSessionsError: {
828
+ /**
829
+ * Detail
830
+ * @default Too many concurrent active sessions. Please wait for one to finish, kill one, or upgrade your plan.
831
+ */
832
+ detail: string;
833
+ };
834
+ /**
835
+ * UpdateBrowserSessionRequest
836
+ * @description Request model for updating browser session state.
837
+ */
838
+ UpdateBrowserSessionRequest: {
839
+ /**
840
+ * Action
841
+ * @description The action to perform on the session
842
+ */
843
+ action: components["schemas"]["BrowserSessionUpdateAction"];
844
+ };
267
845
  /** ValidationError */
268
846
  ValidationError: {
269
847
  /** Location */
@@ -358,6 +936,62 @@ interface components {
358
936
  pathItems: never;
359
937
  }
360
938
 
939
+ type AccountView$1 = components["schemas"]["AccountView"];
940
+ declare class Billing {
941
+ private readonly http;
942
+ constructor(http: HttpClient);
943
+ /** Get account billing information. */
944
+ account(): Promise<AccountView$1>;
945
+ }
946
+
947
+ type CreateBrowserSessionRequest$1 = components["schemas"]["CreateBrowserSessionRequest"];
948
+ type BrowserSessionItemView$1 = components["schemas"]["BrowserSessionItemView"];
949
+ type BrowserSessionView$1 = components["schemas"]["BrowserSessionView"];
950
+ type BrowserSessionListResponse$1 = components["schemas"]["BrowserSessionListResponse"];
951
+ type UpdateBrowserSessionRequest$1 = components["schemas"]["UpdateBrowserSessionRequest"];
952
+ interface BrowserListParams {
953
+ page?: number;
954
+ page_size?: number;
955
+ }
956
+ declare class Browsers {
957
+ private readonly http;
958
+ constructor(http: HttpClient);
959
+ /** Create a standalone browser session. */
960
+ create(body?: CreateBrowserSessionRequest$1): Promise<BrowserSessionItemView$1>;
961
+ /** List browser sessions for the authenticated project. */
962
+ list(params?: BrowserListParams): Promise<BrowserSessionListResponse$1>;
963
+ /** Get browser session details. */
964
+ get(sessionId: string): Promise<BrowserSessionView$1>;
965
+ /** Update a browser session (e.g. stop it). */
966
+ update(sessionId: string, body: UpdateBrowserSessionRequest$1): Promise<BrowserSessionView$1>;
967
+ /** Stop a browser session. Convenience wrapper around update. */
968
+ stop(sessionId: string): Promise<BrowserSessionView$1>;
969
+ }
970
+
971
+ type ProfileView$1 = components["schemas"]["ProfileView"];
972
+ type ProfileListResponse$1 = components["schemas"]["ProfileListResponse"];
973
+ type ProfileCreateRequest$1 = components["schemas"]["ProfileCreateRequest"];
974
+ type ProfileUpdateRequest$1 = components["schemas"]["ProfileUpdateRequest"];
975
+ interface ProfileListParams {
976
+ query?: string;
977
+ page?: number;
978
+ page_size?: number;
979
+ }
980
+ declare class Profiles {
981
+ private readonly http;
982
+ constructor(http: HttpClient);
983
+ /** Create a browser profile. */
984
+ create(body?: ProfileCreateRequest$1): Promise<ProfileView$1>;
985
+ /** List profiles for the authenticated project. */
986
+ list(params?: ProfileListParams): Promise<ProfileListResponse$1>;
987
+ /** Get profile details. */
988
+ get(profileId: string): Promise<ProfileView$1>;
989
+ /** Update a profile. */
990
+ update(profileId: string, body: ProfileUpdateRequest$1): Promise<ProfileView$1>;
991
+ /** Delete a profile. */
992
+ delete(profileId: string): Promise<void>;
993
+ }
994
+
361
995
  type RunTaskRequest$2 = components["schemas"]["RunTaskRequest"];
362
996
  /** All fields optional — omit `task` to create an idle session. */
363
997
  type CreateSessionBody = Partial<RunTaskRequest$2>;
@@ -403,6 +1037,16 @@ declare class Sessions {
403
1037
  files(sessionId: string, params?: SessionFilesParams): Promise<FileListResponse$2>;
404
1038
  /** List messages for a session with cursor-based pagination. */
405
1039
  messages(sessionId: string, params?: SessionMessagesParams): Promise<MessageListResponse$1>;
1040
+ /**
1041
+ * Poll until recording URLs are available. Returns presigned MP4 URLs.
1042
+ *
1043
+ * Returns an empty array if no recording was produced (e.g. the agent
1044
+ * answered without opening a browser, or recording was not enabled).
1045
+ */
1046
+ waitForRecording(sessionId: string, options?: {
1047
+ timeout?: number;
1048
+ interval?: number;
1049
+ }): Promise<string[]>;
406
1050
  }
407
1051
 
408
1052
  type WorkspaceView$1 = components["schemas"]["WorkspaceView"];
@@ -446,11 +1090,41 @@ declare class Workspaces {
446
1090
  deleteFile(workspaceId: string, path: string): Promise<void>;
447
1091
  /** Get storage usage for a workspace. */
448
1092
  size(workspaceId: string): Promise<unknown>;
1093
+ /**
1094
+ * Upload local files to a workspace. Returns the list of remote paths.
1095
+ *
1096
+ * ```ts
1097
+ * await client.workspaces.upload(wsId, "data.csv", "config.json");
1098
+ * ```
1099
+ */
1100
+ upload(workspaceId: string, ...paths: string[]): Promise<string[]>;
1101
+ /**
1102
+ * Download a single file from a workspace. Returns the local path.
1103
+ *
1104
+ * ```ts
1105
+ * const local = await client.workspaces.download(wsId, "uploads/data.csv", { to: "./data.csv" });
1106
+ * ```
1107
+ */
1108
+ download(workspaceId: string, path: string, options?: {
1109
+ to?: string;
1110
+ }): Promise<string>;
1111
+ /**
1112
+ * Download all files from a workspace. Returns list of local paths.
1113
+ *
1114
+ * ```ts
1115
+ * const paths = await client.workspaces.downloadAll(wsId, { to: "./output" });
1116
+ * ```
1117
+ */
1118
+ downloadAll(workspaceId: string, options?: {
1119
+ to?: string;
1120
+ prefix?: string;
1121
+ }): Promise<string[]>;
449
1122
  }
450
1123
 
451
1124
  type SessionResponse$1 = components["schemas"]["SessionResponse"];
1125
+ type MessageResponse$1 = components["schemas"]["MessageResponse"];
452
1126
  interface RunOptions {
453
- /** Maximum time to wait in milliseconds. Default: 300_000 (5 min). */
1127
+ /** Maximum time to wait in milliseconds. Default: 14_400_000 (4 hours). */
454
1128
  timeout?: number;
455
1129
  /** Polling interval in milliseconds. Default: 2_000. */
456
1130
  interval?: number;
@@ -481,6 +1155,11 @@ declare class SessionRun<T = string> implements PromiseLike<SessionResult<T>> {
481
1155
  private _ensureSessionId;
482
1156
  /** Poll session until terminal, return SessionResult. */
483
1157
  private _waitForOutput;
1158
+ /**
1159
+ * Enable `for await (const msg of client.run(...))` — yields messages as they appear.
1160
+ * After iteration, `.result` contains the final SessionResult.
1161
+ */
1162
+ [Symbol.asyncIterator](): AsyncGenerator<MessageResponse$1>;
484
1163
  private _parseOutput;
485
1164
  }
486
1165
 
@@ -495,6 +1174,9 @@ type RunSessionOptions = Partial<Omit<RunTaskRequest$1, "task">> & RunOptions &
495
1174
  schema?: z.ZodType;
496
1175
  };
497
1176
  declare class BrowserUse {
1177
+ readonly billing: Billing;
1178
+ readonly browsers: Browsers;
1179
+ readonly profiles: Profiles;
498
1180
  readonly sessions: Sessions;
499
1181
  readonly workspaces: Workspaces;
500
1182
  private readonly http;
@@ -535,9 +1217,22 @@ type FileUploadRequest = S["FileUploadRequest"];
535
1217
  type FileUploadItem = S["FileUploadItem"];
536
1218
  type WorkspaceCreateRequest = S["WorkspaceCreateRequest"];
537
1219
  type WorkspaceUpdateRequest = S["WorkspaceUpdateRequest"];
1220
+ type BrowserSessionItemView = S["BrowserSessionItemView"];
1221
+ type BrowserSessionView = S["BrowserSessionView"];
1222
+ type BrowserSessionListResponse = S["BrowserSessionListResponse"];
1223
+ type CreateBrowserSessionRequest = S["CreateBrowserSessionRequest"];
1224
+ type UpdateBrowserSessionRequest = S["UpdateBrowserSessionRequest"];
1225
+ type BrowserSessionStatus = S["BrowserSessionStatus"];
1226
+ type BrowserSessionUpdateAction = S["BrowserSessionUpdateAction"];
1227
+ type ProfileView = S["ProfileView"];
1228
+ type ProfileListResponse = S["ProfileListResponse"];
1229
+ type ProfileCreateRequest = S["ProfileCreateRequest"];
1230
+ type ProfileUpdateRequest = S["ProfileUpdateRequest"];
1231
+ type AccountView = S["AccountView"];
1232
+ type PlanInfo = S["PlanInfo"];
538
1233
  type BuAgentSessionStatus = S["BuAgentSessionStatus"];
539
1234
  type BuModel = S["BuModel"];
540
1235
  type ProxyCountryCode = S["ProxyCountryCode"];
541
1236
  type StopStrategy = S["StopStrategy"];
542
1237
 
543
- export { BrowserUse, type BrowserUseOptions, type BuAgentSessionStatus, type BuModel, type CreateSessionBody, type FileInfo, type FileListResponse, type FileUploadItem, type FileUploadRequest, type FileUploadResponse, type FileUploadResponseItem, type MessageListResponse, type MessageResponse, type ProxyCountryCode, type RunOptions, type RunSessionOptions, type RunTaskRequest, type SessionFilesParams, type SessionListParams, type SessionListResponse, type SessionMessagesParams, type SessionResponse, type SessionResult, SessionRun, Sessions, type StopSessionRequest, type StopStrategy, type components as V3Types, type WorkspaceCreateRequest, type WorkspaceFilesParams, type WorkspaceListParams, type WorkspaceListResponse, type WorkspaceUpdateRequest, type WorkspaceView, Workspaces };
1238
+ export { type AccountView, Billing, type BrowserListParams, type BrowserSessionItemView, type BrowserSessionListResponse, type BrowserSessionStatus, type BrowserSessionUpdateAction, type BrowserSessionView, BrowserUse, type BrowserUseOptions, Browsers, type BuAgentSessionStatus, type BuModel, type CreateBrowserSessionRequest, type CreateSessionBody, type FileInfo, type FileListResponse, type FileUploadItem, type FileUploadRequest, type FileUploadResponse, type FileUploadResponseItem, type MessageListResponse, type MessageResponse, type PlanInfo, type ProfileCreateRequest, type ProfileListParams, type ProfileListResponse, type ProfileUpdateRequest, type ProfileView, Profiles, type ProxyCountryCode, type RunOptions, type RunSessionOptions, type RunTaskRequest, type SessionFilesParams, type SessionListParams, type SessionListResponse, type SessionMessagesParams, type SessionResponse, type SessionResult, SessionRun, Sessions, type StopSessionRequest, type StopStrategy, type UpdateBrowserSessionRequest, type components as V3Types, type WorkspaceCreateRequest, type WorkspaceFilesParams, type WorkspaceListParams, type WorkspaceListResponse, type WorkspaceUpdateRequest, type WorkspaceView, Workspaces };