@olib-ai/owl-browser-sdk 2.0.7 → 2.1.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/README.md +14 -104
- package/dist/flow/conditions.d.ts +2 -2
- package/dist/flow/conditions.d.ts.map +1 -1
- package/dist/flow/conditions.js +25 -5
- package/dist/flow/conditions.js.map +1 -1
- package/dist/flow/executor.d.ts +44 -2
- package/dist/flow/executor.d.ts.map +1 -1
- package/dist/flow/executor.js +441 -51
- package/dist/flow/executor.js.map +1 -1
- package/dist/flow/expectations.d.ts.map +1 -1
- package/dist/flow/expectations.js +42 -4
- package/dist/flow/expectations.js.map +1 -1
- package/dist/flow/extraction.d.ts +32 -0
- package/dist/flow/extraction.d.ts.map +1 -0
- package/dist/flow/extraction.js +56 -0
- package/dist/flow/extraction.js.map +1 -0
- package/dist/flow/index.d.ts +2 -0
- package/dist/flow/index.d.ts.map +1 -1
- package/dist/flow/index.js +1 -0
- package/dist/flow/index.js.map +1 -1
- package/dist/flow/notifications.d.ts +97 -0
- package/dist/flow/notifications.d.ts.map +1 -0
- package/dist/flow/notifications.js +249 -0
- package/dist/flow/notifications.js.map +1 -0
- package/dist/flow/variables.d.ts +7 -1
- package/dist/flow/variables.d.ts.map +1 -1
- package/dist/flow/variables.js +90 -33
- package/dist/flow/variables.js.map +1 -1
- package/dist/types.d.ts +100 -2
- package/dist/types.d.ts.map +1 -1
- package/openapi.json +295 -45
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Owl Browser API",
|
|
5
5
|
"description": "REST API for browser automation with anti-detection capabilities",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.1.2"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
10
|
-
"url": "http://
|
|
10
|
+
"url": "http://localhost",
|
|
11
11
|
"description": "Current server"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -120,6 +120,82 @@
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
+
"/search": {
|
|
124
|
+
"get": {
|
|
125
|
+
"summary": "Browser Search",
|
|
126
|
+
"description": "One-shot web search tool. Creates a new context, navigates to the search engine, waits for results, extracts structured JSON search results (titles, URLs, snippets), and closes the context. Supports Google and DuckDuckGo with pagination.",
|
|
127
|
+
"tags": [
|
|
128
|
+
"Navigation"
|
|
129
|
+
],
|
|
130
|
+
"parameters": [
|
|
131
|
+
{
|
|
132
|
+
"name": "query",
|
|
133
|
+
"in": "query",
|
|
134
|
+
"required": true,
|
|
135
|
+
"schema": {
|
|
136
|
+
"type": "string"
|
|
137
|
+
},
|
|
138
|
+
"description": "The search query string (e.g., 'best restaurants in NYC', 'python tutorial')"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "provider",
|
|
142
|
+
"in": "query",
|
|
143
|
+
"required": false,
|
|
144
|
+
"schema": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [
|
|
147
|
+
"duckduckgo",
|
|
148
|
+
"google"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"description": "Search engine provider. 'duckduckgo' uses DuckDuckGo HTML-lite, 'google' uses Google Search. Default: duckduckgo"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "page",
|
|
155
|
+
"in": "query",
|
|
156
|
+
"required": false,
|
|
157
|
+
"schema": {
|
|
158
|
+
"type": "integer"
|
|
159
|
+
},
|
|
160
|
+
"description": "Page number for paginated results (1-based). Default: 1. For Google: appends &start=((page-1)*10). For DuckDuckGo: appends &s=((page-1)*10)"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "os",
|
|
164
|
+
"in": "query",
|
|
165
|
+
"required": false,
|
|
166
|
+
"schema": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"enum": [
|
|
169
|
+
"windows",
|
|
170
|
+
"macos",
|
|
171
|
+
"linux"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"description": "Filter profiles by operating system. Options: 'windows', 'macos', 'linux'"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "use_tor",
|
|
178
|
+
"in": "query",
|
|
179
|
+
"required": false,
|
|
180
|
+
"schema": {
|
|
181
|
+
"type": "boolean"
|
|
182
|
+
},
|
|
183
|
+
"description": "Use TOR proxy for anonymous browsing. Each request gets a unique exit IP. Default: false"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"responses": {
|
|
187
|
+
"200": {
|
|
188
|
+
"description": "Successful response with structured search results JSON"
|
|
189
|
+
},
|
|
190
|
+
"400": {
|
|
191
|
+
"description": "Bad request"
|
|
192
|
+
},
|
|
193
|
+
"401": {
|
|
194
|
+
"description": "Unauthorized"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
123
199
|
"/api/execute/browser_create_context": {
|
|
124
200
|
"post": {
|
|
125
201
|
"summary": "Browser Create Context",
|
|
@@ -134,29 +210,59 @@
|
|
|
134
210
|
"schema": {
|
|
135
211
|
"type": "object",
|
|
136
212
|
"properties": {
|
|
137
|
-
"
|
|
138
|
-
"type": "
|
|
139
|
-
"description": "
|
|
213
|
+
"profile_path": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "Path to a browser profile JSON file (or upload file via multipart/form-data). If the file exists, loads fingerprints, cookies, and settings. If not, creates a new profile and saves it to this path. Encrypted profiles (from browser_download_profile) are automatically detected and decrypted."
|
|
140
216
|
},
|
|
141
|
-
"
|
|
142
|
-
"type": "
|
|
143
|
-
"description": "
|
|
217
|
+
"os": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"description": "Filter profiles by operating system. If set, only profiles matching this OS will be used. Options: 'windows', 'macos', 'linux'",
|
|
220
|
+
"enum": [
|
|
221
|
+
"windows",
|
|
222
|
+
"macos",
|
|
223
|
+
"linux"
|
|
224
|
+
]
|
|
144
225
|
},
|
|
145
|
-
"
|
|
226
|
+
"gpu": {
|
|
146
227
|
"type": "string",
|
|
147
|
-
"description": "
|
|
228
|
+
"description": "Filter profiles by GPU vendor/model. If set, only profiles with matching GPU will be used. Examples: 'nvidia', 'amd', 'intel'"
|
|
148
229
|
},
|
|
149
|
-
"
|
|
230
|
+
"screen_size": {
|
|
150
231
|
"type": "string",
|
|
151
|
-
"description": "
|
|
232
|
+
"description": "Screen resolution for the browser context. Format: 'WIDTHxHEIGHT'. If not set, a random screen size is selected from the monitor catalog.",
|
|
233
|
+
"enum": [
|
|
234
|
+
"1920x1080",
|
|
235
|
+
"2560x1440",
|
|
236
|
+
"3440x1440",
|
|
237
|
+
"3840x2160",
|
|
238
|
+
"3840x1600",
|
|
239
|
+
"5120x2160",
|
|
240
|
+
"5120x1440"
|
|
241
|
+
]
|
|
152
242
|
},
|
|
153
|
-
"
|
|
243
|
+
"timezone": {
|
|
154
244
|
"type": "string",
|
|
155
|
-
"description": "
|
|
245
|
+
"description": "Override browser timezone. IANA timezone format (e.g., 'America/New_York', 'Europe/London', 'Asia/Tokyo'). If not set, falls back to: 1) proxy-detected timezone (if proxy configured with spoof_timezone), 2) VM profile timezone, 3) system default. This parameter works without proxy configuration."
|
|
156
246
|
},
|
|
157
|
-
"
|
|
247
|
+
"resource_blocking": {
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"description": "Enable or disable resource blocking (ads, trackers, analytics). When enabled, blocks requests to known ad networks, trackers, and analytics services. Default: true (enabled)"
|
|
250
|
+
},
|
|
251
|
+
"chrome_version_id": {
|
|
158
252
|
"type": "string",
|
|
159
|
-
"description": "
|
|
253
|
+
"description": "Pin this context to a specific row in the chrome_versions table (FK by id, 1..N matching INSERT order sorted by major). Use chrome_version_major instead if you'd rather think in terms of '147'. Mutually exclusive with chrome_version_major; chrome_version_id wins when both are set. 0 / unset = random selection across all chrome_version_ids matching the os/gpu/screen filters."
|
|
254
|
+
},
|
|
255
|
+
"chrome_version_major": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "Pin this context to a specific Chrome major. Resolved to chrome_version_id by looking up the chrome_versions row whose major matches. Options: '143', '144', '145', '146', '147', '148' (current 6-major roster).",
|
|
258
|
+
"enum": [
|
|
259
|
+
"143",
|
|
260
|
+
"144",
|
|
261
|
+
"145",
|
|
262
|
+
"146",
|
|
263
|
+
"147",
|
|
264
|
+
"148"
|
|
265
|
+
]
|
|
160
266
|
},
|
|
161
267
|
"proxy_type": {
|
|
162
268
|
"type": "string",
|
|
@@ -214,39 +320,25 @@
|
|
|
214
320
|
"type": "string",
|
|
215
321
|
"description": "Password for Tor control port authentication. Leave empty to use cookie authentication (default) or no auth"
|
|
216
322
|
},
|
|
217
|
-
"
|
|
323
|
+
"llm_enabled": {
|
|
218
324
|
"type": "boolean",
|
|
219
|
-
"description": "Enable or disable
|
|
325
|
+
"description": "Enable or disable LLM features for this context. When enabled, allows using AI-powered tools like browser_query_page, browser_summarize_page, and browser_nla. Default: true"
|
|
220
326
|
},
|
|
221
|
-
"
|
|
222
|
-
"type": "
|
|
223
|
-
"description": "
|
|
224
|
-
"enum": [
|
|
225
|
-
"windows",
|
|
226
|
-
"macos",
|
|
227
|
-
"linux"
|
|
228
|
-
]
|
|
327
|
+
"llm_use_builtin": {
|
|
328
|
+
"type": "boolean",
|
|
329
|
+
"description": "Use the built-in llama-server for LLM inference. When true, uses the bundled local model. Set to false to use an external LLM provider. Default: true"
|
|
229
330
|
},
|
|
230
|
-
"
|
|
331
|
+
"llm_endpoint": {
|
|
231
332
|
"type": "string",
|
|
232
|
-
"description": "
|
|
333
|
+
"description": "External LLM API endpoint URL (e.g., 'https://api.openai.com/v1' for OpenAI). Only used when llm_use_builtin is false"
|
|
233
334
|
},
|
|
234
|
-
"
|
|
335
|
+
"llm_model": {
|
|
235
336
|
"type": "string",
|
|
236
|
-
"description": "
|
|
337
|
+
"description": "External LLM model name (e.g., 'gpt-4-vision-preview' for OpenAI). Only used when llm_use_builtin is false"
|
|
237
338
|
},
|
|
238
|
-
"
|
|
339
|
+
"llm_api_key": {
|
|
239
340
|
"type": "string",
|
|
240
|
-
"description": "
|
|
241
|
-
"enum": [
|
|
242
|
-
"1920x1080",
|
|
243
|
-
"2560x1440",
|
|
244
|
-
"3440x1440",
|
|
245
|
-
"3840x2160",
|
|
246
|
-
"3840x1600",
|
|
247
|
-
"5120x2160",
|
|
248
|
-
"5120x1440"
|
|
249
|
-
]
|
|
341
|
+
"description": "API key for the external LLM provider. Required when using external LLM endpoint"
|
|
250
342
|
}
|
|
251
343
|
}
|
|
252
344
|
}
|
|
@@ -339,7 +431,7 @@
|
|
|
339
431
|
"/api/execute/browser_navigate": {
|
|
340
432
|
"post": {
|
|
341
433
|
"summary": "Browser Navigate",
|
|
342
|
-
"description": "Navigate the browser to a specified URL. This is a non-blocking operation that starts navigation and returns immediately. Use browser_wait_for_network_idle or browser_wait_for_selector to wait for the page to fully load. Supports HTTP, HTTPS, file, and data URLs.",
|
|
434
|
+
"description": "Navigate the browser to a specified URL. This is a non-blocking operation that starts navigation and returns immediately. Use browser_wait_for_network_idle or browser_wait_for_selector to wait for the page to fully load. Supports HTTP, HTTPS, file, and data URLs. When wait_until is set (load, networkidle, fullscroll, domcontentloaded) and the page declares WebMCP tools, the response includes a webmcp_tools array containing the full tool definitions (name, description, inputSchema). Use browser_webmcp_call_tool to execute any of these tools directly.",
|
|
343
435
|
"tags": [
|
|
344
436
|
"General"
|
|
345
437
|
],
|
|
@@ -2747,7 +2839,7 @@
|
|
|
2747
2839
|
},
|
|
2748
2840
|
"template": {
|
|
2749
2841
|
"type": "string",
|
|
2750
|
-
"description": "Extraction template name for known site types. Available: 'google_search', 'wikipedia', 'amazon_product', 'github_repo', 'twitter_feed', 'reddit_thread'. Leave empty for auto-detection based on URL"
|
|
2842
|
+
"description": "Extraction template name for known site types. Available: 'google_search', 'duckduckgo_search', 'wikipedia', 'amazon_product', 'github_repo', 'twitter_feed', 'reddit_thread'. Leave empty for auto-detection based on URL"
|
|
2751
2843
|
},
|
|
2752
2844
|
"selector": {
|
|
2753
2845
|
"type": "string",
|
|
@@ -6248,11 +6340,12 @@
|
|
|
6248
6340
|
},
|
|
6249
6341
|
"action": {
|
|
6250
6342
|
"type": "string",
|
|
6251
|
-
"description": "How to automatically handle this dialog type: 'accept' clicks OK/Yes, 'dismiss' clicks Cancel/No, 'accept_with_text' accepts and provides text input (for prompts)",
|
|
6343
|
+
"description": "How to automatically handle this dialog type: 'accept' clicks OK/Yes, 'dismiss' clicks Cancel/No, 'accept_with_text' accepts and provides text input (for prompts), 'wait' holds the dialog for manual handling via browser_handle_dialog",
|
|
6252
6344
|
"enum": [
|
|
6253
6345
|
"accept",
|
|
6254
6346
|
"dismiss",
|
|
6255
|
-
"accept_with_text"
|
|
6347
|
+
"accept_with_text",
|
|
6348
|
+
"wait"
|
|
6256
6349
|
]
|
|
6257
6350
|
},
|
|
6258
6351
|
"prompt_text": {
|
|
@@ -8414,6 +8507,163 @@
|
|
|
8414
8507
|
}
|
|
8415
8508
|
}
|
|
8416
8509
|
}
|
|
8510
|
+
},
|
|
8511
|
+
"/api/execute/browser_webmcp_get_tools": {
|
|
8512
|
+
"post": {
|
|
8513
|
+
"summary": "Browser Webmcp Get Tools",
|
|
8514
|
+
"description": "Get all WebMCP tools declared by the current page via navigator.modelContext.registerTool() or declarative <form toolname> elements. Returns a JSON array of tool definitions with name, description, and inputSchema. Use after navigating to a page to discover available page-level tools.",
|
|
8515
|
+
"tags": [
|
|
8516
|
+
"General"
|
|
8517
|
+
],
|
|
8518
|
+
"requestBody": {
|
|
8519
|
+
"required": true,
|
|
8520
|
+
"content": {
|
|
8521
|
+
"application/json": {
|
|
8522
|
+
"schema": {
|
|
8523
|
+
"type": "object",
|
|
8524
|
+
"properties": {
|
|
8525
|
+
"context_id": {
|
|
8526
|
+
"type": "string",
|
|
8527
|
+
"description": "The unique identifier of the browser context (e.g., 'ctx_000001')"
|
|
8528
|
+
}
|
|
8529
|
+
},
|
|
8530
|
+
"required": [
|
|
8531
|
+
"context_id"
|
|
8532
|
+
]
|
|
8533
|
+
}
|
|
8534
|
+
}
|
|
8535
|
+
}
|
|
8536
|
+
},
|
|
8537
|
+
"responses": {
|
|
8538
|
+
"200": {
|
|
8539
|
+
"description": "Successful response"
|
|
8540
|
+
},
|
|
8541
|
+
"400": {
|
|
8542
|
+
"description": "Bad request"
|
|
8543
|
+
},
|
|
8544
|
+
"401": {
|
|
8545
|
+
"description": "Unauthorized"
|
|
8546
|
+
}
|
|
8547
|
+
}
|
|
8548
|
+
}
|
|
8549
|
+
},
|
|
8550
|
+
"/api/execute/browser_webmcp_call_tool": {
|
|
8551
|
+
"post": {
|
|
8552
|
+
"summary": "Browser Webmcp Call Tool",
|
|
8553
|
+
"description": "Execute a WebMCP tool that was declared by the page. The tool's execute callback runs in the page's JavaScript context. For declarative form tools, this fills form fields with the input values and submits. Returns the tool's result as JSON. Timeout: 30 seconds.",
|
|
8554
|
+
"tags": [
|
|
8555
|
+
"General"
|
|
8556
|
+
],
|
|
8557
|
+
"requestBody": {
|
|
8558
|
+
"required": true,
|
|
8559
|
+
"content": {
|
|
8560
|
+
"application/json": {
|
|
8561
|
+
"schema": {
|
|
8562
|
+
"type": "object",
|
|
8563
|
+
"properties": {
|
|
8564
|
+
"context_id": {
|
|
8565
|
+
"type": "string",
|
|
8566
|
+
"description": "The unique identifier of the browser context (e.g., 'ctx_000001')"
|
|
8567
|
+
},
|
|
8568
|
+
"tool_name": {
|
|
8569
|
+
"type": "string",
|
|
8570
|
+
"description": "The name of the WebMCP tool to execute (as registered by the page via navigator.modelContext.registerTool)"
|
|
8571
|
+
},
|
|
8572
|
+
"input": {
|
|
8573
|
+
"type": "string",
|
|
8574
|
+
"description": "JSON object containing input parameters for the tool, matching the tool's inputSchema"
|
|
8575
|
+
}
|
|
8576
|
+
},
|
|
8577
|
+
"required": [
|
|
8578
|
+
"context_id",
|
|
8579
|
+
"tool_name"
|
|
8580
|
+
]
|
|
8581
|
+
}
|
|
8582
|
+
}
|
|
8583
|
+
}
|
|
8584
|
+
},
|
|
8585
|
+
"responses": {
|
|
8586
|
+
"200": {
|
|
8587
|
+
"description": "Successful response"
|
|
8588
|
+
},
|
|
8589
|
+
"400": {
|
|
8590
|
+
"description": "Bad request"
|
|
8591
|
+
},
|
|
8592
|
+
"401": {
|
|
8593
|
+
"description": "Unauthorized"
|
|
8594
|
+
}
|
|
8595
|
+
}
|
|
8596
|
+
}
|
|
8597
|
+
},
|
|
8598
|
+
"/api/execute/browser_webmcp_refresh_tools": {
|
|
8599
|
+
"post": {
|
|
8600
|
+
"summary": "Browser Webmcp Refresh Tools",
|
|
8601
|
+
"description": "Trigger a re-scan of the page for declarative <form toolname> elements and return the updated tool list. Useful after SPA navigation or dynamic content changes that may have added new form-based tools.",
|
|
8602
|
+
"tags": [
|
|
8603
|
+
"General"
|
|
8604
|
+
],
|
|
8605
|
+
"requestBody": {
|
|
8606
|
+
"required": true,
|
|
8607
|
+
"content": {
|
|
8608
|
+
"application/json": {
|
|
8609
|
+
"schema": {
|
|
8610
|
+
"type": "object",
|
|
8611
|
+
"properties": {
|
|
8612
|
+
"context_id": {
|
|
8613
|
+
"type": "string",
|
|
8614
|
+
"description": "The unique identifier of the browser context (e.g., 'ctx_000001')"
|
|
8615
|
+
}
|
|
8616
|
+
},
|
|
8617
|
+
"required": [
|
|
8618
|
+
"context_id"
|
|
8619
|
+
]
|
|
8620
|
+
}
|
|
8621
|
+
}
|
|
8622
|
+
}
|
|
8623
|
+
},
|
|
8624
|
+
"responses": {
|
|
8625
|
+
"200": {
|
|
8626
|
+
"description": "Successful response"
|
|
8627
|
+
},
|
|
8628
|
+
"400": {
|
|
8629
|
+
"description": "Bad request"
|
|
8630
|
+
},
|
|
8631
|
+
"401": {
|
|
8632
|
+
"description": "Unauthorized"
|
|
8633
|
+
}
|
|
8634
|
+
}
|
|
8635
|
+
}
|
|
8636
|
+
},
|
|
8637
|
+
"/api/execute/browser_webmcp_get_all_tools": {
|
|
8638
|
+
"post": {
|
|
8639
|
+
"summary": "Browser Webmcp Get All Tools",
|
|
8640
|
+
"description": "Get all WebMCP tools across all browser contexts. Returns a JSON object keyed by context_id, with each value being an array of tool definitions. Useful for discovering which pages have registered tools without querying each context individually.",
|
|
8641
|
+
"tags": [
|
|
8642
|
+
"General"
|
|
8643
|
+
],
|
|
8644
|
+
"requestBody": {
|
|
8645
|
+
"required": true,
|
|
8646
|
+
"content": {
|
|
8647
|
+
"application/json": {
|
|
8648
|
+
"schema": {
|
|
8649
|
+
"type": "object",
|
|
8650
|
+
"properties": {}
|
|
8651
|
+
}
|
|
8652
|
+
}
|
|
8653
|
+
}
|
|
8654
|
+
},
|
|
8655
|
+
"responses": {
|
|
8656
|
+
"200": {
|
|
8657
|
+
"description": "Successful response"
|
|
8658
|
+
},
|
|
8659
|
+
"400": {
|
|
8660
|
+
"description": "Bad request"
|
|
8661
|
+
},
|
|
8662
|
+
"401": {
|
|
8663
|
+
"description": "Unauthorized"
|
|
8664
|
+
}
|
|
8665
|
+
}
|
|
8666
|
+
}
|
|
8417
8667
|
}
|
|
8418
8668
|
}
|
|
8419
8669
|
}
|
package/package.json
CHANGED