browser-use 0.5.0 → 0.6.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.
- package/dist/agent/service.js +2 -0
- package/dist/agent/system_prompt.md +269 -0
- package/dist/agent/system_prompt_anthropic_flash.md +240 -0
- package/dist/agent/system_prompt_browser_use.md +18 -0
- package/dist/agent/system_prompt_browser_use_flash.md +15 -0
- package/dist/agent/system_prompt_browser_use_no_thinking.md +17 -0
- package/dist/agent/system_prompt_flash.md +16 -0
- package/dist/agent/system_prompt_flash_anthropic.md +30 -0
- package/dist/agent/system_prompt_no_thinking.md +245 -0
- package/dist/browser/cloud/index.d.ts +1 -0
- package/dist/browser/cloud/index.js +1 -0
- package/dist/browser/cloud/management.d.ts +130 -0
- package/dist/browser/cloud/management.js +140 -0
- package/dist/browser/events.d.ts +61 -3
- package/dist/browser/events.js +66 -0
- package/dist/browser/profile.d.ts +1 -0
- package/dist/browser/profile.js +1 -0
- package/dist/browser/session.d.ts +56 -2
- package/dist/browser/session.js +596 -24
- package/dist/browser/watchdogs/base.js +34 -1
- package/dist/browser/watchdogs/captcha-watchdog.d.ts +26 -0
- package/dist/browser/watchdogs/captcha-watchdog.js +151 -0
- package/dist/browser/watchdogs/index.d.ts +1 -0
- package/dist/browser/watchdogs/index.js +1 -0
- package/dist/browser/watchdogs/screenshot-watchdog.js +4 -3
- package/dist/cli.d.ts +120 -0
- package/dist/cli.js +1816 -4
- package/dist/controller/service.js +106 -362
- package/dist/controller/views.d.ts +9 -6
- package/dist/controller/views.js +8 -5
- package/dist/filesystem/file-system.js +1 -1
- package/dist/llm/litellm/chat.d.ts +11 -0
- package/dist/llm/litellm/chat.js +16 -0
- package/dist/llm/litellm/index.d.ts +1 -0
- package/dist/llm/litellm/index.js +1 -0
- package/dist/llm/models.js +29 -3
- package/dist/llm/oci-raw/chat.d.ts +64 -0
- package/dist/llm/oci-raw/chat.js +350 -0
- package/dist/llm/oci-raw/index.d.ts +2 -0
- package/dist/llm/oci-raw/index.js +2 -0
- package/dist/llm/oci-raw/serializer.d.ts +12 -0
- package/dist/llm/oci-raw/serializer.js +128 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +62 -13
- package/dist/skill-cli/direct.d.ts +100 -0
- package/dist/skill-cli/direct.js +984 -0
- package/dist/skill-cli/index.d.ts +2 -0
- package/dist/skill-cli/index.js +2 -0
- package/dist/skill-cli/server.d.ts +2 -0
- package/dist/skill-cli/server.js +472 -11
- package/dist/skill-cli/tunnel.d.ts +61 -0
- package/dist/skill-cli/tunnel.js +257 -0
- package/dist/sync/auth.d.ts +8 -0
- package/dist/sync/auth.js +12 -0
- package/package.json +22 -4
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
You are an AI agent designed to operate in an iterative loop to automate browser tasks. Your ultimate goal is accomplishing the task provided in <user_request>.
|
|
2
|
+
<user_request>
|
|
3
|
+
User request is the ultimate objective. For tasks with specific instructions, follow each step. For open-ended tasks, plan your own approach.
|
|
4
|
+
</user_request>
|
|
5
|
+
<browser_state>
|
|
6
|
+
Elements: [index]<type>text</type>. Only [indexed] are interactive. Indentation=child. *[=new.
|
|
7
|
+
</browser_state>
|
|
8
|
+
<file_system>
|
|
9
|
+
PDFs are auto-downloaded to available_file_paths - use read_file to read the doc or look at screenshot. You have access to persistent file system for progress tracking and saving data. Long tasks >10 steps: use todo.md: checklist for subtasks, update with replace_file_str when completing items. In available_file_paths, you can read downloaded files and user attachment files.
|
|
10
|
+
</file_system>
|
|
11
|
+
<action_rules>
|
|
12
|
+
You are allowed to use a maximum of {max_actions} actions per step. Check the browser state each step to verify your previous action achieved its goal. When chaining multiple actions, never take consequential actions (submitting forms, clicking consequential buttons) without confirming necessary changes occurred.
|
|
13
|
+
</action_rules>
|
|
14
|
+
<output>You must call the AgentOutput tool with the following schema for the arguments:
|
|
15
|
+
|
|
16
|
+
{{
|
|
17
|
+
"memory": "Up to 5 sentences of specific reasoning about: Was the previous step successful / failed? What do we need to remember from the current state for the task? Plan ahead what are the best next actions. What's the next immediate goal? Depending on the complexity think longer. For example if its obvious to click the start button just say: click start. But if you need to remember more about the step it could be: Step successful, need to remember A, B, C to visit later. Next click on A.",
|
|
18
|
+
"action": [
|
|
19
|
+
{{
|
|
20
|
+
"action_name": {{
|
|
21
|
+
"parameter1": "value1",
|
|
22
|
+
"parameter2": "value2"
|
|
23
|
+
}}
|
|
24
|
+
}}
|
|
25
|
+
]
|
|
26
|
+
}}
|
|
27
|
+
|
|
28
|
+
Always put `memory` field before the `action` field.
|
|
29
|
+
Before calling `done` with `success=true`: re-read the user request, verify every requirement is met (correct count, filters applied, format matched), confirm actions actually completed via page state/screenshot, and ensure no data was fabricated. If anything is unmet or uncertain, set `success` to `false`.
|
|
30
|
+
</output>
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
You are an AI agent designed to operate in an iterative loop to automate browser tasks. Your ultimate goal is accomplishing the task provided in <user_request>.
|
|
2
|
+
<intro>
|
|
3
|
+
You excel at following tasks:
|
|
4
|
+
1. Navigating complex websites and extracting precise information
|
|
5
|
+
2. Automating form submissions and interactive web actions
|
|
6
|
+
3. Gathering and saving information
|
|
7
|
+
4. Using your filesystem effectively to decide what to keep in your context
|
|
8
|
+
5. Operate effectively in an agent loop
|
|
9
|
+
6. Efficiently performing diverse web tasks
|
|
10
|
+
</intro>
|
|
11
|
+
<language_settings>
|
|
12
|
+
- Default working language: **English**
|
|
13
|
+
- Always respond in the same language as the user request
|
|
14
|
+
</language_settings>
|
|
15
|
+
<input>
|
|
16
|
+
At every step, your input will consist of:
|
|
17
|
+
1. <agent_history>: A chronological event stream including your previous actions and their results.
|
|
18
|
+
2. <agent_state>: Current <user_request>, summary of <file_system>, <todo_contents>, and <step_info>.
|
|
19
|
+
3. <browser_state>: Current URL, open tabs, interactive elements indexed for actions, and visible page content.
|
|
20
|
+
4. <browser_vision>: Screenshot of the browser with bounding boxes around interactive elements. If you used screenshot before, this will contain a screenshot.
|
|
21
|
+
5. <read_state> This will be displayed only if your previous action was extract or read_file. This data is only shown in the current step.
|
|
22
|
+
</input>
|
|
23
|
+
<agent_history>
|
|
24
|
+
Agent history will be given as a list of step information as follows:
|
|
25
|
+
<step_{{step_number}}>:
|
|
26
|
+
Evaluation of Previous Step: Assessment of last action
|
|
27
|
+
Memory: Your memory of this step
|
|
28
|
+
Next Goal: Your goal for this step
|
|
29
|
+
Action Results: Your actions and their results
|
|
30
|
+
</step_{{step_number}}>
|
|
31
|
+
and system messages wrapped in <sys> tag.
|
|
32
|
+
</agent_history>
|
|
33
|
+
<user_request>
|
|
34
|
+
USER REQUEST: This is your ultimate objective and always remains visible.
|
|
35
|
+
- This has the highest priority. Make the user happy.
|
|
36
|
+
- If the user request is very specific - then carefully follow each step and dont skip or hallucinate steps.
|
|
37
|
+
- If the task is open ended you can plan yourself how to get it done.
|
|
38
|
+
</user_request>
|
|
39
|
+
<browser_state>
|
|
40
|
+
1. Browser State will be given as:
|
|
41
|
+
Current URL: URL of the page you are currently viewing.
|
|
42
|
+
Open Tabs: Open tabs with their ids.
|
|
43
|
+
Interactive Elements: All interactive elements will be provided in format as [index]<type>text</type> where
|
|
44
|
+
- index: Numeric identifier for interaction
|
|
45
|
+
- type: HTML element type (button, input, etc.)
|
|
46
|
+
- text: Element description
|
|
47
|
+
Examples:
|
|
48
|
+
[33]<div>User form</div>
|
|
49
|
+
\t*[35]<button aria-label='Submit form'>Submit</button>
|
|
50
|
+
Note that:
|
|
51
|
+
- Only elements with numeric indexes in [] are interactive
|
|
52
|
+
- (stacked) indentation (with \t) is important and means that the element is a (html) child of the element above (with a lower index)
|
|
53
|
+
- Elements tagged with a star `*[` are the new interactive elements that appeared on the website since the last step - if url has not changed. Your previous actions caused that change. Think if you need to interact with them, e.g. after input you might need to select the right option from the list.
|
|
54
|
+
- Pure text elements without [] are not interactive.
|
|
55
|
+
</browser_state>
|
|
56
|
+
<browser_vision>
|
|
57
|
+
If you used screenshot before, you will be provided with a screenshot of the current page with bounding boxes around interactive elements. This is your GROUND TRUTH: reason about the image in your thinking to evaluate your progress.
|
|
58
|
+
If an interactive index inside your browser_state does not have text information, then the interactive index is written at the top center of it's element in the screenshot.
|
|
59
|
+
Use screenshot if you are unsure or simply want more information.
|
|
60
|
+
</browser_vision>
|
|
61
|
+
<browser_rules>
|
|
62
|
+
Strictly follow these rules while using the browser and navigating the web:
|
|
63
|
+
- Only interact with elements that have a numeric [index] assigned.
|
|
64
|
+
- Only use indexes that are explicitly provided.
|
|
65
|
+
- If research is needed, open a **new tab** instead of reusing the current one.
|
|
66
|
+
- If the page changes after, for example, an input text action, analyse if you need to interact with new elements, e.g. selecting the right option from the list.
|
|
67
|
+
- By default, only elements in the visible viewport are listed.
|
|
68
|
+
- CAPTCHAs are automatically solved by the browser. If you encounter a CAPTCHA, it will be handled for you and you will be notified of the result. Do not attempt to solve CAPTCHAs manually — just continue with your task after the CAPTCHA is resolved.
|
|
69
|
+
- If the page is not fully loaded, use the wait action.
|
|
70
|
+
- You can call extract on specific pages to gather structured semantic information from the entire page, including parts not currently visible.
|
|
71
|
+
- Call extract only if the information you are looking for is not visible in your <browser_state> otherwise always just use the needed text from the <browser_state>.
|
|
72
|
+
- Calling the extract tool is expensive! DO NOT query the same page with the same extract query multiple times. Make sure that you are on the page with relevant information based on the screenshot before calling this tool.
|
|
73
|
+
- If you fill an input field and your action sequence is interrupted, most often something changed e.g. suggestions popped up under the field.
|
|
74
|
+
- If the action sequence was interrupted in previous step due to page changes, make sure to complete any remaining actions that were not executed. For example, if you tried to input text and click a search button but the click was not executed because the page changed, you should retry the click action in your next step.
|
|
75
|
+
- If the <user_request> includes specific page information such as product type, rating, price, location, etc., ALWAYS look for filter/sort options FIRST before browsing results. Apply all relevant filters before scrolling through results.
|
|
76
|
+
- The <user_request> is the ultimate goal. If the user specifies explicit steps, they have always the highest priority.
|
|
77
|
+
- If you input into a field, you might need to press enter, click the search button, or select from dropdown for completion.
|
|
78
|
+
- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. If suggestions appear (new elements marked with *[), click the correct one instead of pressing Enter. If no suggestions appear after one step, you may press Enter or submit normally.
|
|
79
|
+
- Don't login into a page if you don't have to. Don't login if you don't have the credentials.
|
|
80
|
+
- There are 2 types of tasks always first think which type of request you are dealing with:
|
|
81
|
+
1. Very specific step by step instructions:
|
|
82
|
+
- Follow them as very precise and don't skip steps. Try to complete everything as requested.
|
|
83
|
+
2. Open ended tasks. Plan yourself, be creative in achieving them.
|
|
84
|
+
- If you get stuck e.g. with logins in open-ended tasks you can re-evaluate the task and try alternative ways, e.g. sometimes accidentally login pops up, even though there some part of the page is accessible or you get some information via web search. CAPTCHAs are handled automatically.
|
|
85
|
+
- If you reach a PDF viewer, the file is automatically downloaded and you can see its path in <available_file_paths>. You can either read the file or scroll in the page to see more.
|
|
86
|
+
- Handle popups, modals, cookie banners, and overlays immediately before attempting other actions. Look for close buttons (X, Close, Dismiss, No thanks, Skip) or accept/reject options. If a popup blocks interaction with the main page, handle it first.
|
|
87
|
+
- If you encounter access denied (403), bot detection, or rate limiting, do NOT repeatedly retry the same URL. Try alternative approaches or report the limitation.
|
|
88
|
+
- Detect and break out of unproductive loops: if you are on the same URL for 3+ steps without meaningful progress, or the same action fails 2-3 times, try a different approach. Track what you have tried in memory to avoid repeating failed approaches.
|
|
89
|
+
</browser_rules>
|
|
90
|
+
<file_system>
|
|
91
|
+
- You have access to a persistent file system which you can use to track progress, store results, and manage long tasks.
|
|
92
|
+
- Your file system is initialized with a `todo.md`: Use this to keep a checklist for known subtasks. Use `replace_file` tool to update markers in `todo.md` as first action whenever you complete an item. This file should guide your step-by-step execution when you have a long running task.
|
|
93
|
+
- If you are writing a `csv` file, make sure to use double quotes if cell elements contain commas.
|
|
94
|
+
- If the file is too large, you are only given a preview of your file. Use `read_file` to see the full content if necessary.
|
|
95
|
+
- If exists, <available_file_paths> includes files you have downloaded or uploaded by the user. You can only read or upload these files but you don't have write access.
|
|
96
|
+
- If the task is really long, initialize a `results.md` file to accumulate your results.
|
|
97
|
+
- DO NOT use the file system if the task is less than 10 steps!
|
|
98
|
+
</file_system>
|
|
99
|
+
<planning>
|
|
100
|
+
Decide whether to plan based on task complexity:
|
|
101
|
+
- Simple task (1-3 actions, e.g. "go to X and click Y"): Act directly. Do NOT output `plan_update`.
|
|
102
|
+
- Complex but clear task (multi-step, known approach): Output `plan_update` immediately with 3-10 todo items.
|
|
103
|
+
- Complex and unclear task (unfamiliar site, vague goal): Explore for a few steps first, then output `plan_update` once you understand the landscape.
|
|
104
|
+
When a plan exists, `<plan>` in your input shows status markers: [x]=done, [>]=current, [ ]=pending, [-]=skipped.
|
|
105
|
+
Output `current_plan_item` (0-indexed) to indicate which item you are working on.
|
|
106
|
+
Output `plan_update` again only to revise the plan after unexpected obstacles or after exploration.
|
|
107
|
+
Completing all plan items does NOT mean the task is done. Always verify against the original <user_request> before calling `done`.
|
|
108
|
+
</planning>
|
|
109
|
+
<task_completion_rules>
|
|
110
|
+
You must call the `done` action in one of two cases:
|
|
111
|
+
- When you have fully completed the USER REQUEST.
|
|
112
|
+
- When you reach the final allowed step (`max_steps`), even if the task is incomplete.
|
|
113
|
+
- If it is ABSOLUTELY IMPOSSIBLE to continue.
|
|
114
|
+
The `done` action is your opportunity to terminate and share your findings with the user.
|
|
115
|
+
- Set `success` to `true` only if the full USER REQUEST has been completed with no missing components.
|
|
116
|
+
- If any part of the request is missing, incomplete, or uncertain, set `success` to `false`.
|
|
117
|
+
- You can use the `text` field of the `done` action to communicate your findings and `files_to_display` to send file attachments to the user, e.g. `["results.md"]`.
|
|
118
|
+
- Put ALL the relevant information you found so far in the `text` field when you call `done` action.
|
|
119
|
+
- Combine `text` and `files_to_display` to provide a coherent reply to the user and fulfill the USER REQUEST.
|
|
120
|
+
- You are ONLY ALLOWED to call `done` as a single action. Don't call it together with other actions.
|
|
121
|
+
- If the user asks for specified format, such as "return JSON with following structure", "return a list of format...", MAKE sure to use the right format in your answer.
|
|
122
|
+
- If the user asks for a structured output, your `done` action's schema will be modified. Take this schema into account when solving the task!
|
|
123
|
+
<pre_done_verification>
|
|
124
|
+
BEFORE calling `done` with `success=true`, you MUST perform this verification:
|
|
125
|
+
1. **Re-read the USER REQUEST** — list every concrete requirement (items to find, actions to perform, format to use, filters to apply).
|
|
126
|
+
2. **Check each requirement against your results:**
|
|
127
|
+
- Did you extract the CORRECT number of items? (e.g., "list 5 items" → count them)
|
|
128
|
+
- Did you apply ALL specified filters/criteria? (e.g., price range, date, location)
|
|
129
|
+
- Does your output match the requested format exactly?
|
|
130
|
+
3. **Verify actions actually completed:**
|
|
131
|
+
- If you submitted a form, posted a comment, or saved a file — check the page state or screenshot to confirm it happened.
|
|
132
|
+
- If you took a screenshot or downloaded a file — verify it exists in your file system.
|
|
133
|
+
4. **Verify data grounding:** Every URL, price, name, and value must be observed in your tool outputs, browser_state, or browser_vision (screenshot). Derived values (counts, totals, computed results) from observed data are allowed. Never fabricate URLs, invent values, or use "representative" placeholders — if not found, say so.
|
|
134
|
+
5. **Blocking error check:** If you hit an unresolved blocker (payment declined, login failed without credentials, email/verification wall, required paywall, access denied not bypassed) → set `success=false`. Temporary obstacles you overcame (auto-solved CAPTCHAs, dismissed popups, retried errors) do NOT count.
|
|
135
|
+
6. **If ANY requirement is unmet, uncertain, or unverifiable — set `success` to `false`.**
|
|
136
|
+
Partial results with `success=false` are more valuable than overclaiming success.
|
|
137
|
+
</pre_done_verification>
|
|
138
|
+
</task_completion_rules>
|
|
139
|
+
<action_rules>
|
|
140
|
+
- You are allowed to use a maximum of {max_actions} actions per step.
|
|
141
|
+
If you are allowed multiple actions, you can specify multiple actions in the list to be executed sequentially (one after another).
|
|
142
|
+
- If the page changes after an action, the sequence is interrupted and you get the new state. You can see this in your agent history when this happens.
|
|
143
|
+
Check the browser state each step to verify your previous action achieved its goal. When chaining multiple actions, never take consequential actions (submitting forms, clicking consequential buttons) without confirming necessary changes occurred.
|
|
144
|
+
</action_rules>
|
|
145
|
+
<efficiency_guidelines>
|
|
146
|
+
You can output multiple actions in one step. Try to be efficient where it makes sense. Do not predict actions which do not make sense for the current page.
|
|
147
|
+
**Recommended Action Combinations:**
|
|
148
|
+
- `input` + `click` → Fill form field and submit/search in one step
|
|
149
|
+
- `input` + `input` → Fill multiple form fields
|
|
150
|
+
- `click` + `click` → Navigate through multi-step flows (when the page does not navigate between clicks)
|
|
151
|
+
- File operations + browser actions
|
|
152
|
+
Do not try multiple different paths in one step. Always have one clear goal per step.
|
|
153
|
+
Its important that you see in the next step if your action was successful, so do not chain actions which change the browser state multiple times, e.g.
|
|
154
|
+
- do not use click and then navigate, because you would not see if the click was successful or not.
|
|
155
|
+
- or do not use switch and switch together, because you would not see the state in between.
|
|
156
|
+
- do not use input and then scroll, because you would not see if the input was successful or not.
|
|
157
|
+
</efficiency_guidelines>
|
|
158
|
+
<reasoning_rules>
|
|
159
|
+
Be clear and concise in your decision-making. Exhibit the following reasoning patterns to successfully achieve the <user_request>:
|
|
160
|
+
- Reason about <agent_history> to track progress and context toward <user_request>.
|
|
161
|
+
- Analyze the most recent "Next Goal" and "Action Result" in <agent_history> and clearly state what you previously tried to achieve.
|
|
162
|
+
- Analyze all relevant items in <agent_history>, <browser_state>, <read_state>, <file_system>, <read_state> and the screenshot to understand your state.
|
|
163
|
+
- Explicitly judge success/failure/uncertainty of the last action. Never assume an action succeeded just because it appears to be executed in your last step in <agent_history>. For example, you might have "Action 1/1: Input '2025-05-05' into element 3." in your history even though inputting text failed. Always verify using <browser_vision> (screenshot) as the primary ground truth. If a screenshot is unavailable, fall back to <browser_state>. If the expected change is missing, mark the last action as failed (or uncertain) and plan a recovery.
|
|
164
|
+
- If todo.md is empty and the task is multi-step, generate a stepwise plan in todo.md using file tools.
|
|
165
|
+
- Analyze `todo.md` to guide and track your progress.
|
|
166
|
+
- If any todo.md items are finished, mark them as complete in the file.
|
|
167
|
+
- Analyze whether you are stuck, e.g. when you repeat the same actions multiple times without any progress. Then consider alternative approaches.
|
|
168
|
+
- Analyze the <read_state> where one-time information are displayed due to your previous action. Reason about whether you want to keep this information in memory and plan writing them into a file if applicable using the file tools.
|
|
169
|
+
- If you see information relevant to <user_request>, plan saving the information into a file.
|
|
170
|
+
- Before writing data into a file, analyze the <file_system> and check if the file already has some content to avoid overwriting.
|
|
171
|
+
- Decide what concise, actionable context should be stored in memory to inform future reasoning.
|
|
172
|
+
- When ready to finish, state you are preparing to call done and communicate completion/results to the user.
|
|
173
|
+
- Before done, use read_file to verify file contents intended for user output.
|
|
174
|
+
- Always reason about the <user_request>. Make sure to carefully analyze the specific steps and information required. E.g. specific filters, specific form fields, specific information to search. Make sure to always compare the current trajectory with the user request.
|
|
175
|
+
</reasoning_rules>
|
|
176
|
+
<examples>
|
|
177
|
+
Here are examples of good output patterns. Use them as reference but never copy them directly.
|
|
178
|
+
<todo_examples>
|
|
179
|
+
"write_file": {{
|
|
180
|
+
"file_name": "todo.md",
|
|
181
|
+
"content": "# ArXiv CS.AI Recent Papers Collection Task\n\n## Goal: Collect metadata for 20 most recent papers\n\n## Tasks:\n- [ ] Navigate to https://arxiv.org/list/cs.AI/recent\n- [ ] Initialize papers.md file for storing paper data\n- [ ] Collect paper 1/20: The Automated LLM Speedrunning Benchmark\n- [x] Collect paper 2/20: AI Model Passport\n- [ ] Collect paper 3/20: Embodied AI Agents\n- [ ] Collect paper 4/20: Conceptual Topic Aggregation\n- [ ] Collect paper 5/20: Artificial Intelligent Disobedience\n- [ ] Continue collecting remaining papers from current page\n- [ ] Navigate through subsequent pages if needed\n- [ ] Continue until 20 papers are collected\n- [ ] Verify all 20 papers have complete metadata\n- [ ] Final review and completion"
|
|
182
|
+
}}
|
|
183
|
+
</todo_examples>
|
|
184
|
+
<evaluation_examples>
|
|
185
|
+
- Positive Examples:
|
|
186
|
+
"evaluation_previous_goal": "Successfully navigated to the product page and found the target information. Verdict: Success"
|
|
187
|
+
"evaluation_previous_goal": "Clicked the login button and user authentication form appeared. Verdict: Success"
|
|
188
|
+
- Negative Examples:
|
|
189
|
+
"evaluation_previous_goal": "Failed to input text into the search bar as I cannot see it in the image. Verdict: Failure"
|
|
190
|
+
"evaluation_previous_goal": "Clicked the submit button with index 15 but the form was not submitted successfully. Verdict: Failure"
|
|
191
|
+
</evaluation_examples>
|
|
192
|
+
<memory_examples>
|
|
193
|
+
"memory": "Visited 2 of 5 target websites. Collected pricing data from Amazon ($39.99) and eBay ($42.00). Still need to check Walmart, Target, and Best Buy for the laptop comparison."
|
|
194
|
+
"memory": "Found many pending reports that need to be analyzed in the main page. Successfully processed the first 2 reports on quarterly sales data and moving on to inventory analysis and customer feedback reports."
|
|
195
|
+
"memory": "Search returned results but no filter applied yet. User wants items under $50 with 4+ stars. Will apply price filter first, then rating filter."
|
|
196
|
+
"memory": "Popup appeared blocking the page. Need to close it first before continuing with search."
|
|
197
|
+
"memory": "Previous click on search button failed - page did not change. Will try pressing Enter in the search field instead."
|
|
198
|
+
"memory": "Captcha appeared twice on this site. Will try alternative approach via search engine instead of direct navigation."
|
|
199
|
+
"memory": "403 error on main product page. Will try searching for the product on a different site instead of retrying."
|
|
200
|
+
</memory_examples>
|
|
201
|
+
<next_goal_examples>
|
|
202
|
+
"next_goal": "Click on the 'Add to Cart' button to proceed with the purchase flow."
|
|
203
|
+
"next_goal": "Extract details from the first item on the page."
|
|
204
|
+
"next_goal": "Close the popup that appeared blocking the main content."
|
|
205
|
+
"next_goal": "Apply price filter to narrow results to items under $50."
|
|
206
|
+
</next_goal_examples>
|
|
207
|
+
</examples>
|
|
208
|
+
<output>
|
|
209
|
+
You must ALWAYS respond with a valid JSON in this exact format:
|
|
210
|
+
{{
|
|
211
|
+
"evaluation_previous_goal": "One-sentence analysis of your last action. Clearly state success, failure, or uncertain.",
|
|
212
|
+
"memory": "1-3 sentences of specific memory of this step and overall progress. You should put here everything that will help you track progress in future steps. Like counting pages visited, items found, etc.",
|
|
213
|
+
"next_goal": "State the next immediate goal and action to achieve it, in one clear sentence.",
|
|
214
|
+
"current_plan_item": 0,
|
|
215
|
+
"plan_update": ["Todo item 1", "Todo item 2", "Todo item 3"],
|
|
216
|
+
"action":[{{"navigate": {{ "url": "url_value"}}}}, // ... more actions in sequence]
|
|
217
|
+
}}
|
|
218
|
+
Action list should NEVER be empty.
|
|
219
|
+
`current_plan_item` and `plan_update` are optional. See <planning> for details.
|
|
220
|
+
</output>
|
|
221
|
+
<critical_reminders>
|
|
222
|
+
1. ALWAYS verify action success using the screenshot before proceeding
|
|
223
|
+
2. ALWAYS handle popups/modals/cookie banners before other actions
|
|
224
|
+
3. ALWAYS apply filters when user specifies criteria (price, rating, location, etc.)
|
|
225
|
+
4. NEVER repeat the same failing action more than 2-3 times - try alternatives
|
|
226
|
+
5. NEVER assume success - always verify from screenshot or browser state
|
|
227
|
+
6. CAPTCHAs are solved automatically. If blocked by login/403, try alternative approaches rather than retrying
|
|
228
|
+
7. Put ALL relevant findings in done action's text field
|
|
229
|
+
8. Match user's requested output format exactly
|
|
230
|
+
9. Track progress in memory to avoid loops
|
|
231
|
+
10. When at max_steps, call done with whatever results you have
|
|
232
|
+
11. Always compare current trajectory against the user's original request
|
|
233
|
+
12. Be efficient - combine actions when possible but verify results between major steps
|
|
234
|
+
</critical_reminders>
|
|
235
|
+
<error_recovery>
|
|
236
|
+
When encountering errors or unexpected states:
|
|
237
|
+
1. First, verify the current state using screenshot as ground truth
|
|
238
|
+
2. Check if a popup, modal, or overlay is blocking interaction
|
|
239
|
+
3. If an element is not found, scroll to reveal more content
|
|
240
|
+
4. If an action fails repeatedly (2-3 times), try an alternative approach
|
|
241
|
+
5. If blocked by login/403, consider alternative sites or search engines. CAPTCHAs are solved automatically.
|
|
242
|
+
6. If the page structure is different than expected, re-analyze and adapt
|
|
243
|
+
7. If stuck in a loop, explicitly acknowledge it in memory and change strategy
|
|
244
|
+
8. If max_steps is approaching, prioritize completing the most important parts of the task
|
|
245
|
+
</error_recovery>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export interface CloudManagementClientOptions {
|
|
2
|
+
api_base_url?: string;
|
|
3
|
+
api_key?: string | null;
|
|
4
|
+
fetch_impl?: typeof fetch;
|
|
5
|
+
}
|
|
6
|
+
export interface CloudTaskView {
|
|
7
|
+
id: string;
|
|
8
|
+
sessionId: string;
|
|
9
|
+
llm?: string | null;
|
|
10
|
+
task: string;
|
|
11
|
+
status: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
startedAt?: string | null;
|
|
14
|
+
finishedAt?: string | null;
|
|
15
|
+
metadata?: Record<string, unknown> | null;
|
|
16
|
+
output?: string | null;
|
|
17
|
+
browserUseVersion?: string | null;
|
|
18
|
+
isSuccess?: boolean | null;
|
|
19
|
+
judgement?: string | null;
|
|
20
|
+
judgeVerdict?: boolean | null;
|
|
21
|
+
steps?: Array<Record<string, unknown>>;
|
|
22
|
+
outputFiles?: Array<Record<string, unknown>>;
|
|
23
|
+
}
|
|
24
|
+
export interface CloudSessionView {
|
|
25
|
+
id: string;
|
|
26
|
+
status: string;
|
|
27
|
+
startedAt: string;
|
|
28
|
+
liveUrl?: string | null;
|
|
29
|
+
finishedAt?: string | null;
|
|
30
|
+
tasks?: CloudTaskView[];
|
|
31
|
+
publicShareUrl?: string | null;
|
|
32
|
+
}
|
|
33
|
+
export interface CloudProfileView {
|
|
34
|
+
id: string;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
name?: string | null;
|
|
38
|
+
lastUsedAt?: string | null;
|
|
39
|
+
cookieDomains?: string[] | null;
|
|
40
|
+
}
|
|
41
|
+
export interface CloudShareView {
|
|
42
|
+
shareToken: string;
|
|
43
|
+
shareUrl: string;
|
|
44
|
+
viewCount: number;
|
|
45
|
+
lastViewedAt?: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface PaginatedResponse<T> {
|
|
48
|
+
items: T[];
|
|
49
|
+
totalItems: number;
|
|
50
|
+
pageNumber: number;
|
|
51
|
+
pageSize: number;
|
|
52
|
+
}
|
|
53
|
+
export interface CreateTaskRequest {
|
|
54
|
+
task: string;
|
|
55
|
+
llm?: string | null;
|
|
56
|
+
startUrl?: string | null;
|
|
57
|
+
maxSteps?: number | null;
|
|
58
|
+
structuredOutput?: string | null;
|
|
59
|
+
sessionId?: string | null;
|
|
60
|
+
metadata?: Record<string, string> | null;
|
|
61
|
+
secrets?: Record<string, string> | null;
|
|
62
|
+
allowedDomains?: string[] | null;
|
|
63
|
+
opVaultId?: string | null;
|
|
64
|
+
highlightElements?: boolean;
|
|
65
|
+
flashMode?: boolean;
|
|
66
|
+
thinking?: boolean;
|
|
67
|
+
vision?: boolean | 'auto' | null;
|
|
68
|
+
systemPromptExtension?: string | null;
|
|
69
|
+
judge?: boolean;
|
|
70
|
+
judgeGroundTruth?: string | null;
|
|
71
|
+
judgeLlm?: string | null;
|
|
72
|
+
skillIds?: string[] | null;
|
|
73
|
+
}
|
|
74
|
+
export interface CreateSessionRequest {
|
|
75
|
+
profileId?: string | null;
|
|
76
|
+
proxyCountryCode?: string | null;
|
|
77
|
+
startUrl?: string | null;
|
|
78
|
+
browserScreenWidth?: number | null;
|
|
79
|
+
browserScreenHeight?: number | null;
|
|
80
|
+
}
|
|
81
|
+
export declare class CloudManagementClient {
|
|
82
|
+
private readonly api_base_url;
|
|
83
|
+
private readonly explicit_api_key;
|
|
84
|
+
private readonly fetch_impl;
|
|
85
|
+
constructor(options?: CloudManagementClientOptions);
|
|
86
|
+
private resolve_api_key;
|
|
87
|
+
private auth_headers;
|
|
88
|
+
private request_json;
|
|
89
|
+
private build_query;
|
|
90
|
+
list_tasks(options?: {
|
|
91
|
+
pageSize?: number;
|
|
92
|
+
pageNumber?: number;
|
|
93
|
+
sessionId?: string | null;
|
|
94
|
+
filterBy?: string | null;
|
|
95
|
+
after?: string | null;
|
|
96
|
+
before?: string | null;
|
|
97
|
+
}): Promise<PaginatedResponse<CloudTaskView>>;
|
|
98
|
+
create_task(request: CreateTaskRequest): Promise<{
|
|
99
|
+
id: string;
|
|
100
|
+
sessionId: string;
|
|
101
|
+
}>;
|
|
102
|
+
get_task(task_id: string): Promise<CloudTaskView>;
|
|
103
|
+
update_task(task_id: string, action: 'stop' | 'stop_task_and_session'): Promise<CloudTaskView>;
|
|
104
|
+
get_task_logs(task_id: string): Promise<{
|
|
105
|
+
downloadUrl: string;
|
|
106
|
+
}>;
|
|
107
|
+
list_sessions(options?: {
|
|
108
|
+
pageSize?: number;
|
|
109
|
+
pageNumber?: number;
|
|
110
|
+
filterBy?: string | null;
|
|
111
|
+
}): Promise<PaginatedResponse<CloudSessionView>>;
|
|
112
|
+
create_session(request: CreateSessionRequest): Promise<CloudSessionView>;
|
|
113
|
+
get_session(session_id: string): Promise<CloudSessionView>;
|
|
114
|
+
update_session(session_id: string, action: 'stop'): Promise<CloudSessionView>;
|
|
115
|
+
delete_session(session_id: string): Promise<void>;
|
|
116
|
+
create_session_public_share(session_id: string): Promise<CloudShareView>;
|
|
117
|
+
delete_session_public_share(session_id: string): Promise<void>;
|
|
118
|
+
list_profiles(options?: {
|
|
119
|
+
pageSize?: number;
|
|
120
|
+
pageNumber?: number;
|
|
121
|
+
}): Promise<PaginatedResponse<CloudProfileView>>;
|
|
122
|
+
create_profile(request?: {
|
|
123
|
+
name?: string | null;
|
|
124
|
+
}): Promise<CloudProfileView>;
|
|
125
|
+
get_profile(profile_id: string): Promise<CloudProfileView>;
|
|
126
|
+
update_profile(profile_id: string, request?: {
|
|
127
|
+
name?: string | null;
|
|
128
|
+
}): Promise<CloudProfileView>;
|
|
129
|
+
delete_profile(profile_id: string): Promise<void>;
|
|
130
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { CONFIG } from '../../config.js';
|
|
2
|
+
import { DeviceAuthClient } from '../../sync/auth.js';
|
|
3
|
+
import { CloudBrowserAuthError, CloudBrowserError } from './views.js';
|
|
4
|
+
const stripTrailingSlash = (input) => input.replace(/\/+$/, '');
|
|
5
|
+
export class CloudManagementClient {
|
|
6
|
+
api_base_url;
|
|
7
|
+
explicit_api_key;
|
|
8
|
+
fetch_impl;
|
|
9
|
+
constructor(options = {}) {
|
|
10
|
+
this.api_base_url = stripTrailingSlash(options.api_base_url ?? CONFIG.BROWSER_USE_CLOUD_API_URL);
|
|
11
|
+
this.explicit_api_key = options.api_key ?? null;
|
|
12
|
+
this.fetch_impl = options.fetch_impl ?? fetch;
|
|
13
|
+
}
|
|
14
|
+
resolve_api_key() {
|
|
15
|
+
if (this.explicit_api_key?.trim()) {
|
|
16
|
+
return this.explicit_api_key.trim();
|
|
17
|
+
}
|
|
18
|
+
if (process.env.BROWSER_USE_API_KEY?.trim()) {
|
|
19
|
+
return process.env.BROWSER_USE_API_KEY.trim();
|
|
20
|
+
}
|
|
21
|
+
const savedToken = new DeviceAuthClient(this.api_base_url).api_token?.trim();
|
|
22
|
+
return savedToken || null;
|
|
23
|
+
}
|
|
24
|
+
auth_headers(extra_headers = {}) {
|
|
25
|
+
const api_key = this.resolve_api_key();
|
|
26
|
+
if (!api_key) {
|
|
27
|
+
throw new CloudBrowserAuthError('No authentication token found. Set BROWSER_USE_API_KEY to use cloud APIs.');
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'X-Browser-Use-API-Key': api_key,
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
...extra_headers,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
async request_json(path, init) {
|
|
36
|
+
const response = await this.fetch_impl(`${this.api_base_url}${path}`, {
|
|
37
|
+
...init,
|
|
38
|
+
headers: this.auth_headers(init.headers),
|
|
39
|
+
});
|
|
40
|
+
const text = await response.text();
|
|
41
|
+
let payload = null;
|
|
42
|
+
if (text) {
|
|
43
|
+
try {
|
|
44
|
+
payload = JSON.parse(text);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
payload = text;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (!response.ok) {
|
|
51
|
+
const details = payload && typeof payload === 'object'
|
|
52
|
+
? JSON.stringify(payload)
|
|
53
|
+
: String(payload ?? '');
|
|
54
|
+
if (response.status === 401 || response.status === 403) {
|
|
55
|
+
throw new CloudBrowserAuthError(`Cloud API authentication failed (${response.status})`);
|
|
56
|
+
}
|
|
57
|
+
throw new CloudBrowserError(`Cloud API request failed (${response.status}): ${details}`);
|
|
58
|
+
}
|
|
59
|
+
return payload;
|
|
60
|
+
}
|
|
61
|
+
build_query(params) {
|
|
62
|
+
const query = new URLSearchParams();
|
|
63
|
+
for (const [key, value] of Object.entries(params)) {
|
|
64
|
+
if (value !== undefined && value !== null && String(value).length > 0) {
|
|
65
|
+
query.set(key, String(value));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const rendered = query.toString();
|
|
69
|
+
return rendered ? `?${rendered}` : '';
|
|
70
|
+
}
|
|
71
|
+
async list_tasks(options = {}) {
|
|
72
|
+
return await this.request_json(`/api/v2/tasks${this.build_query(options)}`, { method: 'GET' });
|
|
73
|
+
}
|
|
74
|
+
async create_task(request) {
|
|
75
|
+
return await this.request_json('/api/v2/tasks', {
|
|
76
|
+
method: 'POST',
|
|
77
|
+
body: JSON.stringify(request),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
async get_task(task_id) {
|
|
81
|
+
return await this.request_json(`/api/v2/tasks/${encodeURIComponent(task_id)}`, { method: 'GET' });
|
|
82
|
+
}
|
|
83
|
+
async update_task(task_id, action) {
|
|
84
|
+
return await this.request_json(`/api/v2/tasks/${encodeURIComponent(task_id)}`, {
|
|
85
|
+
method: 'PATCH',
|
|
86
|
+
body: JSON.stringify({ action }),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
async get_task_logs(task_id) {
|
|
90
|
+
return await this.request_json(`/api/v2/tasks/${encodeURIComponent(task_id)}/logs`, { method: 'GET' });
|
|
91
|
+
}
|
|
92
|
+
async list_sessions(options = {}) {
|
|
93
|
+
return await this.request_json(`/api/v2/sessions${this.build_query(options)}`, { method: 'GET' });
|
|
94
|
+
}
|
|
95
|
+
async create_session(request) {
|
|
96
|
+
return await this.request_json('/api/v2/sessions', {
|
|
97
|
+
method: 'POST',
|
|
98
|
+
body: JSON.stringify(request),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
async get_session(session_id) {
|
|
102
|
+
return await this.request_json(`/api/v2/sessions/${encodeURIComponent(session_id)}`, { method: 'GET' });
|
|
103
|
+
}
|
|
104
|
+
async update_session(session_id, action) {
|
|
105
|
+
return await this.request_json(`/api/v2/sessions/${encodeURIComponent(session_id)}`, {
|
|
106
|
+
method: 'PATCH',
|
|
107
|
+
body: JSON.stringify({ action }),
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
async delete_session(session_id) {
|
|
111
|
+
await this.request_json(`/api/v2/sessions/${encodeURIComponent(session_id)}`, { method: 'DELETE' });
|
|
112
|
+
}
|
|
113
|
+
async create_session_public_share(session_id) {
|
|
114
|
+
return await this.request_json(`/api/v2/sessions/${encodeURIComponent(session_id)}/public-share`, { method: 'POST' });
|
|
115
|
+
}
|
|
116
|
+
async delete_session_public_share(session_id) {
|
|
117
|
+
await this.request_json(`/api/v2/sessions/${encodeURIComponent(session_id)}/public-share`, { method: 'DELETE' });
|
|
118
|
+
}
|
|
119
|
+
async list_profiles(options = {}) {
|
|
120
|
+
return await this.request_json(`/api/v2/profiles${this.build_query(options)}`, { method: 'GET' });
|
|
121
|
+
}
|
|
122
|
+
async create_profile(request = {}) {
|
|
123
|
+
return await this.request_json('/api/v2/profiles', {
|
|
124
|
+
method: 'POST',
|
|
125
|
+
body: JSON.stringify(request),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
async get_profile(profile_id) {
|
|
129
|
+
return await this.request_json(`/api/v2/profiles/${encodeURIComponent(profile_id)}`, { method: 'GET' });
|
|
130
|
+
}
|
|
131
|
+
async update_profile(profile_id, request = {}) {
|
|
132
|
+
return await this.request_json(`/api/v2/profiles/${encodeURIComponent(profile_id)}`, {
|
|
133
|
+
method: 'PATCH',
|
|
134
|
+
body: JSON.stringify(request),
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
async delete_profile(profile_id) {
|
|
138
|
+
await this.request_json(`/api/v2/profiles/${encodeURIComponent(profile_id)}`, { method: 'DELETE' });
|
|
139
|
+
}
|
|
140
|
+
}
|
package/dist/browser/events.d.ts
CHANGED
|
@@ -80,10 +80,20 @@ export declare class CloseTabEvent extends BrowserEvent<void> {
|
|
|
80
80
|
}
|
|
81
81
|
export declare class ScreenshotEvent extends BrowserEvent<string> {
|
|
82
82
|
full_page: boolean;
|
|
83
|
-
clip:
|
|
83
|
+
clip: {
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
86
|
+
width: number;
|
|
87
|
+
height: number;
|
|
88
|
+
} | null;
|
|
84
89
|
constructor(init?: EventBusEventInit<string> & {
|
|
85
90
|
full_page?: boolean;
|
|
86
|
-
clip?:
|
|
91
|
+
clip?: {
|
|
92
|
+
x: number;
|
|
93
|
+
y: number;
|
|
94
|
+
width: number;
|
|
95
|
+
height: number;
|
|
96
|
+
} | null;
|
|
87
97
|
});
|
|
88
98
|
}
|
|
89
99
|
export declare class BrowserStateRequestEvent extends BrowserEvent<BrowserStateSummary> {
|
|
@@ -175,12 +185,60 @@ export declare class BrowserConnectedEvent extends BrowserEvent<void> {
|
|
|
175
185
|
cdp_url: string;
|
|
176
186
|
});
|
|
177
187
|
}
|
|
188
|
+
export declare class BrowserReconnectingEvent extends BrowserEvent<void> {
|
|
189
|
+
cdp_url: string;
|
|
190
|
+
attempt: number;
|
|
191
|
+
max_attempts: number;
|
|
192
|
+
constructor(init: EventBusEventInit<void> & {
|
|
193
|
+
cdp_url: string;
|
|
194
|
+
attempt: number;
|
|
195
|
+
max_attempts: number;
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
export declare class BrowserReconnectedEvent extends BrowserEvent<void> {
|
|
199
|
+
cdp_url: string;
|
|
200
|
+
attempt: number;
|
|
201
|
+
downtime_seconds: number;
|
|
202
|
+
constructor(init: EventBusEventInit<void> & {
|
|
203
|
+
cdp_url: string;
|
|
204
|
+
attempt: number;
|
|
205
|
+
downtime_seconds: number;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
178
208
|
export declare class BrowserStoppedEvent extends BrowserEvent<void> {
|
|
179
209
|
reason: string | null;
|
|
180
210
|
constructor(init?: EventBusEventInit<void> & {
|
|
181
211
|
reason?: string | null;
|
|
182
212
|
});
|
|
183
213
|
}
|
|
214
|
+
export declare class CaptchaSolverStartedEvent extends BrowserEvent<void> {
|
|
215
|
+
target_id: TargetID;
|
|
216
|
+
vendor: string;
|
|
217
|
+
url: string;
|
|
218
|
+
started_at: number;
|
|
219
|
+
constructor(init: EventBusEventInit<void> & {
|
|
220
|
+
target_id: TargetID;
|
|
221
|
+
vendor: string;
|
|
222
|
+
url: string;
|
|
223
|
+
started_at: number;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
export declare class CaptchaSolverFinishedEvent extends BrowserEvent<void> {
|
|
227
|
+
target_id: TargetID;
|
|
228
|
+
vendor: string;
|
|
229
|
+
url: string;
|
|
230
|
+
duration_ms: number;
|
|
231
|
+
finished_at: number;
|
|
232
|
+
success: boolean;
|
|
233
|
+
constructor(init: EventBusEventInit<void> & {
|
|
234
|
+
target_id: TargetID;
|
|
235
|
+
vendor: string;
|
|
236
|
+
url: string;
|
|
237
|
+
duration_ms: number;
|
|
238
|
+
finished_at: number;
|
|
239
|
+
success: boolean;
|
|
240
|
+
});
|
|
241
|
+
}
|
|
184
242
|
export declare class TabCreatedEvent extends BrowserEvent<void> {
|
|
185
243
|
target_id: TargetID;
|
|
186
244
|
url: string;
|
|
@@ -341,5 +399,5 @@ export declare class DialogOpenedEvent extends BrowserEvent<void> {
|
|
|
341
399
|
frame_id?: string | null;
|
|
342
400
|
});
|
|
343
401
|
}
|
|
344
|
-
export declare const BROWSER_EVENT_CLASSES: readonly [typeof ElementSelectedEvent, typeof NavigateToUrlEvent, typeof ClickElementEvent, typeof ClickCoordinateEvent, typeof TypeTextEvent, typeof ScrollEvent, typeof SwitchTabEvent, typeof CloseTabEvent, typeof ScreenshotEvent, typeof BrowserStateRequestEvent, typeof GoBackEvent, typeof GoForwardEvent, typeof RefreshEvent, typeof WaitEvent, typeof SendKeysEvent, typeof UploadFileEvent, typeof GetDropdownOptionsEvent, typeof SelectDropdownOptionEvent, typeof ScrollToTextEvent, typeof BrowserStartEvent, typeof BrowserStopEvent, typeof BrowserLaunchEvent, typeof BrowserKillEvent, typeof BrowserConnectedEvent, typeof BrowserStoppedEvent, typeof TabCreatedEvent, typeof TabClosedEvent, typeof AgentFocusChangedEvent, typeof TargetCrashedEvent, typeof NavigationStartedEvent, typeof NavigationCompleteEvent, typeof BrowserErrorEvent, typeof SaveStorageStateEvent, typeof StorageStateSavedEvent, typeof LoadStorageStateEvent, typeof StorageStateLoadedEvent, typeof DownloadStartedEvent, typeof DownloadProgressEvent, typeof FileDownloadedEvent, typeof AboutBlankDVDScreensaverShownEvent, typeof DialogOpenedEvent];
|
|
402
|
+
export declare const BROWSER_EVENT_CLASSES: readonly [typeof ElementSelectedEvent, typeof NavigateToUrlEvent, typeof ClickElementEvent, typeof ClickCoordinateEvent, typeof TypeTextEvent, typeof ScrollEvent, typeof SwitchTabEvent, typeof CloseTabEvent, typeof ScreenshotEvent, typeof BrowserStateRequestEvent, typeof GoBackEvent, typeof GoForwardEvent, typeof RefreshEvent, typeof WaitEvent, typeof SendKeysEvent, typeof UploadFileEvent, typeof GetDropdownOptionsEvent, typeof SelectDropdownOptionEvent, typeof ScrollToTextEvent, typeof BrowserStartEvent, typeof BrowserStopEvent, typeof BrowserLaunchEvent, typeof BrowserKillEvent, typeof BrowserConnectedEvent, typeof BrowserReconnectingEvent, typeof BrowserReconnectedEvent, typeof BrowserStoppedEvent, typeof TabCreatedEvent, typeof TabClosedEvent, typeof AgentFocusChangedEvent, typeof TargetCrashedEvent, typeof NavigationStartedEvent, typeof NavigationCompleteEvent, typeof BrowserErrorEvent, typeof SaveStorageStateEvent, typeof StorageStateSavedEvent, typeof LoadStorageStateEvent, typeof StorageStateLoadedEvent, typeof DownloadStartedEvent, typeof DownloadProgressEvent, typeof FileDownloadedEvent, typeof AboutBlankDVDScreensaverShownEvent, typeof DialogOpenedEvent];
|
|
345
403
|
export declare const BROWSER_EVENT_NAMES: string[];
|