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