browser-use 0.1.0 → 0.3.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.
Files changed (258) hide show
  1. package/README.md +301 -636
  2. package/dist/actor/element.d.ts +19 -0
  3. package/dist/actor/element.js +46 -0
  4. package/dist/actor/index.d.ts +4 -0
  5. package/dist/actor/index.js +4 -0
  6. package/dist/actor/mouse.d.ts +19 -0
  7. package/dist/actor/mouse.js +39 -0
  8. package/dist/actor/page.d.ts +29 -0
  9. package/dist/actor/page.js +88 -0
  10. package/dist/actor/utils.d.ts +4 -0
  11. package/dist/actor/utils.js +35 -0
  12. package/dist/agent/cloud-events.d.ts +18 -0
  13. package/dist/agent/cloud-events.js +65 -2
  14. package/dist/agent/gif.d.ts +1 -0
  15. package/dist/agent/gif.js +24 -2
  16. package/dist/agent/judge.d.ts +17 -0
  17. package/dist/agent/judge.js +197 -0
  18. package/dist/agent/message-manager/service.d.ts +12 -4
  19. package/dist/agent/message-manager/service.js +205 -39
  20. package/dist/agent/message-manager/utils.js +0 -1
  21. package/dist/agent/message-manager/views.d.ts +4 -0
  22. package/dist/agent/message-manager/views.js +11 -7
  23. package/dist/agent/prompts.d.ts +24 -3
  24. package/dist/agent/prompts.js +274 -59
  25. package/dist/agent/service.d.ts +99 -40
  26. package/dist/agent/service.js +2282 -474
  27. package/dist/agent/variable-detector.d.ts +12 -0
  28. package/dist/agent/variable-detector.js +211 -0
  29. package/dist/agent/views.d.ts +237 -17
  30. package/dist/agent/views.js +446 -32
  31. package/dist/browser/cloud/cloud.d.ts +20 -0
  32. package/dist/browser/cloud/cloud.js +129 -0
  33. package/dist/browser/cloud/index.d.ts +2 -0
  34. package/dist/browser/cloud/index.js +2 -0
  35. package/dist/browser/cloud/views.d.ts +41 -0
  36. package/dist/browser/cloud/views.js +35 -0
  37. package/dist/browser/events.d.ts +345 -0
  38. package/dist/browser/events.js +566 -0
  39. package/dist/browser/extensions.js +17 -17
  40. package/dist/browser/index.d.ts +4 -0
  41. package/dist/browser/index.js +4 -0
  42. package/dist/browser/profile.d.ts +8 -2
  43. package/dist/browser/profile.js +79 -12
  44. package/dist/browser/session-manager.d.ts +85 -0
  45. package/dist/browser/session-manager.js +208 -0
  46. package/dist/browser/session.d.ts +100 -8
  47. package/dist/browser/session.js +1102 -63
  48. package/dist/browser/types.d.ts +0 -2
  49. package/dist/browser/views.d.ts +39 -0
  50. package/dist/browser/views.js +32 -0
  51. package/dist/browser/watchdogs/aboutblank-watchdog.d.ts +12 -0
  52. package/dist/browser/watchdogs/aboutblank-watchdog.js +131 -0
  53. package/dist/browser/watchdogs/base.d.ts +21 -0
  54. package/dist/browser/watchdogs/base.js +81 -0
  55. package/dist/browser/watchdogs/cdp-session-watchdog.d.ts +14 -0
  56. package/dist/browser/watchdogs/cdp-session-watchdog.js +177 -0
  57. package/dist/browser/watchdogs/crash-watchdog.d.ts +38 -0
  58. package/dist/browser/watchdogs/crash-watchdog.js +296 -0
  59. package/dist/browser/watchdogs/default-action-watchdog.d.ts +49 -0
  60. package/dist/browser/watchdogs/default-action-watchdog.js +212 -0
  61. package/dist/browser/watchdogs/dom-watchdog.d.ts +8 -0
  62. package/dist/browser/watchdogs/dom-watchdog.js +31 -0
  63. package/dist/browser/watchdogs/downloads-watchdog.d.ts +77 -0
  64. package/dist/browser/watchdogs/downloads-watchdog.js +409 -0
  65. package/dist/browser/watchdogs/har-recording-watchdog.d.ts +19 -0
  66. package/dist/browser/watchdogs/har-recording-watchdog.js +317 -0
  67. package/dist/browser/watchdogs/index.d.ts +15 -0
  68. package/dist/browser/watchdogs/index.js +15 -0
  69. package/dist/browser/watchdogs/local-browser-watchdog.d.ts +10 -0
  70. package/dist/browser/watchdogs/local-browser-watchdog.js +32 -0
  71. package/dist/browser/watchdogs/permissions-watchdog.d.ts +8 -0
  72. package/dist/browser/watchdogs/permissions-watchdog.js +73 -0
  73. package/dist/browser/watchdogs/popups-watchdog.d.ts +13 -0
  74. package/dist/browser/watchdogs/popups-watchdog.js +77 -0
  75. package/dist/browser/watchdogs/recording-watchdog.d.ts +27 -0
  76. package/dist/browser/watchdogs/recording-watchdog.js +249 -0
  77. package/dist/browser/watchdogs/screenshot-watchdog.d.ts +6 -0
  78. package/dist/browser/watchdogs/screenshot-watchdog.js +13 -0
  79. package/dist/browser/watchdogs/security-watchdog.d.ts +10 -0
  80. package/dist/browser/watchdogs/security-watchdog.js +84 -0
  81. package/dist/browser/watchdogs/storage-state-watchdog.d.ts +24 -0
  82. package/dist/browser/watchdogs/storage-state-watchdog.js +288 -0
  83. package/dist/cli.d.ts +41 -0
  84. package/dist/cli.js +820 -10
  85. package/dist/code-use/formatting.d.ts +3 -0
  86. package/dist/code-use/formatting.js +18 -0
  87. package/dist/code-use/index.d.ts +6 -0
  88. package/dist/code-use/index.js +6 -0
  89. package/dist/code-use/namespace.d.ts +5 -0
  90. package/dist/code-use/namespace.js +81 -0
  91. package/dist/code-use/notebook-export.d.ts +3 -0
  92. package/dist/code-use/notebook-export.js +56 -0
  93. package/dist/code-use/service.d.ts +24 -0
  94. package/dist/code-use/service.js +104 -0
  95. package/dist/code-use/utils.d.ts +4 -0
  96. package/dist/code-use/utils.js +98 -0
  97. package/dist/code-use/views.d.ts +108 -0
  98. package/dist/code-use/views.js +165 -0
  99. package/dist/config.d.ts +13 -0
  100. package/dist/config.js +69 -3
  101. package/dist/controller/registry/service.d.ts +10 -1
  102. package/dist/controller/registry/service.js +266 -10
  103. package/dist/controller/registry/views.d.ts +4 -1
  104. package/dist/controller/registry/views.js +25 -2
  105. package/dist/controller/service.d.ts +10 -1
  106. package/dist/controller/service.js +1849 -288
  107. package/dist/controller/views.d.ts +78 -155
  108. package/dist/controller/views.js +61 -12
  109. package/dist/dom/history-tree-processor/service.d.ts +5 -0
  110. package/dist/dom/history-tree-processor/service.js +169 -14
  111. package/dist/dom/history-tree-processor/view.d.ts +7 -1
  112. package/dist/dom/history-tree-processor/view.js +10 -1
  113. package/dist/dom/markdown-extractor.d.ts +37 -0
  114. package/dist/dom/markdown-extractor.js +345 -0
  115. package/dist/dom/service.d.ts +3 -1
  116. package/dist/dom/service.js +76 -0
  117. package/dist/dom/views.d.ts +1 -0
  118. package/dist/dom/views.js +45 -0
  119. package/dist/event-bus.d.ts +107 -7
  120. package/dist/event-bus.js +313 -10
  121. package/dist/filesystem/file-system.d.ts +18 -0
  122. package/dist/filesystem/file-system.js +530 -42
  123. package/dist/index.d.ts +7 -0
  124. package/dist/index.js +6 -0
  125. package/dist/integrations/gmail/actions.d.ts +3 -3
  126. package/dist/integrations/gmail/actions.js +5 -5
  127. package/dist/llm/anthropic/chat.d.ts +18 -1
  128. package/dist/llm/anthropic/chat.js +123 -55
  129. package/dist/llm/anthropic/serializer.d.ts +2 -0
  130. package/dist/llm/anthropic/serializer.js +81 -9
  131. package/dist/llm/aws/chat-anthropic.d.ts +17 -0
  132. package/dist/llm/aws/chat-anthropic.js +129 -40
  133. package/dist/llm/aws/chat-bedrock.d.ts +28 -1
  134. package/dist/llm/aws/chat-bedrock.js +161 -34
  135. package/dist/llm/aws/serializer.d.ts +13 -1
  136. package/dist/llm/aws/serializer.js +56 -17
  137. package/dist/llm/azure/chat.d.ts +53 -2
  138. package/dist/llm/azure/chat.js +366 -53
  139. package/dist/llm/base.d.ts +2 -0
  140. package/dist/llm/browser-use/chat.d.ts +40 -0
  141. package/dist/llm/browser-use/chat.js +305 -0
  142. package/dist/llm/browser-use/index.d.ts +1 -0
  143. package/dist/llm/browser-use/index.js +1 -0
  144. package/dist/llm/cerebras/chat.d.ts +39 -0
  145. package/dist/llm/cerebras/chat.js +178 -0
  146. package/dist/llm/cerebras/index.d.ts +2 -0
  147. package/dist/llm/cerebras/index.js +2 -0
  148. package/dist/llm/cerebras/serializer.d.ts +7 -0
  149. package/dist/llm/cerebras/serializer.js +82 -0
  150. package/dist/llm/deepseek/chat.d.ts +19 -2
  151. package/dist/llm/deepseek/chat.js +138 -25
  152. package/dist/llm/google/chat.d.ts +46 -2
  153. package/dist/llm/google/chat.js +268 -63
  154. package/dist/llm/google/serializer.d.ts +9 -1
  155. package/dist/llm/google/serializer.js +141 -34
  156. package/dist/llm/groq/chat.d.ts +21 -2
  157. package/dist/llm/groq/chat.js +125 -26
  158. package/dist/llm/groq/parser.js +3 -1
  159. package/dist/llm/messages.d.ts +4 -4
  160. package/dist/llm/mistral/chat.d.ts +43 -0
  161. package/dist/llm/mistral/chat.js +154 -0
  162. package/dist/llm/mistral/index.d.ts +2 -0
  163. package/dist/llm/mistral/index.js +2 -0
  164. package/dist/llm/mistral/schema.d.ts +8 -0
  165. package/dist/llm/mistral/schema.js +27 -0
  166. package/dist/llm/models.d.ts +2 -0
  167. package/dist/llm/models.js +317 -0
  168. package/dist/llm/ollama/chat.d.ts +13 -1
  169. package/dist/llm/ollama/chat.js +110 -19
  170. package/dist/llm/ollama/serializer.d.ts +1 -0
  171. package/dist/llm/ollama/serializer.js +34 -12
  172. package/dist/llm/openai/chat.d.ts +16 -0
  173. package/dist/llm/openai/chat.js +94 -44
  174. package/dist/llm/openai/like.d.ts +5 -3
  175. package/dist/llm/openai/like.js +7 -3
  176. package/dist/llm/openai/responses-serializer.d.ts +18 -0
  177. package/dist/llm/openai/responses-serializer.js +72 -0
  178. package/dist/llm/openrouter/chat.d.ts +28 -2
  179. package/dist/llm/openrouter/chat.js +115 -29
  180. package/dist/llm/schema.d.ts +11 -1
  181. package/dist/llm/schema.js +81 -1
  182. package/dist/llm/vercel/chat.d.ts +50 -0
  183. package/dist/llm/vercel/chat.js +276 -0
  184. package/dist/llm/vercel/index.d.ts +1 -0
  185. package/dist/llm/vercel/index.js +1 -0
  186. package/dist/llm/vercel/serializer.d.ts +5 -0
  187. package/dist/llm/vercel/serializer.js +7 -0
  188. package/dist/llm/views.d.ts +2 -1
  189. package/dist/llm/views.js +3 -1
  190. package/dist/logging-config.d.ts +2 -0
  191. package/dist/logging-config.js +82 -29
  192. package/dist/mcp/client.d.ts +10 -5
  193. package/dist/mcp/client.js +21 -15
  194. package/dist/mcp/controller.d.ts +42 -3
  195. package/dist/mcp/controller.js +56 -31
  196. package/dist/mcp/server.d.ts +14 -0
  197. package/dist/mcp/server.js +257 -51
  198. package/dist/observability.js +10 -4
  199. package/dist/sandbox/index.d.ts +2 -0
  200. package/dist/sandbox/index.js +2 -0
  201. package/dist/sandbox/sandbox.d.ts +19 -0
  202. package/dist/sandbox/sandbox.js +140 -0
  203. package/dist/sandbox/views.d.ts +67 -0
  204. package/dist/sandbox/views.js +121 -0
  205. package/dist/skill-cli/index.d.ts +3 -0
  206. package/dist/skill-cli/index.js +3 -0
  207. package/dist/skill-cli/protocol.d.ts +30 -0
  208. package/dist/skill-cli/protocol.js +48 -0
  209. package/dist/skill-cli/server.d.ts +11 -0
  210. package/dist/skill-cli/server.js +85 -0
  211. package/dist/skill-cli/sessions.d.ts +24 -0
  212. package/dist/skill-cli/sessions.js +47 -0
  213. package/dist/skills/index.d.ts +3 -0
  214. package/dist/skills/index.js +3 -0
  215. package/dist/skills/service.d.ts +27 -0
  216. package/dist/skills/service.js +266 -0
  217. package/dist/skills/utils.d.ts +6 -0
  218. package/dist/skills/utils.js +53 -0
  219. package/dist/skills/views.d.ts +40 -0
  220. package/dist/skills/views.js +10 -0
  221. package/dist/sync/auth.js +8 -3
  222. package/dist/sync/service.d.ts +6 -6
  223. package/dist/sync/service.js +54 -89
  224. package/dist/telemetry/views.d.ts +20 -6
  225. package/dist/telemetry/views.js +23 -5
  226. package/dist/tokens/custom-pricing.d.ts +2 -0
  227. package/dist/tokens/custom-pricing.js +22 -0
  228. package/dist/tokens/index.d.ts +2 -0
  229. package/dist/tokens/index.js +2 -0
  230. package/dist/tokens/mappings.d.ts +1 -0
  231. package/dist/tokens/mappings.js +3 -0
  232. package/dist/tokens/service.js +30 -12
  233. package/dist/tools/extraction/index.d.ts +2 -0
  234. package/dist/tools/extraction/index.js +2 -0
  235. package/dist/tools/extraction/schema-utils.d.ts +6 -0
  236. package/dist/tools/extraction/schema-utils.js +237 -0
  237. package/dist/tools/extraction/views.d.ts +7 -0
  238. package/dist/tools/index.d.ts +5 -0
  239. package/dist/tools/index.js +5 -0
  240. package/dist/tools/registry/index.d.ts +2 -0
  241. package/dist/tools/registry/index.js +2 -0
  242. package/dist/tools/registry/service.d.ts +1 -0
  243. package/dist/tools/registry/service.js +1 -0
  244. package/dist/tools/registry/views.d.ts +1 -0
  245. package/dist/tools/registry/views.js +1 -0
  246. package/dist/tools/service.d.ts +2 -0
  247. package/dist/tools/service.js +1 -0
  248. package/dist/tools/utils.d.ts +2 -0
  249. package/dist/tools/utils.js +57 -0
  250. package/dist/tools/views.d.ts +1 -0
  251. package/dist/tools/views.js +1 -0
  252. package/dist/utils.d.ts +10 -1
  253. package/dist/utils.js +70 -3
  254. package/package.json +265 -28
  255. package/dist/dom/playground/process-dom.js +0 -5
  256. package/dist/dom/playground/test-accessibility.d.ts +0 -44
  257. package/dist/dom/playground/test-accessibility.js +0 -111
  258. /package/dist/{dom/playground/process-dom.d.ts → tools/extraction/views.js} +0 -0
