playwright-core 1.58.0-alpha-2025-12-11 → 1.58.0-alpha-2025-12-13

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/types/types.d.ts CHANGED
@@ -3839,10 +3839,24 @@ export interface Page {
3839
3839
  key?: string;
3840
3840
 
3841
3841
  /**
3842
- * Maximum number of agentic steps to take while performing this action.
3842
+ * Maximum number of tokens to consume. The agentic loop will stop after input + output tokens exceed this value.
3843
+ * Defaults to context-wide value specified in `agent` property.
3844
+ */
3845
+ maxTokens?: number;
3846
+
3847
+ /**
3848
+ * Maximum number of agentic turns during this call, defaults to context-wide value specified in `agent` property.
3843
3849
  */
3844
3850
  maxTurns?: number;
3845
- }): Promise<void>;
3851
+ }): Promise<{
3852
+ usage: {
3853
+ turns: number;
3854
+
3855
+ inputTokens: number;
3856
+
3857
+ outputTokens: number;
3858
+ };
3859
+ }>;
3846
3860
 
3847
3861
  /**
3848
3862
  * **NOTE** Use locator-based [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press)
@@ -22110,6 +22124,17 @@ export interface BrowserContextOptions {
22110
22124
  * Secrets to hide from the LLM.
22111
22125
  */
22112
22126
  secrets?: { [key: string]: string; };
22127
+
22128
+ /**
22129
+ * Maximum number of agentic turns to take per call. Defaults to 10.
22130
+ */
22131
+ maxTurns?: number;
22132
+
22133
+ /**
22134
+ * Maximum number of tokens to consume per call. The agentic loop will stop after input + output tokens exceed this
22135
+ * value. Defaults on unlimited.
22136
+ */
22137
+ maxTokens?: number;
22113
22138
  };
22114
22139
 
22115
22140
  /**