1111
1212/**
1313 * @phpstan-type ExecuteOptionsShape = array{
14- * instruction: string, highlightCursor?: bool|null, maxSteps?: float|null
14+ * instruction: string,
15+ * highlightCursor?: bool|null,
16+ * maxSteps?: float|null,
17+ * toolTimeout?: float|null,
18+ * useSearch?: bool|null,
1519 * }
1620 */
1721final class ExecuteOptions implements BaseModel
@@ -37,6 +41,18 @@ final class ExecuteOptions implements BaseModel
3741 #[Optional]
3842 public ?float $ maxSteps ;
3943
44+ /**
45+ * Timeout in milliseconds for each agent tool call.
46+ */
47+ #[Optional]
48+ public ?float $ toolTimeout ;
49+
50+ /**
51+ * Whether to enable the web search tool powered by Browserbase Search API.
52+ */
53+ #[Optional]
54+ public ?bool $ useSearch ;
55+
4056 /**
4157 * `new ExecuteOptions()` is missing required properties by the API.
4258 *
@@ -64,14 +80,18 @@ public function __construct()
6480 public static function with (
6581 string $ instruction ,
6682 ?bool $ highlightCursor = null ,
67- ?float $ maxSteps = null
83+ ?float $ maxSteps = null ,
84+ ?float $ toolTimeout = null ,
85+ ?bool $ useSearch = null ,
6886 ): self {
6987 $ self = new self ;
7088
7189 $ self ['instruction ' ] = $ instruction ;
7290
7391 null !== $ highlightCursor && $ self ['highlightCursor ' ] = $ highlightCursor ;
7492 null !== $ maxSteps && $ self ['maxSteps ' ] = $ maxSteps ;
93+ null !== $ toolTimeout && $ self ['toolTimeout ' ] = $ toolTimeout ;
94+ null !== $ useSearch && $ self ['useSearch ' ] = $ useSearch ;
7595
7696 return $ self ;
7797 }
@@ -108,4 +128,26 @@ public function withMaxSteps(float $maxSteps): self
108128
109129 return $ self ;
110130 }
131+
132+ /**
133+ * Timeout in milliseconds for each agent tool call.
134+ */
135+ public function withToolTimeout (float $ toolTimeout ): self
136+ {
137+ $ self = clone $ this ;
138+ $ self ['toolTimeout ' ] = $ toolTimeout ;
139+
140+ return $ self ;
141+ }
142+
143+ /**
144+ * Whether to enable the web search tool powered by Browserbase Search API.
145+ */
146+ public function withUseSearch (bool $ useSearch ): self
147+ {
148+ $ self = clone $ this ;
149+ $ self ['useSearch ' ] = $ useSearch ;
150+
151+ return $ self ;
152+ }
111153}
0 commit comments