@@ -1,20 +1,26 @@
1
1
  import { ActionModel } from '../controller/registry/views.js';
2
2
  import { BrowserStateHistory } from '../browser/views.js';
3
3
  import type { DOMHistoryElement } from '../dom/history-tree-processor/view.js';
4
- import type { SelectorMap } from '../dom/views.js';
4
+ import { type SelectorMap } from '../dom/views.js';
5
5
  import type { FileSystemState } from '../filesystem/file-system.js';
6
+ import type { BaseChatModel } from '../llm/base.js';
6
7
  import { MessageManagerState } from './message-manager/views.js';
7
8
  import type { UsageSummary } from '../tokens/views.js';
8
9
  export { ActionModel };
9
10
  export interface StructuredOutputParser<T = unknown> {
10
11
  parse?: (input: string) => T;
11
12
  model_validate_json?: (input: string) => T;
13
+ model_json_schema?: () => unknown;
14
+ schema?: unknown;
12
15
  }
13
16
  export interface ActionResultInit {
14
17
  is_done?: boolean | null;
15
18
  success?: boolean | null;
19
+ judgement?: Record<string, unknown> | null;
16
20
  error?: string | null;
17
21
  attachments?: string[] | null;
22
+ images?: Array<Record<string, unknown>> | null;
23
+ metadata?: Record<string, unknown> | null;
18
24
  long_term_memory?: string | null;
19
25
  extracted_content?: string | null;
20
26
  include_extracted_content_only_once?: boolean;
@@ -23,8 +29,11 @@ export interface ActionResultInit {
23
29
  export declare class ActionResult {
24
30
  is_done: boolean | null;
25
31
  success: boolean | null;
32
+ judgement: Record<string, unknown> | null;
26
33
  error: string | null;
27
34
  attachments: string[] | null;
35
+ images: Array<Record<string, unknown>> | null;
36
+ metadata: Record<string, unknown> | null;
28
37
  long_term_memory: string | null;
29
38
  extracted_content: string | null;
30
39
  include_extracted_content_only_once: boolean;
@@ -34,8 +43,11 @@ export declare class ActionResult {
34
43
  toJSON(): {
35
44
  is_done: boolean | null;
36
45
  success: boolean | null;
46
+ judgement: Record<string, unknown> | null;
37
47
  error: string | null;
38
48
  attachments: string[] | null;
49
+ images: Record<string, unknown>[] | null;
50
+ metadata: Record<string, unknown> | null;
39
51
  long_term_memory: string | null;
40
52
  extracted_content: string | null;
41
53
  include_extracted_content_only_once: boolean;
@@ -44,8 +56,11 @@ export declare class ActionResult {
44
56
  model_dump(): {
45
57
  is_done: boolean | null;
46
58
  success: boolean | null;
59
+ judgement: Record<string, unknown> | null;
47
60
  error: string | null;
48
61
  attachments: string[] | null;
62
+ images: Record<string, unknown>[] | null;
63
+ metadata: Record<string, unknown> | null;
49
64
  long_term_memory: string | null;
50
65
  extracted_content: string | null;
51
66
  include_extracted_content_only_once: boolean;
@@ -53,16 +68,49 @@ export declare class ActionResult {
53
68
  };
54
69
  model_dump_json(): string;
55
70
  }
71
+ export declare class PageFingerprint {
72
+ readonly url: string;
73
+ readonly element_count: number;
74
+ readonly text_hash: string;
75
+ constructor(url: string, element_count: number, text_hash: string);
76
+ static from_browser_state(url: string, dom_text: string, element_count: number): PageFingerprint;
77
+ equals(other: PageFingerprint): boolean;
78
+ }
79
+ export declare const compute_action_hash: (action_name: string, params: Record<string, unknown>) => string;
80
+ export declare class ActionLoopDetector {
81
+ window_size: number;
82
+ recent_action_hashes: string[];
83
+ recent_page_fingerprints: PageFingerprint[];
84
+ max_repetition_count: number;
85
+ most_repeated_hash: string | null;
86
+ consecutive_stagnant_pages: number;
87
+ constructor(init?: Partial<ActionLoopDetector>);
88
+ record_action(action_name: string, params: Record<string, unknown>): void;
89
+ record_page_state(url: string, dom_text: string, element_count: number): void;
90
+ private update_repetition_stats;
91
+ get_nudge_message(): string | null;
92
+ }
93
+ export interface MessageCompactionSettings {
94
+ enabled: boolean;
95
+ compact_every_n_steps: number;
96
+ trigger_char_count: number | null;
97
+ trigger_token_count: number | null;
98
+ chars_per_token: number;
99
+ keep_last_items: number;
100
+ summary_max_chars: number;
101
+ include_read_state: boolean;
102
+ compaction_llm: BaseChatModel | null;
103
+ }
104
+ export declare const defaultMessageCompactionSettings: () => MessageCompactionSettings;
105
+ export declare const normalizeMessageCompactionSettings: (settings: Partial<MessageCompactionSettings> | MessageCompactionSettings) => MessageCompactionSettings;
56
106
  export interface AgentSettings {
57
107
  session_attachment_mode: 'copy' | 'strict' | 'shared';
58
- use_vision: boolean;
108
+ use_vision: boolean | 'auto';
109
+ include_recent_events: boolean;
59
110
  vision_detail_level: 'auto' | 'low' | 'high';
60
- use_vision_for_planner: boolean;
61
111
  save_conversation_path: string | null;
62
112
  save_conversation_path_encoding: string | null;
63
113
  max_failures: number;
64
- retry_delay: number;
65
- validate_output: boolean;
66
114
  generate_gif: boolean | string;
67
115
  override_system_message: string | null;
68
116
  extend_system_message: string | null;
@@ -70,16 +118,21 @@ export interface AgentSettings {
70
118
  max_actions_per_step: number;
71
119
  use_thinking: boolean;
72
120
  flash_mode: boolean;
121
+ use_judge: boolean;
122
+ ground_truth: string | null;
73
123
  max_history_items: number | null;
74
124
  page_extraction_llm: unknown | null;
75
- planner_llm: unknown | null;
76
- planner_interval: number;
77
- is_planner_reasoning: boolean;
78
- extend_planner_system_message: string | null;
125
+ enable_planning: boolean;
126
+ planning_replan_on_stall: number;
127
+ planning_exploration_limit: number;
79
128
  calculate_cost: boolean;
80
129
  include_tool_call_examples: boolean;
81
130
  llm_timeout: number;
82
131
  step_timeout: number;
132
+ final_response_after_failure: boolean;
133
+ message_compaction: MessageCompactionSettings | null;
134
+ loop_detection_window: number;
135
+ loop_detection_enabled: boolean;
83
136
  }
84
137
  export declare const defaultAgentSettings: () => AgentSettings;
85
138
  export declare class AgentState {
@@ -88,11 +141,17 @@ export declare class AgentState {
88
141
  consecutive_failures: number;
89
142
  last_result: ActionResult[] | null;
90
143
  last_plan: string | null;
144
+ plan: PlanItem[] | null;
145
+ current_plan_item_index: number;
146
+ plan_generation_step: number | null;
91
147
  last_model_output: AgentOutput | null;
92
148
  paused: boolean;
93
149
  stopped: boolean;
150
+ session_initialized: boolean;
151
+ follow_up_task: boolean;
94
152
  message_manager_state: MessageManagerState;
95
153
  file_system_state: FileSystemState | null;
154
+ loop_detector: ActionLoopDetector;
96
155
  constructor(init?: Partial<AgentState>);
97
156
  model_dump(): Record<string, unknown>;
98
157
  toJSON(): Record<string, unknown>;
@@ -107,9 +166,20 @@ export declare class StepMetadata {
107
166
  step_start_time: number;
108
167
  step_end_time: number;
109
168
  step_number: number;
110
- constructor(step_start_time: number, step_end_time: number, step_number: number);
169
+ step_interval: number | null;
170
+ constructor(step_start_time: number, step_end_time: number, step_number: number, step_interval?: number | null);
111
171
  get duration_seconds(): number;
112
172
  }
173
+ export type PlanItemStatus = 'pending' | 'current' | 'done' | 'skipped';
174
+ export declare class PlanItem {
175
+ text: string;
176
+ status: PlanItemStatus;
177
+ constructor(init?: Partial<PlanItem>);
178
+ model_dump(): {
179
+ text: string;
180
+ status: PlanItemStatus;
181
+ };
182
+ }
113
183
  export interface AgentBrain {
114
184
  thinking: string | null;
115
185
  evaluation_previous_goal: string;
@@ -121,6 +191,8 @@ export declare class AgentOutput {
121
191
  evaluation_previous_goal: string | null;
122
192
  memory: string | null;
123
193
  next_goal: string | null;
194
+ current_plan_item: number | null;
195
+ plan_update: string[] | null;
124
196
  action: ActionModel[];
125
197
  constructor(init?: Partial<AgentOutput>);
126
198
  get current_state(): AgentBrain;
@@ -129,6 +201,8 @@ export declare class AgentOutput {
129
201
  evaluation_previous_goal: string | null;
130
202
  memory: string | null;
131
203
  next_goal: string | null;
204
+ current_plan_item: number | null;
205
+ plan_update: string[] | null;
132
206
  action: any[];
133
207
  };
134
208
  model_dump_json(): string;
@@ -137,6 +211,8 @@ export declare class AgentOutput {
137
211
  evaluation_previous_goal: string | null;
138
212
  memory: string | null;
139
213
  next_goal: string | null;
214
+ current_plan_item: number | null;
215
+ plan_update: string[] | null;
140
216
  action: any[];
141
217
  };
142
218
  static fromJSON(data: any): AgentOutput;
@@ -146,6 +222,8 @@ export declare class AgentOutput {
146
222
  evaluation_previous_goal: string | null;
147
223
  memory: string | null;
148
224
  next_goal: string | null;
225
+ current_plan_item: number | null;
226
+ plan_update: string[] | null;
149
227
  action: ActionModel[];
150
228
  get current_state(): AgentBrain;
151
229
  model_dump(): {
@@ -153,6 +231,8 @@ export declare class AgentOutput {
153
231
  evaluation_previous_goal: string | null;
154
232
  memory: string | null;
155
233
  next_goal: string | null;
234
+ current_plan_item: number | null;
235
+ plan_update: string[] | null;
156
236
  action: any[];
157
237
  };
158
238
  model_dump_json(): string;
@@ -161,6 +241,8 @@ export declare class AgentOutput {
161
241
  evaluation_previous_goal: string | null;
162
242
  memory: string | null;
163
243
  next_goal: string | null;
244
+ current_plan_item: number | null;
245
+ plan_update: string[] | null;
164
246
  action: any[];
165
247
  };
166
248
  };
@@ -172,6 +254,8 @@ export declare class AgentOutput {
172
254
  evaluation_previous_goal: string | null;
173
255
  memory: string | null;
174
256
  next_goal: string | null;
257
+ current_plan_item: number | null;
258
+ plan_update: string[] | null;
175
259
  action: ActionModel[];
176
260
  get current_state(): AgentBrain;
177
261
  model_dump(): {
@@ -179,6 +263,8 @@ export declare class AgentOutput {
179
263
  evaluation_previous_goal: string | null;
180
264
  memory: string | null;
181
265
  next_goal: string | null;
266
+ current_plan_item: number | null;
267
+ plan_update: string[] | null;
182
268
  action: any[];
183
269
  };
184
270
  model_dump_json(): string;
@@ -187,6 +273,8 @@ export declare class AgentOutput {
187
273
  evaluation_previous_goal: string | null;
188
274
  memory: string | null;
189
275
  next_goal: string | null;
276
+ current_plan_item: number | null;
277
+ plan_update: string[] | null;
190
278
  action: any[];
191
279
  };
192
280
  };
@@ -199,6 +287,8 @@ export declare class AgentOutput {
199
287
  evaluation_previous_goal: string | null;
200
288
  memory: string | null;
201
289
  next_goal: string | null;
290
+ current_plan_item: number | null;
291
+ plan_update: string[] | null;
202
292
  action: ActionModel[];
203
293
  get current_state(): AgentBrain;
204
294
  model_dump(): {
@@ -206,6 +296,8 @@ export declare class AgentOutput {
206
296
  evaluation_previous_goal: string | null;
207
297
  memory: string | null;
208
298
  next_goal: string | null;
299
+ current_plan_item: number | null;
300
+ plan_update: string[] | null;
209
301
  action: any[];
210
302
  };
211
303
  model_dump_json(): string;
@@ -214,6 +306,8 @@ export declare class AgentOutput {
214
306
  evaluation_previous_goal: string | null;
215
307
  memory: string | null;
216
308
  next_goal: string | null;
309
+ current_plan_item: number | null;
310
+ plan_update: string[] | null;
217
311
  action: any[];
218
312
  };
219
313
  };
@@ -229,6 +323,8 @@ export declare class AgentOutput {
229
323
  evaluation_previous_goal: string | null;
230
324
  memory: string | null;
231
325
  next_goal: string | null;
326
+ current_plan_item: number | null;
327
+ plan_update: string[] | null;
232
328
  action: ActionModel[];
233
329
  get current_state(): AgentBrain;
234
330
  model_dump(): {
@@ -236,6 +332,8 @@ export declare class AgentOutput {
236
332
  evaluation_previous_goal: string | null;
237
333
  memory: string | null;
238
334
  next_goal: string | null;
335
+ current_plan_item: number | null;
336
+ plan_update: string[] | null;
239
337
  action: any[];
240
338
  };
241
339
  model_dump_json(): string;
@@ -244,6 +342,8 @@ export declare class AgentOutput {
244
342
  evaluation_previous_goal: string | null;
245
343
  memory: string | null;
246
344
  next_goal: string | null;
345
+ current_plan_item: number | null;
346
+ plan_update: string[] | null;
247
347
  action: any[];
248
348
  };
249
349
  };
@@ -255,6 +355,8 @@ export declare class AgentOutput {
255
355
  evaluation_previous_goal: string | null;
256
356
  memory: string | null;
257
357
  next_goal: string | null;
358
+ current_plan_item: number | null;
359
+ plan_update: string[] | null;
258
360
  action: ActionModel[];
259
361
  get current_state(): AgentBrain;
260
362
  model_dump(): {
@@ -262,6 +364,8 @@ export declare class AgentOutput {
262
364
  evaluation_previous_goal: string | null;
263
365
  memory: string | null;
264
366
  next_goal: string | null;
367
+ current_plan_item: number | null;
368
+ plan_update: string[] | null;
265
369
  action: any[];
266
370
  };
267
371
  model_dump_json(): string;
@@ -270,6 +374,8 @@ export declare class AgentOutput {
270
374
  evaluation_previous_goal: string | null;
271
375
  memory: string | null;
272
376
  next_goal: string | null;
377
+ current_plan_item: number | null;
378
+ plan_update: string[] | null;
273
379
  action: any[];
274
380
  };
275
381
  };
@@ -287,6 +393,8 @@ export declare class AgentOutput {
287
393
  evaluation_previous_goal: string | null;
288
394
  memory: string | null;
289
395
  next_goal: string | null;
396
+ current_plan_item: number | null;
397
+ plan_update: string[] | null;
290
398
  action: ActionModel[];
291
399
  get current_state(): AgentBrain;
292
400
  model_dump(): {
@@ -294,6 +402,8 @@ export declare class AgentOutput {
294
402
  evaluation_previous_goal: string | null;
295
403
  memory: string | null;
296
404
  next_goal: string | null;
405
+ current_plan_item: number | null;
406
+ plan_update: string[] | null;
297
407
  action: any[];
298
408
  };
299
409
  model_dump_json(): string;
@@ -302,6 +412,8 @@ export declare class AgentOutput {
302
412
  evaluation_previous_goal: string | null;
303
413
  memory: string | null;
304
414
  next_goal: string | null;
415
+ current_plan_item: number | null;
416
+ plan_update: string[] | null;
305
417
  action: any[];
306
418
  };
307
419
  };
@@ -312,6 +424,8 @@ export declare class AgentOutput {
312
424
  evaluation_previous_goal: string | null;
313
425
  memory: string | null;
314
426
  next_goal: string | null;
427
+ current_plan_item: number | null;
428
+ plan_update: string[] | null;
315
429
  action: ActionModel[];
316
430
  get current_state(): AgentBrain;
317
431
  model_dump(): {
@@ -319,6 +433,8 @@ export declare class AgentOutput {
319
433
  evaluation_previous_goal: string | null;
320
434
  memory: string | null;
321
435
  next_goal: string | null;
436
+ current_plan_item: number | null;
437
+ plan_update: string[] | null;
322
438
  action: any[];
323
439
  };
324
440
  model_dump_json(): string;
@@ -327,6 +443,8 @@ export declare class AgentOutput {
327
443
  evaluation_previous_goal: string | null;
328
444
  memory: string | null;
329
445
  next_goal: string | null;
446
+ current_plan_item: number | null;
447
+ plan_update: string[] | null;
330
448
  action: any[];
331
449
  };
332
450
  };
@@ -339,6 +457,8 @@ export declare class AgentOutput {
339
457
  evaluation_previous_goal: string | null;
340
458
  memory: string | null;
341
459
  next_goal: string | null;
460
+ current_plan_item: number | null;
461
+ plan_update: string[] | null;
342
462
  action: ActionModel[];
343
463
  get current_state(): AgentBrain;
344
464
  model_dump(): {
@@ -346,6 +466,8 @@ export declare class AgentOutput {
346
466
  evaluation_previous_goal: string | null;
347
467
  memory: string | null;
348
468
  next_goal: string | null;
469
+ current_plan_item: number | null;
470
+ plan_update: string[] | null;
349
471
  action: any[];
350
472
  };
351
473
  model_dump_json(): string;
@@ -354,6 +476,8 @@ export declare class AgentOutput {
354
476
  evaluation_previous_goal: string | null;
355
477
  memory: string | null;
356
478
  next_goal: string | null;
479
+ current_plan_item: number | null;
480
+ plan_update: string[] | null;
357
481
  action: any[];
358
482
  };
359
483
  };
@@ -370,6 +494,8 @@ export declare class AgentOutput {
370
494
  evaluation_previous_goal: string | null;
371
495
  memory: string | null;
372
496
  next_goal: string | null;
497
+ current_plan_item: number | null;
498
+ plan_update: string[] | null;
373
499
  action: ActionModel[];
374
500
  get current_state(): AgentBrain;
375
501
  model_dump(): {
@@ -377,6 +503,8 @@ export declare class AgentOutput {
377
503
  evaluation_previous_goal: string | null;
378
504
  memory: string | null;
379
505
  next_goal: string | null;
506
+ current_plan_item: number | null;
507
+ plan_update: string[] | null;
380
508
  action: any[];
381
509
  };
382
510
  model_dump_json(): string;
@@ -385,6 +513,8 @@ export declare class AgentOutput {
385
513
  evaluation_previous_goal: string | null;
386
514
  memory: string | null;
387
515
  next_goal: string | null;
516
+ current_plan_item: number | null;
517
+ plan_update: string[] | null;
388
518
  action: any[];
389
519
  };
390
520
  };
@@ -395,6 +525,8 @@ export declare class AgentOutput {
395
525
  evaluation_previous_goal: string | null;
396
526
  memory: string | null;
397
527
  next_goal: string | null;
528
+ current_plan_item: number | null;
529
+ plan_update: string[] | null;
398
530
  action: ActionModel[];
399
531
  get current_state(): AgentBrain;
400
532
  model_dump(): {
@@ -402,6 +534,8 @@ export declare class AgentOutput {
402
534
  evaluation_previous_goal: string | null;
403
535
  memory: string | null;
404
536
  next_goal: string | null;
537
+ current_plan_item: number | null;
538
+ plan_update: string[] | null;
405
539
  action: any[];
406
540
  };
407
541
  model_dump_json(): string;
@@ -410,6 +544,8 @@ export declare class AgentOutput {
410
544
  evaluation_previous_goal: string | null;
411
545
  memory: string | null;
412
546
  next_goal: string | null;
547
+ current_plan_item: number | null;
548
+ plan_update: string[] | null;
413
549
  action: any[];
414
550
  };
415
551
  };
@@ -428,6 +564,8 @@ export declare class AgentOutput {
428
564
  evaluation_previous_goal: string | null;
429
565
  memory: string | null;
430
566
  next_goal: string | null;
567
+ current_plan_item: number | null;
568
+ plan_update: string[] | null;
431
569
  action: ActionModel[];
432
570
  get current_state(): AgentBrain;
433
571
  model_dump(): {
@@ -435,6 +573,8 @@ export declare class AgentOutput {
435
573
  evaluation_previous_goal: string | null;
436
574
  memory: string | null;
437
575
  next_goal: string | null;
576
+ current_plan_item: number | null;
577
+ plan_update: string[] | null;
438
578
  action: any[];
439
579
  };
440
580
  model_dump_json(): string;
@@ -443,6 +583,8 @@ export declare class AgentOutput {
443
583
  evaluation_previous_goal: string | null;
444
584
  memory: string | null;
445
585
  next_goal: string | null;
586
+ current_plan_item: number | null;
587
+ plan_update: string[] | null;
446
588
  action: any[];
447
589
  };
448
590
  };
@@ -453,6 +595,8 @@ export declare class AgentOutput {
453
595
  evaluation_previous_goal: string | null;
454
596
  memory: string | null;
455
597
  next_goal: string | null;
598
+ current_plan_item: number | null;
599
+ plan_update: string[] | null;
456
600
  action: ActionModel[];
457
601
  get current_state(): AgentBrain;
458
602
  model_dump(): {
@@ -460,6 +604,8 @@ export declare class AgentOutput {
460
604
  evaluation_previous_goal: string | null;
461
605
  memory: string | null;
462
606
  next_goal: string | null;
607
+ current_plan_item: number | null;
608
+ plan_update: string[] | null;
463
609
  action: any[];
464
610
  };
465
611
  model_dump_json(): string;
@@ -468,6 +614,8 @@ export declare class AgentOutput {
468
614
  evaluation_previous_goal: string | null;
469
615
  memory: string | null;
470
616
  next_goal: string | null;
617
+ current_plan_item: number | null;
618
+ plan_update: string[] | null;
471
619
  action: any[];
472
620
  };
473
621
  };
@@ -479,6 +627,8 @@ export declare class AgentOutput {
479
627
  evaluation_previous_goal: string | null;
480
628
  memory: string | null;
481
629
  next_goal: string | null;
630
+ current_plan_item: number | null;
631
+ plan_update: string[] | null;
482
632
  action: ActionModel[];
483
633
  get current_state(): AgentBrain;
484
634
  model_dump(): {
@@ -486,6 +636,8 @@ export declare class AgentOutput {
486
636
  evaluation_previous_goal: string | null;
487
637
  memory: string | null;
488
638
  next_goal: string | null;
639
+ current_plan_item: number | null;
640
+ plan_update: string[] | null;
489
641
  action: any[];
490
642
  };
491
643
  model_dump_json(): string;
@@ -494,6 +646,8 @@ export declare class AgentOutput {
494
646
  evaluation_previous_goal: string | null;
495
647
  memory: string | null;
496
648
  next_goal: string | null;
649
+ current_plan_item: number | null;
650
+ plan_update: string[] | null;
497
651
  action: any[];
498
652
  };
499
653
  };
@@ -510,6 +664,8 @@ export declare class AgentOutput {
510
664
  evaluation_previous_goal: string | null;
511
665
  memory: string | null;
512
666
  next_goal: string | null;
667
+ current_plan_item: number | null;
668
+ plan_update: string[] | null;
513
669
  action: ActionModel[];
514
670
  get current_state(): AgentBrain;
515
671
  model_dump(): {
@@ -517,6 +673,8 @@ export declare class AgentOutput {
517
673
  evaluation_previous_goal: string | null;
518
674
  memory: string | null;
519
675
  next_goal: string | null;
676
+ current_plan_item: number | null;
677
+ plan_update: string[] | null;
520
678
  action: any[];
521
679
  };
522
680
  model_dump_json(): string;
@@ -525,6 +683,8 @@ export declare class AgentOutput {
525
683
  evaluation_previous_goal: string | null;
526
684
  memory: string | null;
527
685
  next_goal: string | null;
686
+ current_plan_item: number | null;
687
+ plan_update: string[] | null;
528
688
  action: any[];
529
689
  };
530
690
  };
@@ -535,6 +695,8 @@ export declare class AgentOutput {
535
695
  evaluation_previous_goal: string | null;
536
696
  memory: string | null;
537
697
  next_goal: string | null;
698
+ current_plan_item: number | null;
699
+ plan_update: string[] | null;
538
700
  action: ActionModel[];
539
701
  get current_state(): AgentBrain;
540
702
  model_dump(): {
@@ -542,6 +704,8 @@ export declare class AgentOutput {
542
704
  evaluation_previous_goal: string | null;
543
705
  memory: string | null;
544
706
  next_goal: string | null;
707
+ current_plan_item: number | null;
708
+ plan_update: string[] | null;
545
709
  action: any[];
546
710
  };
547
711
  model_dump_json(): string;
@@ -550,6 +714,8 @@ export declare class AgentOutput {
550
714
  evaluation_previous_goal: string | null;
551
715
  memory: string | null;
552
716
  next_goal: string | null;
717
+ current_plan_item: number | null;
718
+ plan_update: string[] | null;
553
719
  action: any[];
554
720
  };
555
721
  };
@@ -569,21 +735,29 @@ export declare class AgentHistory {
569
735
  result: ActionResult[];
570
736
  state: BrowserStateHistory;
571
737
  metadata: StepMetadata | null;
572
- constructor(model_output: AgentOutput | null, result: ActionResult[], state: BrowserStateHistory, metadata?: StepMetadata | null);
738
+ state_message: string | null;
739
+ constructor(model_output: AgentOutput | null, result: ActionResult[], state: BrowserStateHistory, metadata?: StepMetadata | null, state_message?: string | null);
573
740
  static get_interacted_element(model_output: AgentOutput, selector_map: SelectorMap): (DOMHistoryElement | null)[];
574
- toJSON(): {
741
+ private static _filterSensitiveDataFromString;
742
+ private static _filterSensitiveDataFromDict;
743
+ toJSON(sensitive_data?: Record<string, string | Record<string, string>> | null): {
575
744
  model_output: {
576
745
  thinking: string | null;
577
746
  evaluation_previous_goal: string | null;
578
747
  memory: string | null;
579
748
  next_goal: string | null;
749
+ current_plan_item: number | null;
750
+ plan_update: string[] | null;
580
751
  action: any[];
581
752
  } | null;
582
753
  result: {
583
754
  is_done: boolean | null;
584
755
  success: boolean | null;
756
+ judgement: Record<string, unknown> | null;
585
757
  error: string | null;
586
758
  attachments: string[] | null;
759
+ images: Record<string, unknown>[] | null;
760
+ metadata: Record<string, unknown> | null;
587
761
  long_term_memory: string | null;
588
762
  extracted_content: string | null;
589
763
  include_extracted_content_only_once: boolean;
@@ -603,6 +777,9 @@ export declare class AgentHistory {
603
777
  page_coordinates: import("../index.js").CoordinateSet | null;
604
778
  viewport_coordinates: import("../index.js").CoordinateSet | null;
605
779
  viewport_info: import("../index.js").ViewportInfo | null;
780
+ element_hash: string | null;
781
+ stable_hash: string | null;
782
+ ax_name: string | null;
606
783
  } | null)[];
607
784
  url: string;
608
785
  title: string;
@@ -611,7 +788,9 @@ export declare class AgentHistory {
611
788
  step_start_time: number;
612
789
  step_end_time: number;
613
790
  step_number: number;
791
+ step_interval: number | null;
614
792
  } | null;
793
+ state_message: string | null;
615
794
  };
616
795
  }
617
796
  export declare class AgentHistoryList<TStructured = unknown> {
@@ -626,6 +805,9 @@ export declare class AgentHistoryList<TStructured = unknown> {
626
805
  final_result(): string | null;
627
806
  is_done(): boolean;
628
807
  is_successful(): boolean | null;
808
+ judgement(): Record<string, unknown> | null;
809
+ is_judged(): boolean;
810
+ is_validated(): boolean | null;
629
811
  has_errors(): boolean;
630
812
  urls(): string[];
631
813
  screenshot_paths(n_last?: number | null, return_none_if_not_screenshot?: boolean): (string | null)[];
@@ -639,23 +821,31 @@ export declare class AgentHistoryList<TStructured = unknown> {
639
821
  extracted_content(): (string | null)[];
640
822
  model_actions_filtered(include?: string[]): Record<string, unknown>[];
641
823
  number_of_steps(): number;
824
+ agent_steps(): string[];
642
825
  get structured_output(): TStructured | null;
643
- save_to_file(filepath: string): void;
826
+ get_structured_output(outputModel: StructuredOutputParser<TStructured>): TStructured | null;
827
+ save_to_file(filepath: string, sensitive_data?: Record<string, string | Record<string, string>> | null): void;
644
828
  static load_from_file(filepath: string, outputModel: typeof AgentOutput): AgentHistoryList;
645
- toJSON(): {
829
+ static load_from_dict(payload: Record<string, unknown>, outputModel: typeof AgentOutput): AgentHistoryList;
830
+ toJSON(sensitive_data?: Record<string, string | Record<string, string>> | null): {
646
831
  history: {
647
832
  model_output: {
648
833
  thinking: string | null;
649
834
  evaluation_previous_goal: string | null;
650
835
  memory: string | null;
651
836
  next_goal: string | null;
837
+ current_plan_item: number | null;
838
+ plan_update: string[] | null;
652
839
  action: any[];
653
840
  } | null;
654
841
  result: {
655
842
  is_done: boolean | null;
656
843
  success: boolean | null;
844
+ judgement: Record<string, unknown> | null;
657
845
  error: string | null;
658
846
  attachments: string[] | null;
847
+ images: Record<string, unknown>[] | null;
848
+ metadata: Record<string, unknown> | null;
659
849
  long_term_memory: string | null;
660
850
  extracted_content: string | null;
661
851
  include_extracted_content_only_once: boolean;
@@ -675,6 +865,9 @@ export declare class AgentHistoryList<TStructured = unknown> {
675
865
  page_coordinates: import("../index.js").CoordinateSet | null;
676
866
  viewport_coordinates: import("../index.js").CoordinateSet | null;
677
867
  viewport_info: import("../index.js").ViewportInfo | null;
868
+ element_hash: string | null;
869
+ stable_hash: string | null;
870
+ ax_name: string | null;
678
871
  } | null)[];
679
872
  url: string;
680
873
  title: string;
@@ -683,24 +876,30 @@ export declare class AgentHistoryList<TStructured = unknown> {
683
876
  step_start_time: number;
684
877
  step_end_time: number;
685
878
  step_number: number;
879
+ step_interval: number | null;
686
880
  } | null;
881
+ state_message: string | null;
687
882
  }[];
688
- usage: UsageSummary | null;
689
883
  };
690
- model_dump(): {
884
+ model_dump(sensitive_data?: Record<string, string | Record<string, string>> | null): {
691
885
  history: {
692
886
  model_output: {
693
887
  thinking: string | null;
694
888
  evaluation_previous_goal: string | null;
695
889
  memory: string | null;
696
890
  next_goal: string | null;
891
+ current_plan_item: number | null;
892
+ plan_update: string[] | null;
697
893
  action: any[];
698
894
  } | null;
699
895
  result: {
700
896
  is_done: boolean | null;
701
897
  success: boolean | null;
898
+ judgement: Record<string, unknown> | null;
702
899
  error: string | null;
703
900
  attachments: string[] | null;
901
+ images: Record<string, unknown>[] | null;
902
+ metadata: Record<string, unknown> | null;
704
903
  long_term_memory: string | null;
705
904
  extracted_content: string | null;
706
905
  include_extracted_content_only_once: boolean;
@@ -720,6 +919,9 @@ export declare class AgentHistoryList<TStructured = unknown> {
720
919
  page_coordinates: import("../index.js").CoordinateSet | null;
721
920
  viewport_coordinates: import("../index.js").CoordinateSet | null;
722
921
  viewport_info: import("../index.js").ViewportInfo | null;
922
+ element_hash: string | null;
923
+ stable_hash: string | null;
924
+ ax_name: string | null;
723
925
  } | null)[];
724
926
  url: string;
725
927
  title: string;
@@ -728,11 +930,29 @@ export declare class AgentHistoryList<TStructured = unknown> {
728
930
  step_start_time: number;
729
931
  step_end_time: number;
730
932
  step_number: number;
933
+ step_interval: number | null;
731
934
  } | null;
935
+ state_message: string | null;
732
936
  }[];
733
- usage: UsageSummary | null;
734
937
  };
735
938
  }
939
+ export declare class DetectedVariable {
940
+ name: string;
941
+ original_value: string;
942
+ type: string;
943
+ format: string | null;
944
+ constructor(name: string, original_value: string, type?: string, format?: string | null);
945
+ model_dump(): {
946
+ name: string;
947
+ original_value: string;
948
+ type: string;
949
+ format: string | null;
950
+ };
951
+ }
952
+ export declare class VariableMetadata {
953
+ detected_variables: Record<string, DetectedVariable>;
954
+ constructor(detected_variables?: Record<string, DetectedVariable>);
955
+ }
736
956
  export declare class AgentError extends Error {
737
957
  static VALIDATION_ERROR: string;
738
958
  static RATE_LIMIT_ERROR: string;