File tree 4 files changed +9
-0
lines changed
4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @browserbasehq/stagehand " : patch
3
+ ---
4
+
5
+ Added support for resuming a Stagehand session created on the API.
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export class StagehandAPI {
51
51
waitForCaptchaSolves,
52
52
actionTimeoutMs,
53
53
browserbaseSessionCreateParams,
54
+ browserbaseSessionId,
54
55
} : StartSessionParams ) : Promise < StartSessionResult > {
55
56
const sessionResponse = await this . request ( "/sessions/start" , {
56
57
method : "POST" ,
@@ -64,6 +65,7 @@ export class StagehandAPI {
64
65
waitForCaptchaSolves,
65
66
actionTimeoutMs,
66
67
browserbaseSessionCreateParams,
68
+ browserbaseSessionId,
67
69
} ) ,
68
70
headers : {
69
71
"x-model-api-key" : modelApiKey ,
Original file line number Diff line number Diff line change @@ -630,6 +630,7 @@ export class Stagehand {
630
630
waitForCaptchaSolves : this . waitForCaptchaSolves ,
631
631
actionTimeoutMs : this . actTimeoutMs ,
632
632
browserbaseSessionCreateParams : this . browserbaseSessionCreateParams ,
633
+ browserbaseSessionId : this . browserbaseSessionID ,
633
634
} ) ;
634
635
this . browserbaseSessionID = sessionId ;
635
636
}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export interface StartSessionParams {
24
24
selfHeal ?: boolean ;
25
25
waitForCaptchaSolves ?: boolean ;
26
26
actionTimeoutMs ?: number ;
27
+ browserbaseSessionId ?: string ;
27
28
}
28
29
29
30
export interface StartSessionResult {
You can’t perform that action at this time.
0 commit comments