browser-use-sdk 3.4.3 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -2
- package/dist/index.d.ts +73 -2
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/v3.cjs +7 -0
- package/dist/v3.cjs.map +1 -1
- package/dist/v3.d.cts +388 -8
- package/dist/v3.d.ts +388 -8
- package/dist/v3.js +7 -0
- package/dist/v3.js.map +1 -1
- package/package.json +1 -1
package/dist/v3.d.ts
CHANGED
|
@@ -50,6 +50,12 @@ interface components {
|
|
|
50
50
|
* @description The plan information
|
|
51
51
|
*/
|
|
52
52
|
planInfo: components["schemas"]["PlanInfo"];
|
|
53
|
+
/**
|
|
54
|
+
* Is Free Tier
|
|
55
|
+
* @description Whether the account is on the free tier
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
isFreeTier: boolean;
|
|
53
59
|
/**
|
|
54
60
|
* Project ID
|
|
55
61
|
* Format: uuid
|
|
@@ -57,6 +63,200 @@ interface components {
|
|
|
57
63
|
*/
|
|
58
64
|
projectId: string;
|
|
59
65
|
};
|
|
66
|
+
/** BoxCreateRequest */
|
|
67
|
+
BoxCreateRequest: {
|
|
68
|
+
/** Profile Id */
|
|
69
|
+
profile_id?: string | null;
|
|
70
|
+
/** Size */
|
|
71
|
+
size?: ("small" | "medium" | "large") | null;
|
|
72
|
+
};
|
|
73
|
+
/** BoxCreateResponse */
|
|
74
|
+
BoxCreateResponse: {
|
|
75
|
+
box: components["schemas"]["BoxView"];
|
|
76
|
+
};
|
|
77
|
+
/** BoxPatchRequest */
|
|
78
|
+
BoxPatchRequest: {
|
|
79
|
+
/** Dsp Enabled */
|
|
80
|
+
dsp_enabled?: boolean | null;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* BoxResizeRequest
|
|
84
|
+
* @description Resize an existing box to a larger tier.
|
|
85
|
+
*
|
|
86
|
+
* Upgrade-only: the backend rejects requests where `size` isn't strictly
|
|
87
|
+
* larger than the box's current size. Downsize → 400 with a hint to
|
|
88
|
+
* destroy + redeploy. Same size → 409 (idempotent failure — no work to do).
|
|
89
|
+
*/
|
|
90
|
+
BoxResizeRequest: {
|
|
91
|
+
/**
|
|
92
|
+
* Size
|
|
93
|
+
* @enum {string}
|
|
94
|
+
*/
|
|
95
|
+
size: "small" | "medium" | "large";
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* BoxRestartMode
|
|
99
|
+
* @description How aggressive a /me/restart should be.
|
|
100
|
+
*
|
|
101
|
+
* `service` — fastest, fixes ~95% of cases (agent process crash, OOM,
|
|
102
|
+
* wedged TG long-poll). SSM `systemctl restart bux-tg`. ~5s.
|
|
103
|
+
* `reboot` — fallback for kernel-hung / SSM-unreachable boxes. AWS
|
|
104
|
+
* rebootInstances. ~30-60s. IP + EBS preserved.
|
|
105
|
+
* @enum {string}
|
|
106
|
+
*/
|
|
107
|
+
BoxRestartMode: "service" | "reboot";
|
|
108
|
+
/** BoxRestartRequest */
|
|
109
|
+
BoxRestartRequest: {
|
|
110
|
+
/** @default service */
|
|
111
|
+
mode: components["schemas"]["BoxRestartMode"];
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* BoxSizeListResponse
|
|
115
|
+
* @description Catalog of available size tiers, returned to the deploy picker.
|
|
116
|
+
*
|
|
117
|
+
* Keeping the list server-side (instead of hardcoding prices in the
|
|
118
|
+
* frontend) means the day we re-tier or run a promo, we don't have
|
|
119
|
+
* to ship a frontend deploy. Just edit `sizing.py`.
|
|
120
|
+
*/
|
|
121
|
+
BoxSizeListResponse: {
|
|
122
|
+
/** Sizes */
|
|
123
|
+
sizes: components["schemas"]["BoxSizeSpecView"][];
|
|
124
|
+
/**
|
|
125
|
+
* Default
|
|
126
|
+
* @enum {string}
|
|
127
|
+
*/
|
|
128
|
+
default: "small" | "medium" | "large";
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* BoxSizeSpecView
|
|
132
|
+
* @description User-visible spec sheet for one size tier. Returned alongside
|
|
133
|
+
* BoxView so the UI can render the tooltip ("2 vCPU · 4 GB · 20 GB")
|
|
134
|
+
* without a second round trip + so the picker on /bux can show all
|
|
135
|
+
* three rows without us hardcoding prices in the frontend.
|
|
136
|
+
*/
|
|
137
|
+
BoxSizeSpecView: {
|
|
138
|
+
/**
|
|
139
|
+
* Name
|
|
140
|
+
* @enum {string}
|
|
141
|
+
*/
|
|
142
|
+
name: "small" | "medium" | "large";
|
|
143
|
+
/** Vcpu */
|
|
144
|
+
vcpu: number;
|
|
145
|
+
/** Ram Gb */
|
|
146
|
+
ram_gb: number;
|
|
147
|
+
/** Disk Gb */
|
|
148
|
+
disk_gb: number;
|
|
149
|
+
/** Daily Usd */
|
|
150
|
+
daily_usd: number;
|
|
151
|
+
/** Min Balance Usd */
|
|
152
|
+
min_balance_usd: number;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* BoxStatus
|
|
156
|
+
* @enum {string}
|
|
157
|
+
*/
|
|
158
|
+
BoxStatus: "provisioning" | "awaiting_oauth" | "ready" | "resizing" | "error" | "halted" | "destroyed";
|
|
159
|
+
/** BoxView */
|
|
160
|
+
BoxView: {
|
|
161
|
+
/**
|
|
162
|
+
* Id
|
|
163
|
+
* Format: uuid
|
|
164
|
+
*/
|
|
165
|
+
id: string;
|
|
166
|
+
/**
|
|
167
|
+
* Project Id
|
|
168
|
+
* Format: uuid
|
|
169
|
+
*/
|
|
170
|
+
project_id: string;
|
|
171
|
+
/** Profile Id */
|
|
172
|
+
profile_id: string | null;
|
|
173
|
+
/**
|
|
174
|
+
* Size
|
|
175
|
+
* @enum {string}
|
|
176
|
+
*/
|
|
177
|
+
size: "small" | "medium" | "large";
|
|
178
|
+
size_spec: components["schemas"]["BoxSizeSpecView"];
|
|
179
|
+
/** Ec2 Instance Id */
|
|
180
|
+
ec2_instance_id: string | null;
|
|
181
|
+
/** Public Ip */
|
|
182
|
+
public_ip: string | null;
|
|
183
|
+
status: components["schemas"]["BoxStatus"];
|
|
184
|
+
/** Status Detail */
|
|
185
|
+
status_detail: string | null;
|
|
186
|
+
/** Claude Authed */
|
|
187
|
+
claude_authed: boolean;
|
|
188
|
+
/** Tg Installed */
|
|
189
|
+
tg_installed: boolean;
|
|
190
|
+
/** Tg Bot Username */
|
|
191
|
+
tg_bot_username: string | null;
|
|
192
|
+
/** Dsp Enabled */
|
|
193
|
+
dsp_enabled: boolean;
|
|
194
|
+
/** Live Browser Url */
|
|
195
|
+
live_browser_url: string | null;
|
|
196
|
+
/** Last Heartbeat At */
|
|
197
|
+
last_heartbeat_at: string | null;
|
|
198
|
+
/** Trial Ends At */
|
|
199
|
+
trial_ends_at?: string | null;
|
|
200
|
+
/**
|
|
201
|
+
* Created At
|
|
202
|
+
* Format: date-time
|
|
203
|
+
*/
|
|
204
|
+
created_at: string;
|
|
205
|
+
/**
|
|
206
|
+
* Updated At
|
|
207
|
+
* Format: date-time
|
|
208
|
+
*/
|
|
209
|
+
updated_at: string;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* BrowserDownloadFile
|
|
213
|
+
* @description A single file the browser downloaded during the session.
|
|
214
|
+
*/
|
|
215
|
+
BrowserDownloadFile: {
|
|
216
|
+
/**
|
|
217
|
+
* Path
|
|
218
|
+
* @description File name (basename relative to the session downloads prefix)
|
|
219
|
+
*/
|
|
220
|
+
path: string;
|
|
221
|
+
/**
|
|
222
|
+
* Size
|
|
223
|
+
* @description File size in bytes
|
|
224
|
+
*/
|
|
225
|
+
size: number;
|
|
226
|
+
/**
|
|
227
|
+
* Lastmodified
|
|
228
|
+
* Format: date-time
|
|
229
|
+
* @description When the file was last modified in S3
|
|
230
|
+
*/
|
|
231
|
+
lastModified: string;
|
|
232
|
+
/**
|
|
233
|
+
* Url
|
|
234
|
+
* @description Presigned download URL (15 min expiry). Only included when `includeUrls=true`.
|
|
235
|
+
*/
|
|
236
|
+
url?: string | null;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* BrowserDownloadListResponse
|
|
240
|
+
* @description Paginated list of browser downloads with optional presigned URLs.
|
|
241
|
+
*/
|
|
242
|
+
BrowserDownloadListResponse: {
|
|
243
|
+
/**
|
|
244
|
+
* Files
|
|
245
|
+
* @description List of files downloaded by the browser
|
|
246
|
+
*/
|
|
247
|
+
files: components["schemas"]["BrowserDownloadFile"][];
|
|
248
|
+
/**
|
|
249
|
+
* Nextcursor
|
|
250
|
+
* @description Cursor for the next page. Pass as the `cursor` query parameter to fetch the next page.
|
|
251
|
+
*/
|
|
252
|
+
nextCursor?: string | null;
|
|
253
|
+
/**
|
|
254
|
+
* Hasmore
|
|
255
|
+
* @description Whether there are more files beyond this page.
|
|
256
|
+
* @default false
|
|
257
|
+
*/
|
|
258
|
+
hasMore: boolean;
|
|
259
|
+
};
|
|
60
260
|
/**
|
|
61
261
|
* BrowserSessionItemView
|
|
62
262
|
* @description View model for representing a browser session in list views.
|
|
@@ -265,11 +465,17 @@ interface components {
|
|
|
265
465
|
*
|
|
266
466
|
* - `bu-mini` / `gemini-3-flash`: Gemini 3 Flash — fast and cost-effective. Best for simple, well-defined tasks like form filling or data extraction.
|
|
267
467
|
* - `bu-max` / `claude-sonnet-4.6`: Claude Sonnet 4.6 — balanced performance. Best for multi-step workflows that require reasoning and decision-making.
|
|
268
|
-
* - `bu-ultra` / `claude-opus-4.6`: Claude Opus 4.6 —
|
|
468
|
+
* - `bu-ultra` / `claude-opus-4.6`: Claude Opus 4.6 — capable general-purpose Opus tier.
|
|
469
|
+
* - `claude-opus-4.7`: Claude Opus 4.7 — most capable. Best for complex tasks that require advanced reasoning, long-horizon planning, or handling ambiguous instructions.
|
|
269
470
|
* - `gpt-5.4-mini`: GPT-5.4 mini — OpenAI's fast and efficient model. Best for tasks that benefit from OpenAI's capabilities.
|
|
270
471
|
* @enum {string}
|
|
271
472
|
*/
|
|
272
|
-
BuModel: "bu-mini" | "bu-max" | "bu-ultra" | "gemini-3-flash" | "claude-sonnet-4.6" | "claude-opus-4.6" | "gpt-5.4-mini";
|
|
473
|
+
BuModel: "bu-mini" | "bu-max" | "bu-ultra" | "gemini-3-flash" | "claude-sonnet-4.6" | "claude-opus-4.6" | "claude-opus-4.7" | "gpt-5.4-mini";
|
|
474
|
+
/** ClaudeLoginCodeRequest */
|
|
475
|
+
ClaudeLoginCodeRequest: {
|
|
476
|
+
/** Code */
|
|
477
|
+
code: string;
|
|
478
|
+
};
|
|
273
479
|
/**
|
|
274
480
|
* CreateBrowserSessionRequest
|
|
275
481
|
* @description Request model for creating a browser session.
|
|
@@ -345,6 +551,12 @@ interface components {
|
|
|
345
551
|
* @description Password for proxy authentication.
|
|
346
552
|
*/
|
|
347
553
|
password?: string | null;
|
|
554
|
+
/**
|
|
555
|
+
* Ignore Certificate Errors
|
|
556
|
+
* @description Ignore TLS certificate errors. Enable this if your proxy uses a self-signed or untrusted certificate (e.g. Burp Suite, corporate proxies).
|
|
557
|
+
* @default false
|
|
558
|
+
*/
|
|
559
|
+
ignoreCertErrors: boolean;
|
|
348
560
|
};
|
|
349
561
|
/**
|
|
350
562
|
* FileInfo
|
|
@@ -712,8 +924,8 @@ interface components {
|
|
|
712
924
|
*/
|
|
713
925
|
task?: string | null;
|
|
714
926
|
/**
|
|
715
|
-
* @description The model to use. "gemini-3-flash" is fast and cheap, "claude-sonnet-4.6" is balanced, "claude-opus-4.
|
|
716
|
-
* @default claude-
|
|
927
|
+
* @description The model to use. "gemini-3-flash" is fast and cheap, "claude-sonnet-4.6" is balanced, "claude-opus-4.7" is most capable (default). See BuModel for details.
|
|
928
|
+
* @default claude-opus-4.7
|
|
717
929
|
*/
|
|
718
930
|
model: components["schemas"]["BuModel"];
|
|
719
931
|
/**
|
|
@@ -729,7 +941,7 @@ interface components {
|
|
|
729
941
|
keepAlive: boolean;
|
|
730
942
|
/**
|
|
731
943
|
* Maxcostusd
|
|
732
|
-
* @description Maximum total cost in USD allowed for this session. The task will be stopped if this limit is reached. If omitted, a default limit applies (capped by your available balance).
|
|
944
|
+
* @description Maximum total cost in USD allowed for this session. The task will be stopped if this limit is reached. If omitted, a default limit applies (capped by your available balance). When dispatching a follow-up task to an existing session (`sessionId` is set), supplying this value overrides the session's budget for the upcoming dispatch; otherwise the budget is automatically refreshed to current spend + default.
|
|
733
945
|
*/
|
|
734
946
|
maxCostUsd?: number | string | null;
|
|
735
947
|
/**
|
|
@@ -762,7 +974,7 @@ interface components {
|
|
|
762
974
|
enableScheduledTasks: boolean;
|
|
763
975
|
/**
|
|
764
976
|
* Sensitivedata
|
|
765
|
-
* @description Key-value pairs of sensitive data (e.g. passwords, API keys) that the agent can use via secure placeholders. Keys are exposed to the LLM; values are never shown. The agent uses `<secret>key</secret>` placeholders in browser_type_text to securely enter values.
|
|
977
|
+
* @description Key-value pairs of sensitive data (e.g. passwords, API keys) that the agent can use via secure placeholders. Keys are exposed to the LLM; values are never shown. The agent uses `<secret>key</secret>` placeholders in browser_type_text to securely enter values.
|
|
766
978
|
*/
|
|
767
979
|
sensitiveData?: {
|
|
768
980
|
[key: string]: string;
|
|
@@ -785,11 +997,23 @@ interface components {
|
|
|
785
997
|
* @default true
|
|
786
998
|
*/
|
|
787
999
|
agentmail: boolean;
|
|
1000
|
+
/**
|
|
1001
|
+
* Codemode
|
|
1002
|
+
* @description When true, the agent returns structured output with `text` (summary) and `code` (validated Python source) fields instead of free-form text.
|
|
1003
|
+
* @default false
|
|
1004
|
+
*/
|
|
1005
|
+
codeMode: boolean;
|
|
788
1006
|
/**
|
|
789
1007
|
* Cachescript
|
|
790
1008
|
* @description Controls deterministic script caching. `null` (default): auto-detected — enabled when the task contains `@{{value}}` brackets and a workspace is attached. `true`: force-enable script caching even without brackets (caches the exact task). `false`: force-disable, even if brackets are present. When active, the first call runs the full agent and saves a reusable script. Subsequent calls with the same task template execute the cached script with $0 LLM cost. Requires workspace_id when enabled. Example: "Get prices from @{{https://example.com}} for @{{electronics}}".
|
|
791
1009
|
*/
|
|
792
1010
|
cacheScript?: boolean | null;
|
|
1011
|
+
/**
|
|
1012
|
+
* Useownkey
|
|
1013
|
+
* @description If true, uses your own LLM API key (configured in project settings) instead of Browser Use managed keys. You pay your provider directly for inference; Browser Use charges a reduced orchestration fee (0.2× of provider list prices). If no key is configured for the model's provider, the request is rejected.
|
|
1014
|
+
* @default false
|
|
1015
|
+
*/
|
|
1016
|
+
useOwnKey: boolean;
|
|
793
1017
|
/**
|
|
794
1018
|
* Autoheal
|
|
795
1019
|
* @description When cache_script is active, controls whether a lightweight LLM validates the cached script output. If the output looks incorrect (empty, error, wrong structure), the system automatically re-triggers the full agent to generate a new version of the script. Set to false to disable validation and always return the raw script output.
|
|
@@ -856,7 +1080,7 @@ interface components {
|
|
|
856
1080
|
title?: string | null;
|
|
857
1081
|
/**
|
|
858
1082
|
* Output
|
|
859
|
-
* @description The agent's final output. If `outputSchema` was provided, this will be structured data conforming to that schema. Otherwise it may be a free-form string or null.
|
|
1083
|
+
* @description The agent's final output. If `codeMode` was true, this will be an object with `text` (summary), `code` (Python source), and optionally `output` (execution result). If `outputSchema` was provided, this will be structured data conforming to that schema. Otherwise it may be a free-form string or null.
|
|
860
1084
|
*/
|
|
861
1085
|
output?: unknown | null;
|
|
862
1086
|
/**
|
|
@@ -962,6 +1186,11 @@ interface components {
|
|
|
962
1186
|
* @description Temporary email address provisioned for this session (via AgentMail). Only present if `agentmail` was enabled.
|
|
963
1187
|
*/
|
|
964
1188
|
agentmailEmail?: string | null;
|
|
1189
|
+
/**
|
|
1190
|
+
* Integrationsused
|
|
1191
|
+
* @description List of integration providers used during this session (e.g. ["gmail", "slack", "agentmail"]).
|
|
1192
|
+
*/
|
|
1193
|
+
integrationsUsed?: string[];
|
|
965
1194
|
/**
|
|
966
1195
|
* Createdat
|
|
967
1196
|
* Format: date-time
|
|
@@ -986,6 +1215,19 @@ interface components {
|
|
|
986
1215
|
*/
|
|
987
1216
|
detail: string;
|
|
988
1217
|
};
|
|
1218
|
+
/**
|
|
1219
|
+
* ShellResponse
|
|
1220
|
+
* @description Terminal URL — user opens this in their browser, gets a live shell.
|
|
1221
|
+
*/
|
|
1222
|
+
ShellResponse: {
|
|
1223
|
+
/** Url */
|
|
1224
|
+
url: string;
|
|
1225
|
+
/**
|
|
1226
|
+
* Expires In Seconds
|
|
1227
|
+
* @default 900
|
|
1228
|
+
*/
|
|
1229
|
+
expires_in_seconds: number;
|
|
1230
|
+
};
|
|
989
1231
|
/** StopSessionRequest */
|
|
990
1232
|
StopSessionRequest: {
|
|
991
1233
|
/**
|
|
@@ -1003,6 +1245,65 @@ interface components {
|
|
|
1003
1245
|
* @enum {string}
|
|
1004
1246
|
*/
|
|
1005
1247
|
StopStrategy: "task" | "session";
|
|
1248
|
+
/** TelegramInstallRequest */
|
|
1249
|
+
TelegramInstallRequest: {
|
|
1250
|
+
/** Bot Token */
|
|
1251
|
+
bot_token: string;
|
|
1252
|
+
};
|
|
1253
|
+
/** TelegramInstallResponse */
|
|
1254
|
+
TelegramInstallResponse: {
|
|
1255
|
+
/** Installed */
|
|
1256
|
+
installed: boolean;
|
|
1257
|
+
/** Bot Username */
|
|
1258
|
+
bot_username: string;
|
|
1259
|
+
/** Deeplink */
|
|
1260
|
+
deeplink: string;
|
|
1261
|
+
/** Setup Token */
|
|
1262
|
+
setup_token: string;
|
|
1263
|
+
};
|
|
1264
|
+
/**
|
|
1265
|
+
* TgAutoSessionView
|
|
1266
|
+
* @description Snapshot of a QR onboarding session. Returned by start, status, and
|
|
1267
|
+
* cancel — same shape so the FE renders a single view component.
|
|
1268
|
+
*/
|
|
1269
|
+
TgAutoSessionView: {
|
|
1270
|
+
/**
|
|
1271
|
+
* Id
|
|
1272
|
+
* Format: uuid
|
|
1273
|
+
*/
|
|
1274
|
+
id: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* State
|
|
1277
|
+
* @enum {string}
|
|
1278
|
+
*/
|
|
1279
|
+
state: "pending_browser" | "waiting_scan" | "login_detected" | "minting" | "installing" | "installed" | "failed" | "expired";
|
|
1280
|
+
/** Live Url */
|
|
1281
|
+
live_url: string | null;
|
|
1282
|
+
/** Bot Username */
|
|
1283
|
+
bot_username: string | null;
|
|
1284
|
+
/** Error Code */
|
|
1285
|
+
error_code: ("bu_cloud_auth" | "bu_cloud_unavailable" | "bu_cloud_rate_limited" | "bu_cloud_timeout" | "scan_timeout" | "agent_dispatch_failed" | "agent_timeout" | "agent_no_output" | "agent_failed" | "invalid_token" | "bot_username_collision" | "rate_limited_botfather" | "box_not_ready" | "tg_already_installed" | "install_telegram_failed" | "box_offline" | "cancelled" | "concurrent_limit" | "internal") | null;
|
|
1286
|
+
/** Error Message */
|
|
1287
|
+
error_message: string | null;
|
|
1288
|
+
/**
|
|
1289
|
+
* Created At
|
|
1290
|
+
* Format: date-time
|
|
1291
|
+
*/
|
|
1292
|
+
created_at: string;
|
|
1293
|
+
/**
|
|
1294
|
+
* Updated At
|
|
1295
|
+
* Format: date-time
|
|
1296
|
+
*/
|
|
1297
|
+
updated_at: string;
|
|
1298
|
+
};
|
|
1299
|
+
/**
|
|
1300
|
+
* TgAutoStartResponse
|
|
1301
|
+
* @description Returned by POST /me/tg/auto. The session is already running by the
|
|
1302
|
+
* time this returns — frontend opens the iframe and starts polling.
|
|
1303
|
+
*/
|
|
1304
|
+
TgAutoStartResponse: {
|
|
1305
|
+
session: components["schemas"]["TgAutoSessionView"];
|
|
1306
|
+
};
|
|
1006
1307
|
/**
|
|
1007
1308
|
* TooManyConcurrentActiveSessionsError
|
|
1008
1309
|
* @description Error response when user has too many concurrent active sessions
|
|
@@ -1014,6 +1315,26 @@ interface components {
|
|
|
1014
1315
|
*/
|
|
1015
1316
|
detail: string;
|
|
1016
1317
|
};
|
|
1318
|
+
/**
|
|
1319
|
+
* TrialEligibilityView
|
|
1320
|
+
* @description GET /me/trial-eligibility — is this user eligible for a free trial?
|
|
1321
|
+
*
|
|
1322
|
+
* `reason` is a stable machine-readable code the FE branches on:
|
|
1323
|
+
* - 'already_used' — user has already started a trial in their
|
|
1324
|
+
* lifetime. Render an "upgrade to deploy" CTA.
|
|
1325
|
+
* - 'not_free_tier' — paying customer; FE shows the normal flow.
|
|
1326
|
+
* - 'no_owner' — couldn't resolve the project's owner profile (rare,
|
|
1327
|
+
* older projects). FE falls back to generic "add credits" copy.
|
|
1328
|
+
* - None when eligible=True.
|
|
1329
|
+
*/
|
|
1330
|
+
TrialEligibilityView: {
|
|
1331
|
+
/** Eligible */
|
|
1332
|
+
eligible: boolean;
|
|
1333
|
+
/** Reason */
|
|
1334
|
+
reason?: ("already_used" | "not_free_tier" | "no_owner") | null;
|
|
1335
|
+
/** Message */
|
|
1336
|
+
message?: string | null;
|
|
1337
|
+
};
|
|
1017
1338
|
/**
|
|
1018
1339
|
* UpdateBrowserSessionRequest
|
|
1019
1340
|
* @description Request model for updating browser session state.
|
|
@@ -1034,6 +1355,50 @@ interface components {
|
|
|
1034
1355
|
/** Error Type */
|
|
1035
1356
|
type: string;
|
|
1036
1357
|
};
|
|
1358
|
+
/** WindowCreateRequest */
|
|
1359
|
+
WindowCreateRequest: {
|
|
1360
|
+
/** Label */
|
|
1361
|
+
label?: string | null;
|
|
1362
|
+
};
|
|
1363
|
+
/** WindowListResponse */
|
|
1364
|
+
WindowListResponse: {
|
|
1365
|
+
/** Windows */
|
|
1366
|
+
windows: components["schemas"]["WindowView"][];
|
|
1367
|
+
};
|
|
1368
|
+
/** WindowRenameRequest */
|
|
1369
|
+
WindowRenameRequest: {
|
|
1370
|
+
/** Label */
|
|
1371
|
+
label: string;
|
|
1372
|
+
};
|
|
1373
|
+
/**
|
|
1374
|
+
* WindowView
|
|
1375
|
+
* @description One tmux window on the box. id is the tmux session name (`bux-w<n>`).
|
|
1376
|
+
*
|
|
1377
|
+
* `label` is a user-supplied name (max 64 chars) stored as a tmux
|
|
1378
|
+
* per-session option (@bux-label). `attached` is True if any tmux
|
|
1379
|
+
* client is currently connected to the window. The FE shows a small
|
|
1380
|
+
* indicator next to attached windows so users know which one a phone
|
|
1381
|
+
* is currently mirroring.
|
|
1382
|
+
*/
|
|
1383
|
+
WindowView: {
|
|
1384
|
+
/** Id */
|
|
1385
|
+
id: string;
|
|
1386
|
+
/**
|
|
1387
|
+
* Label
|
|
1388
|
+
* @default
|
|
1389
|
+
*/
|
|
1390
|
+
label: string;
|
|
1391
|
+
/**
|
|
1392
|
+
* Attached
|
|
1393
|
+
* @default false
|
|
1394
|
+
*/
|
|
1395
|
+
attached: boolean;
|
|
1396
|
+
/**
|
|
1397
|
+
* Created At
|
|
1398
|
+
* @default 0
|
|
1399
|
+
*/
|
|
1400
|
+
created_at: number;
|
|
1401
|
+
};
|
|
1037
1402
|
/**
|
|
1038
1403
|
* WorkspaceCreateRequest
|
|
1039
1404
|
* @description Request model for creating a new workspace.
|
|
@@ -1111,6 +1476,11 @@ interface components {
|
|
|
1111
1476
|
*/
|
|
1112
1477
|
updatedAt: string;
|
|
1113
1478
|
};
|
|
1479
|
+
/** RunTaskRequest */
|
|
1480
|
+
app__endpoints__api__v3__boxes__views__RunTaskRequest: {
|
|
1481
|
+
/** Prompt */
|
|
1482
|
+
prompt: string;
|
|
1483
|
+
};
|
|
1114
1484
|
};
|
|
1115
1485
|
responses: never;
|
|
1116
1486
|
parameters: never;
|
|
@@ -1132,10 +1502,16 @@ type BrowserSessionItemView$1 = components["schemas"]["BrowserSessionItemView"];
|
|
|
1132
1502
|
type BrowserSessionView$1 = components["schemas"]["BrowserSessionView"];
|
|
1133
1503
|
type BrowserSessionListResponse$1 = components["schemas"]["BrowserSessionListResponse"];
|
|
1134
1504
|
type UpdateBrowserSessionRequest$1 = components["schemas"]["UpdateBrowserSessionRequest"];
|
|
1505
|
+
type BrowserDownloadListResponse$1 = components["schemas"]["BrowserDownloadListResponse"];
|
|
1135
1506
|
interface BrowserListParams {
|
|
1136
1507
|
page?: number;
|
|
1137
1508
|
page_size?: number;
|
|
1138
1509
|
}
|
|
1510
|
+
interface BrowserDownloadsParams {
|
|
1511
|
+
limit?: number;
|
|
1512
|
+
cursor?: string;
|
|
1513
|
+
includeUrls?: boolean;
|
|
1514
|
+
}
|
|
1139
1515
|
declare class Browsers {
|
|
1140
1516
|
private readonly http;
|
|
1141
1517
|
constructor(http: HttpClient);
|
|
@@ -1149,6 +1525,8 @@ declare class Browsers {
|
|
|
1149
1525
|
update(sessionId: string, body: UpdateBrowserSessionRequest$1): Promise<BrowserSessionView$1>;
|
|
1150
1526
|
/** Stop a browser session. Convenience wrapper around update. */
|
|
1151
1527
|
stop(sessionId: string): Promise<BrowserSessionView$1>;
|
|
1528
|
+
/** List files the browser downloaded to S3 during the session. */
|
|
1529
|
+
downloads(sessionId: string, params?: BrowserDownloadsParams): Promise<BrowserDownloadListResponse$1>;
|
|
1152
1530
|
}
|
|
1153
1531
|
|
|
1154
1532
|
type ProfileView$1 = components["schemas"]["ProfileView"];
|
|
@@ -1392,6 +1770,8 @@ type FileUploadRequest = S["FileUploadRequest"];
|
|
|
1392
1770
|
type FileUploadItem = S["FileUploadItem"];
|
|
1393
1771
|
type WorkspaceCreateRequest = S["WorkspaceCreateRequest"];
|
|
1394
1772
|
type WorkspaceUpdateRequest = S["WorkspaceUpdateRequest"];
|
|
1773
|
+
type BrowserDownloadFile = S["BrowserDownloadFile"];
|
|
1774
|
+
type BrowserDownloadListResponse = S["BrowserDownloadListResponse"];
|
|
1395
1775
|
type BrowserSessionItemView = S["BrowserSessionItemView"];
|
|
1396
1776
|
type BrowserSessionView = S["BrowserSessionView"];
|
|
1397
1777
|
type BrowserSessionListResponse = S["BrowserSessionListResponse"];
|
|
@@ -1410,4 +1790,4 @@ type BuModel = S["BuModel"];
|
|
|
1410
1790
|
type ProxyCountryCode = S["ProxyCountryCode"];
|
|
1411
1791
|
type StopStrategy = S["StopStrategy"];
|
|
1412
1792
|
|
|
1413
|
-
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 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 };
|
|
1793
|
+
export { type AccountView, Billing, type BrowserDownloadFile, type BrowserDownloadListResponse, type BrowserDownloadsParams, 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 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 };
|
package/dist/v3.js
CHANGED
|
@@ -42,6 +42,13 @@ var Browsers = class {
|
|
|
42
42
|
stop(sessionId) {
|
|
43
43
|
return this.update(sessionId, { action: "stop" });
|
|
44
44
|
}
|
|
45
|
+
/** List files the browser downloaded to S3 during the session. */
|
|
46
|
+
downloads(sessionId, params) {
|
|
47
|
+
return this.http.get(
|
|
48
|
+
`/browsers/${sessionId}/downloads`,
|
|
49
|
+
params
|
|
50
|
+
);
|
|
51
|
+
}
|
|
45
52
|
};
|
|
46
53
|
|
|
47
54
|
// src/v3/resources/profiles.ts
|