browser-use-sdk 3.4.0 → 3.4.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/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/v3.cjs +5 -14
- package/dist/v3.cjs.map +1 -1
- package/dist/v3.d.cts +219 -64
- package/dist/v3.d.ts +219 -64
- package/dist/v3.js +5 -14
- package/dist/v3.js.map +1 -1
- package/package.json +1 -1
package/dist/v3.d.cts
CHANGED
|
@@ -248,14 +248,28 @@ interface components {
|
|
|
248
248
|
};
|
|
249
249
|
/**
|
|
250
250
|
* BuAgentSessionStatus
|
|
251
|
+
* @description Session lifecycle status. Progresses through: created → idle → running → idle → ... → stopped / timed_out / error.
|
|
252
|
+
*
|
|
253
|
+
* - `created`: Sandbox is starting up. The session is not yet ready to accept tasks.
|
|
254
|
+
* - `idle`: Sandbox is healthy and waiting for a task. You can dispatch a task or upload files.
|
|
255
|
+
* - `running`: A task is currently being executed by the agent.
|
|
256
|
+
* - `stopped`: Session was stopped — either explicitly via the stop endpoint, or automatically after task completion (when `keepAlive` is false).
|
|
257
|
+
* - `timed_out`: Session was cleaned up due to inactivity timeout.
|
|
258
|
+
* - `error`: Sandbox failed to start or encountered an unrecoverable error.
|
|
251
259
|
* @enum {string}
|
|
252
260
|
*/
|
|
253
261
|
BuAgentSessionStatus: "created" | "idle" | "running" | "stopped" | "timed_out" | "error";
|
|
254
262
|
/**
|
|
255
263
|
* BuModel
|
|
264
|
+
* @description The model to use for the agent. Each model has different capabilities and pricing.
|
|
265
|
+
*
|
|
266
|
+
* - `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
|
+
* - `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 — most capable. Best for complex tasks that require advanced reasoning, long-horizon planning, or handling ambiguous instructions.
|
|
269
|
+
* - `gpt-5.4-mini`: GPT-5.4 mini — OpenAI's fast and efficient model. Best for tasks that benefit from OpenAI's capabilities.
|
|
256
270
|
* @enum {string}
|
|
257
271
|
*/
|
|
258
|
-
BuModel: "bu-mini" | "bu-max" | "bu-ultra";
|
|
272
|
+
BuModel: "bu-mini" | "bu-max" | "bu-ultra" | "gemini-3-flash" | "claude-sonnet-4.6" | "claude-opus-4.6" | "gpt-5.4-mini";
|
|
259
273
|
/**
|
|
260
274
|
* CreateBrowserSessionRequest
|
|
261
275
|
* @description Request model for creating a browser session.
|
|
@@ -296,7 +310,7 @@ interface components {
|
|
|
296
310
|
allowResizing: boolean;
|
|
297
311
|
/**
|
|
298
312
|
* Custom Proxy
|
|
299
|
-
* @description Custom proxy settings to use for the session. If not provided, our proxies will be used. Custom proxies are
|
|
313
|
+
* @description Custom proxy settings to use for the session. If not provided, our proxies will be used. Custom proxies are available on any active subscription.
|
|
300
314
|
*/
|
|
301
315
|
customProxy?: components["schemas"]["CustomProxy"] | null;
|
|
302
316
|
/**
|
|
@@ -337,16 +351,26 @@ interface components {
|
|
|
337
351
|
* @description A file in a session's workspace.
|
|
338
352
|
*/
|
|
339
353
|
FileInfo: {
|
|
340
|
-
/**
|
|
354
|
+
/**
|
|
355
|
+
* Path
|
|
356
|
+
* @description File path relative to the session workspace root.
|
|
357
|
+
*/
|
|
341
358
|
path: string;
|
|
342
|
-
/**
|
|
359
|
+
/**
|
|
360
|
+
* Size
|
|
361
|
+
* @description File size in bytes.
|
|
362
|
+
*/
|
|
343
363
|
size: number;
|
|
344
364
|
/**
|
|
345
365
|
* Lastmodified
|
|
346
366
|
* Format: date-time
|
|
367
|
+
* @description When the file was last modified.
|
|
347
368
|
*/
|
|
348
369
|
lastModified: string;
|
|
349
|
-
/**
|
|
370
|
+
/**
|
|
371
|
+
* Url
|
|
372
|
+
* @description Presigned download URL (60s expiry). Only included when `includeUrls=true`.
|
|
373
|
+
*/
|
|
350
374
|
url?: string | null;
|
|
351
375
|
};
|
|
352
376
|
/**
|
|
@@ -361,10 +385,14 @@ interface components {
|
|
|
361
385
|
* @description Immediate sub-folder names at this prefix level
|
|
362
386
|
*/
|
|
363
387
|
folders?: string[];
|
|
364
|
-
/**
|
|
388
|
+
/**
|
|
389
|
+
* Nextcursor
|
|
390
|
+
* @description Cursor for the next page. Pass as the `cursor` query parameter to fetch the next page.
|
|
391
|
+
*/
|
|
365
392
|
nextCursor?: string | null;
|
|
366
393
|
/**
|
|
367
394
|
* Hasmore
|
|
395
|
+
* @description Whether there are more files beyond this page.
|
|
368
396
|
* @default false
|
|
369
397
|
*/
|
|
370
398
|
hasMore: boolean;
|
|
@@ -412,13 +440,19 @@ interface components {
|
|
|
412
440
|
* @description Presigned upload URL for a single file.
|
|
413
441
|
*/
|
|
414
442
|
FileUploadResponseItem: {
|
|
415
|
-
/**
|
|
443
|
+
/**
|
|
444
|
+
* Name
|
|
445
|
+
* @description Original filename as requested.
|
|
446
|
+
*/
|
|
416
447
|
name: string;
|
|
417
|
-
/**
|
|
448
|
+
/**
|
|
449
|
+
* Uploadurl
|
|
450
|
+
* @description Presigned PUT URL. Upload the file by sending a PUT request to this URL with the file content and matching Content-Type header. Expires after 5 minutes.
|
|
451
|
+
*/
|
|
418
452
|
uploadUrl: string;
|
|
419
453
|
/**
|
|
420
454
|
* Path
|
|
421
|
-
* @description
|
|
455
|
+
* @description Path where the file will be stored in the workspace, e.g. "uploads/data.csv".
|
|
422
456
|
*/
|
|
423
457
|
path: string;
|
|
424
458
|
};
|
|
@@ -440,40 +474,62 @@ interface components {
|
|
|
440
474
|
};
|
|
441
475
|
/** MessageListResponse */
|
|
442
476
|
MessageListResponse: {
|
|
443
|
-
/**
|
|
477
|
+
/**
|
|
478
|
+
* Messages
|
|
479
|
+
* @description List of messages in chronological order.
|
|
480
|
+
*/
|
|
444
481
|
messages: components["schemas"]["MessageResponse"][];
|
|
445
|
-
/**
|
|
482
|
+
/**
|
|
483
|
+
* Hasmore
|
|
484
|
+
* @description Whether there are more messages available beyond this page. Use cursor-based pagination with the `after` or `before` query parameters to fetch more.
|
|
485
|
+
*/
|
|
446
486
|
hasMore: boolean;
|
|
447
487
|
};
|
|
448
|
-
/**
|
|
488
|
+
/**
|
|
489
|
+
* MessageResponse
|
|
490
|
+
* @description A single message from the session's message stream.
|
|
491
|
+
*
|
|
492
|
+
* Messages represent the agent's actions, observations, and decisions as it executes a task.
|
|
493
|
+
*/
|
|
449
494
|
MessageResponse: {
|
|
450
495
|
/**
|
|
451
496
|
* Id
|
|
452
497
|
* Format: uuid
|
|
498
|
+
* @description Unique message identifier.
|
|
453
499
|
*/
|
|
454
500
|
id: string;
|
|
455
501
|
/**
|
|
456
502
|
* Sessionid
|
|
457
503
|
* Format: uuid
|
|
504
|
+
* @description ID of the session this message belongs to.
|
|
458
505
|
*/
|
|
459
506
|
sessionId: string;
|
|
460
|
-
/**
|
|
507
|
+
/**
|
|
508
|
+
* Role
|
|
509
|
+
* @description Message role: "human" for user-submitted tasks, "ai" for agent actions and responses.
|
|
510
|
+
*/
|
|
461
511
|
role: string;
|
|
462
|
-
/**
|
|
512
|
+
/**
|
|
513
|
+
* Data
|
|
514
|
+
* @description Raw message content. Format depends on the message type — may be plain text, JSON, or structured action data.
|
|
515
|
+
*/
|
|
463
516
|
data: string;
|
|
464
517
|
/**
|
|
465
518
|
* Type
|
|
466
|
-
* @description
|
|
519
|
+
* @description Message category. Common values: `user_message`, `assistant_message`, `browser_action`, `file_operation`, `code_execution`, `integration`, `planning`, `completion`, `browser_action_result`, `browser_action_error`.
|
|
467
520
|
* @default
|
|
468
521
|
*/
|
|
469
522
|
type: string;
|
|
470
523
|
/**
|
|
471
524
|
* Summary
|
|
472
|
-
* @description One-liner human-readable description of the message (e.g. "Navigating to google.com", "Clicking element #5").
|
|
525
|
+
* @description One-liner human-readable description of the message (e.g. "Navigating to google.com", "Clicking element #5"). Useful for building activity feeds.
|
|
473
526
|
* @default
|
|
474
527
|
*/
|
|
475
528
|
summary: string;
|
|
476
|
-
/**
|
|
529
|
+
/**
|
|
530
|
+
* Screenshoturl
|
|
531
|
+
* @description Browser screenshot captured at the time of this message. Presigned URL, expires after 5 minutes.
|
|
532
|
+
*/
|
|
477
533
|
screenshotUrl?: string | null;
|
|
478
534
|
/**
|
|
479
535
|
* Hidden
|
|
@@ -484,6 +540,7 @@ interface components {
|
|
|
484
540
|
/**
|
|
485
541
|
* Createdat
|
|
486
542
|
* Format: date-time
|
|
543
|
+
* @description When this message was created.
|
|
487
544
|
*/
|
|
488
545
|
createdAt: string;
|
|
489
546
|
};
|
|
@@ -641,67 +698,119 @@ interface components {
|
|
|
641
698
|
ProxyCountryCode: "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "an" | "ao" | "aq" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ck" | "cl" | "cm" | "co" | "cr" | "cs" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "uk" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "xk" | "ye" | "yt" | "za" | "zm" | "zw";
|
|
642
699
|
/**
|
|
643
700
|
* RunTaskRequest
|
|
644
|
-
* @description
|
|
701
|
+
* @description Create a new session, dispatch a task, or both.
|
|
645
702
|
*
|
|
646
|
-
* -
|
|
647
|
-
* -
|
|
648
|
-
* -
|
|
649
|
-
* -
|
|
703
|
+
* - **No `sessionId` + no `task`**: creates an idle session (useful for uploading files before running a task).
|
|
704
|
+
* - **No `sessionId` + `task`**: creates a new session and immediately runs the task.
|
|
705
|
+
* - **`sessionId` + `task`**: dispatches the task to an existing idle session.
|
|
706
|
+
* - **`sessionId` + no `task`**: returns 422 — a task is required when targeting an existing session.
|
|
650
707
|
*/
|
|
651
708
|
RunTaskRequest: {
|
|
652
|
-
/**
|
|
709
|
+
/**
|
|
710
|
+
* Task
|
|
711
|
+
* @description The natural-language instruction for the agent to execute (e.g. "Go to amazon.com and find the best-rated wireless mouse under $50"). Required when dispatching to an existing session.
|
|
712
|
+
*/
|
|
653
713
|
task?: string | null;
|
|
654
|
-
/**
|
|
714
|
+
/**
|
|
715
|
+
* @description The model to use. "gemini-3-flash" is fast and cheap, "claude-sonnet-4.6" is balanced, "claude-opus-4.6" is most capable. See BuModel for details.
|
|
716
|
+
* @default claude-sonnet-4.6
|
|
717
|
+
*/
|
|
655
718
|
model: components["schemas"]["BuModel"];
|
|
656
|
-
/**
|
|
719
|
+
/**
|
|
720
|
+
* Sessionid
|
|
721
|
+
* @description ID of an existing idle session to dispatch the task to. If omitted, a new session is created.
|
|
722
|
+
*/
|
|
657
723
|
sessionId?: string | null;
|
|
658
724
|
/**
|
|
659
725
|
* Keepalive
|
|
726
|
+
* @description If true, the session stays alive in idle state after the task completes instead of automatically stopping. This lets you dispatch follow-up tasks to the same session, preserving browser state and files.
|
|
660
727
|
* @default false
|
|
661
728
|
*/
|
|
662
729
|
keepAlive: boolean;
|
|
663
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* 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).
|
|
733
|
+
*/
|
|
664
734
|
maxCostUsd?: number | string | null;
|
|
665
|
-
/**
|
|
735
|
+
/**
|
|
736
|
+
* Profileid
|
|
737
|
+
* @description ID of a browser profile to load into the session. Profiles persist cookies, local storage, and other browser state across sessions. Create profiles via the Profiles API.
|
|
738
|
+
*/
|
|
666
739
|
profileId?: string | null;
|
|
667
|
-
/**
|
|
740
|
+
/**
|
|
741
|
+
* Workspaceid
|
|
742
|
+
* @description ID of a workspace to attach to the session. Workspaces provide persistent file storage that carries across sessions. Create workspaces via the Workspaces API.
|
|
743
|
+
*/
|
|
668
744
|
workspaceId?: string | null;
|
|
669
|
-
/**
|
|
745
|
+
/**
|
|
746
|
+
* @description Country code for the browser proxy (e.g. "US", "DE", "JP"). Set to null to disable the proxy. The proxy routes browser traffic through the specified country, useful for accessing geo-restricted content.
|
|
747
|
+
* @default us
|
|
748
|
+
*/
|
|
670
749
|
proxyCountryCode: components["schemas"]["ProxyCountryCode"] | null;
|
|
671
|
-
/**
|
|
750
|
+
/**
|
|
751
|
+
* Outputschema
|
|
752
|
+
* @description A JSON Schema that the agent's final output must conform to. When set, the agent will return structured data matching this schema in the `output` field of the response. Example: {"type": "object", "properties": {"price": {"type": "number"}, "title": {"type": "string"}}}.
|
|
753
|
+
*/
|
|
672
754
|
outputSchema?: {
|
|
673
755
|
[key: string]: unknown;
|
|
674
756
|
} | null;
|
|
675
757
|
/**
|
|
676
758
|
* Enablescheduledtasks
|
|
759
|
+
* @description If true, the agent can create scheduled tasks that run on a recurring basis (e.g. "every Monday morning, check my inbox and summarize new emails"). Scheduled tasks are tied to your project and persist beyond the session. Note: all scheduled tasks are visible project-wide, so avoid enabling this in multi-user setups where task isolation is needed.
|
|
677
760
|
* @default false
|
|
678
761
|
*/
|
|
679
762
|
enableScheduledTasks: boolean;
|
|
680
763
|
/**
|
|
681
764
|
* Enablerecording
|
|
765
|
+
* @description If true, records a video of the browser session. The recording URLs will be available in the `recordingUrls` field of the session response after the task completes.
|
|
682
766
|
* @default false
|
|
683
767
|
*/
|
|
684
768
|
enableRecording: boolean;
|
|
685
769
|
/**
|
|
686
770
|
* Skills
|
|
771
|
+
* @description If true, enables built-in agent skills like Google Sheets integration and file management. Set to false to restrict the agent to browser-only actions.
|
|
687
772
|
* @default true
|
|
688
773
|
*/
|
|
689
774
|
skills: boolean;
|
|
690
775
|
/**
|
|
691
776
|
* Agentmail
|
|
777
|
+
* @description If true, provisions a temporary email inbox (via AgentMail) for the session. The email address is available in the `agentmailEmail` field of the session response. Useful for tasks that require email verification or sign-ups.
|
|
692
778
|
* @default true
|
|
693
779
|
*/
|
|
694
780
|
agentmail: boolean;
|
|
781
|
+
/**
|
|
782
|
+
* Cachescript
|
|
783
|
+
* @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}}".
|
|
784
|
+
*/
|
|
785
|
+
cacheScript?: boolean | null;
|
|
786
|
+
/**
|
|
787
|
+
* Autoheal
|
|
788
|
+
* @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.
|
|
789
|
+
* @default true
|
|
790
|
+
*/
|
|
791
|
+
autoHeal: boolean;
|
|
695
792
|
};
|
|
696
793
|
/** SessionListResponse */
|
|
697
794
|
SessionListResponse: {
|
|
698
|
-
/**
|
|
795
|
+
/**
|
|
796
|
+
* Sessions
|
|
797
|
+
* @description List of sessions.
|
|
798
|
+
*/
|
|
699
799
|
sessions: components["schemas"]["SessionResponse"][];
|
|
700
|
-
/**
|
|
800
|
+
/**
|
|
801
|
+
* Total
|
|
802
|
+
* @description Total number of sessions matching the query.
|
|
803
|
+
*/
|
|
701
804
|
total: number;
|
|
702
|
-
/**
|
|
805
|
+
/**
|
|
806
|
+
* Page
|
|
807
|
+
* @description Current page number (1-indexed).
|
|
808
|
+
*/
|
|
703
809
|
page: number;
|
|
704
|
-
/**
|
|
810
|
+
/**
|
|
811
|
+
* Pagesize
|
|
812
|
+
* @description Number of sessions per page.
|
|
813
|
+
*/
|
|
705
814
|
pageSize: number;
|
|
706
815
|
};
|
|
707
816
|
/**
|
|
@@ -715,94 +824,147 @@ interface components {
|
|
|
715
824
|
*/
|
|
716
825
|
detail: string;
|
|
717
826
|
};
|
|
718
|
-
/**
|
|
827
|
+
/**
|
|
828
|
+
* SessionResponse
|
|
829
|
+
* @description Represents a session and its current state.
|
|
830
|
+
*
|
|
831
|
+
* Poll this endpoint to track task progress. The `status` field indicates the session lifecycle stage,
|
|
832
|
+
* and `output` contains the agent's structured result once the task completes.
|
|
833
|
+
*/
|
|
719
834
|
SessionResponse: {
|
|
720
835
|
/**
|
|
721
836
|
* Id
|
|
722
837
|
* Format: uuid
|
|
838
|
+
* @description Unique session identifier.
|
|
723
839
|
*/
|
|
724
840
|
id: string;
|
|
841
|
+
/** @description Current session lifecycle status. Progresses through: `created` (sandbox starting) → `idle` (ready, waiting for task) → `running` (task executing) → `stopped` / `timed_out` / `error`. Poll this field to track progress. */
|
|
725
842
|
status: components["schemas"]["BuAgentSessionStatus"];
|
|
726
|
-
/** The model used
|
|
727
|
-
model:
|
|
728
|
-
/**
|
|
843
|
+
/** @description The model tier used for this session. */
|
|
844
|
+
model: components["schemas"]["BuModel"];
|
|
845
|
+
/**
|
|
846
|
+
* Title
|
|
847
|
+
* @description Auto-generated short title summarizing the task. Available after the task starts running.
|
|
848
|
+
*/
|
|
729
849
|
title?: string | null;
|
|
730
|
-
/**
|
|
850
|
+
/**
|
|
851
|
+
* Output
|
|
852
|
+
* @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. Populated once the task completes, regardless of whether `isTaskSuccessful` is true or false.
|
|
853
|
+
*/
|
|
731
854
|
output?: unknown | null;
|
|
732
|
-
/**
|
|
855
|
+
/**
|
|
856
|
+
* Outputschema
|
|
857
|
+
* @description The JSON Schema that was requested for structured output, if any.
|
|
858
|
+
*/
|
|
733
859
|
outputSchema?: {
|
|
734
860
|
[key: string]: unknown;
|
|
735
861
|
} | null;
|
|
736
862
|
/**
|
|
737
863
|
* Stepcount
|
|
864
|
+
* @description Number of steps the agent has executed so far.
|
|
738
865
|
* @default 0
|
|
739
866
|
*/
|
|
740
867
|
stepCount: number;
|
|
741
|
-
/**
|
|
868
|
+
/**
|
|
869
|
+
* Laststepsummary
|
|
870
|
+
* @description Human-readable summary of the most recent agent step (e.g. "Clicking the Submit button"). Useful for showing real-time progress.
|
|
871
|
+
*/
|
|
742
872
|
lastStepSummary?: string | null;
|
|
743
|
-
/**
|
|
873
|
+
/**
|
|
874
|
+
* Istasksuccessful
|
|
875
|
+
* @description Whether the task completed successfully. `true` if the agent achieved the goal, `false` if it failed or gave up, `null` if the task is still running or no task was dispatched.
|
|
876
|
+
*/
|
|
744
877
|
isTaskSuccessful?: boolean | null;
|
|
745
|
-
/**
|
|
878
|
+
/**
|
|
879
|
+
* Liveurl
|
|
880
|
+
* @description URL to view the live browser session. Available immediately on session creation — can be embedded in an iframe to show the browser in real time.
|
|
881
|
+
*/
|
|
746
882
|
liveUrl?: string | null;
|
|
747
883
|
/**
|
|
748
884
|
* Recordingurls
|
|
885
|
+
* @description URLs to download session recordings. Only populated if `enableRecording` was set to true and the task has completed.
|
|
749
886
|
* @default []
|
|
750
887
|
*/
|
|
751
888
|
recordingUrls: string[];
|
|
752
|
-
/**
|
|
889
|
+
/**
|
|
890
|
+
* Profileid
|
|
891
|
+
* @description ID of the browser profile loaded in this session, if any.
|
|
892
|
+
*/
|
|
753
893
|
profileId?: string | null;
|
|
754
|
-
/**
|
|
894
|
+
/**
|
|
895
|
+
* Workspaceid
|
|
896
|
+
* @description ID of the workspace attached to this session, if any.
|
|
897
|
+
*/
|
|
755
898
|
workspaceId?: string | null;
|
|
899
|
+
/** @description Country code of the proxy used for this session, or null if no proxy. */
|
|
756
900
|
proxyCountryCode?: components["schemas"]["ProxyCountryCode"] | null;
|
|
757
|
-
/**
|
|
901
|
+
/**
|
|
902
|
+
* Maxcostusd
|
|
903
|
+
* @description Maximum cost limit in USD set for this session.
|
|
904
|
+
*/
|
|
758
905
|
maxCostUsd?: string | null;
|
|
759
906
|
/**
|
|
760
907
|
* Totalinputtokens
|
|
908
|
+
* @description Total LLM input tokens consumed by this session.
|
|
761
909
|
* @default 0
|
|
762
910
|
*/
|
|
763
911
|
totalInputTokens: number;
|
|
764
912
|
/**
|
|
765
913
|
* Totaloutputtokens
|
|
914
|
+
* @description Total LLM output tokens consumed by this session.
|
|
766
915
|
* @default 0
|
|
767
916
|
*/
|
|
768
917
|
totalOutputTokens: number;
|
|
769
918
|
/**
|
|
770
919
|
* Proxyusedmb
|
|
920
|
+
* @description Proxy bandwidth used in megabytes.
|
|
771
921
|
* @default 0
|
|
772
922
|
*/
|
|
773
923
|
proxyUsedMb: string;
|
|
774
924
|
/**
|
|
775
925
|
* Llmcostusd
|
|
926
|
+
* @description Cost of LLM usage in USD.
|
|
776
927
|
* @default 0
|
|
777
928
|
*/
|
|
778
929
|
llmCostUsd: string;
|
|
779
930
|
/**
|
|
780
931
|
* Proxycostusd
|
|
932
|
+
* @description Cost of proxy bandwidth in USD.
|
|
781
933
|
* @default 0
|
|
782
934
|
*/
|
|
783
935
|
proxyCostUsd: string;
|
|
784
936
|
/**
|
|
785
937
|
* Browsercostusd
|
|
938
|
+
* @description Cost of browser compute time in USD.
|
|
786
939
|
* @default 0
|
|
787
940
|
*/
|
|
788
941
|
browserCostUsd: string;
|
|
789
942
|
/**
|
|
790
943
|
* Totalcostusd
|
|
944
|
+
* @description Total session cost in USD (LLM + proxy + browser).
|
|
791
945
|
* @default 0
|
|
792
946
|
*/
|
|
793
947
|
totalCostUsd: string;
|
|
794
|
-
/**
|
|
948
|
+
/**
|
|
949
|
+
* Screenshoturl
|
|
950
|
+
* @description URL of the latest browser screenshot. This is a presigned URL that expires after 5 minutes. A new URL is generated each time you fetch the session.
|
|
951
|
+
*/
|
|
795
952
|
screenshotUrl?: string | null;
|
|
796
|
-
/**
|
|
953
|
+
/**
|
|
954
|
+
* Agentmailemail
|
|
955
|
+
* @description Temporary email address provisioned for this session (via AgentMail). Only present if `agentmail` was enabled.
|
|
956
|
+
*/
|
|
797
957
|
agentmailEmail?: string | null;
|
|
798
958
|
/**
|
|
799
959
|
* Createdat
|
|
800
960
|
* Format: date-time
|
|
961
|
+
* @description When the session was created.
|
|
801
962
|
*/
|
|
802
963
|
createdAt: string;
|
|
803
964
|
/**
|
|
804
965
|
* Updatedat
|
|
805
966
|
* Format: date-time
|
|
967
|
+
* @description When the session was last updated.
|
|
806
968
|
*/
|
|
807
969
|
updatedAt: string;
|
|
808
970
|
};
|
|
@@ -819,11 +981,18 @@ interface components {
|
|
|
819
981
|
};
|
|
820
982
|
/** StopSessionRequest */
|
|
821
983
|
StopSessionRequest: {
|
|
822
|
-
/**
|
|
984
|
+
/**
|
|
985
|
+
* @description How to stop the session. Use "task" to stop only the current task and keep the session alive, or "session" to destroy the sandbox entirely.
|
|
986
|
+
* @default session
|
|
987
|
+
*/
|
|
823
988
|
strategy: components["schemas"]["StopStrategy"];
|
|
824
989
|
};
|
|
825
990
|
/**
|
|
826
991
|
* StopStrategy
|
|
992
|
+
* @description Strategy for stopping a session.
|
|
993
|
+
*
|
|
994
|
+
* - `task`: Stop the currently running task but keep the session alive in idle state. You can dispatch another task to the same session afterwards.
|
|
995
|
+
* - `session`: Stop the session entirely and destroy the sandbox. The session cannot be reused after this.
|
|
827
996
|
* @enum {string}
|
|
828
997
|
*/
|
|
829
998
|
StopStrategy: "task" | "session";
|
|
@@ -1004,22 +1173,12 @@ type RunTaskRequest$2 = components["schemas"]["RunTaskRequest"];
|
|
|
1004
1173
|
type CreateSessionBody = Partial<RunTaskRequest$2>;
|
|
1005
1174
|
type SessionResponse$2 = components["schemas"]["SessionResponse"];
|
|
1006
1175
|
type SessionListResponse$1 = components["schemas"]["SessionListResponse"];
|
|
1007
|
-
type FileListResponse$2 = components["schemas"]["FileListResponse"];
|
|
1008
1176
|
type StopSessionRequest$1 = components["schemas"]["StopSessionRequest"];
|
|
1009
|
-
type FileUploadRequest$2 = components["schemas"]["FileUploadRequest"];
|
|
1010
|
-
type FileUploadResponse$2 = components["schemas"]["FileUploadResponse"];
|
|
1011
1177
|
type MessageListResponse$1 = components["schemas"]["MessageListResponse"];
|
|
1012
1178
|
interface SessionListParams {
|
|
1013
1179
|
page?: number;
|
|
1014
1180
|
page_size?: number;
|
|
1015
1181
|
}
|
|
1016
|
-
interface SessionFilesParams {
|
|
1017
|
-
prefix?: string;
|
|
1018
|
-
limit?: number;
|
|
1019
|
-
cursor?: string | null;
|
|
1020
|
-
includeUrls?: boolean;
|
|
1021
|
-
shallow?: boolean;
|
|
1022
|
-
}
|
|
1023
1182
|
interface SessionMessagesParams {
|
|
1024
1183
|
after?: string | null;
|
|
1025
1184
|
before?: string | null;
|
|
@@ -1038,10 +1197,6 @@ declare class Sessions {
|
|
|
1038
1197
|
stop(sessionId: string, body?: StopSessionRequest$1): Promise<SessionResponse$2>;
|
|
1039
1198
|
/** Soft-delete a session. */
|
|
1040
1199
|
delete(sessionId: string): Promise<void>;
|
|
1041
|
-
/** Get presigned upload URLs for session files. */
|
|
1042
|
-
uploadFiles(sessionId: string, body: FileUploadRequest$2): Promise<FileUploadResponse$2>;
|
|
1043
|
-
/** List files in a session's workspace. */
|
|
1044
|
-
files(sessionId: string, params?: SessionFilesParams): Promise<FileListResponse$2>;
|
|
1045
1200
|
/** List messages for a session with cursor-based pagination. */
|
|
1046
1201
|
messages(sessionId: string, params?: SessionMessagesParams): Promise<MessageListResponse$1>;
|
|
1047
1202
|
/**
|
|
@@ -1248,4 +1403,4 @@ type BuModel = S["BuModel"];
|
|
|
1248
1403
|
type ProxyCountryCode = S["ProxyCountryCode"];
|
|
1249
1404
|
type StopStrategy = S["StopStrategy"];
|
|
1250
1405
|
|
|
1251
|
-
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
|
|
1406
|
+
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 };
|