@olib-ai/owl-browser-mcp 1.0.3 → 1.0.5
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/index.js +247 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20431,13 +20431,14 @@ var openapi_default = {
|
|
|
20431
20431
|
},
|
|
20432
20432
|
proxy_type: {
|
|
20433
20433
|
type: "string",
|
|
20434
|
-
description: "Type of proxy server to use. Options: 'http', 'https', 'socks4', 'socks5', 'socks5h'. Use 'socks5h' for remote DNS resolution (recommended for privacy)",
|
|
20434
|
+
description: "Type of proxy server to use. Options: 'http', 'https', 'socks4', 'socks5', 'socks5h', 'gae'. Use 'socks5h' for remote DNS resolution (recommended for privacy). Use 'gae' for private app proxy",
|
|
20435
20435
|
enum: [
|
|
20436
20436
|
"http",
|
|
20437
20437
|
"https",
|
|
20438
20438
|
"socks4",
|
|
20439
20439
|
"socks5",
|
|
20440
|
-
"socks5h"
|
|
20440
|
+
"socks5h",
|
|
20441
|
+
"gae"
|
|
20441
20442
|
]
|
|
20442
20443
|
},
|
|
20443
20444
|
proxy_host: {
|
|
@@ -20464,6 +20465,10 @@ var openapi_default = {
|
|
|
20464
20465
|
type: "string",
|
|
20465
20466
|
description: "Path to custom CA certificate file (.pem, .crt, .cer) for SSL interception proxies. Required when using Charles Proxy, mitmproxy, or similar HTTPS inspection tools"
|
|
20466
20467
|
},
|
|
20468
|
+
proxy_ca_key_path: {
|
|
20469
|
+
type: "string",
|
|
20470
|
+
description: "Path to CA private key file for GAE/private app proxy MITM. Required for generating per-domain certificates when using 'gae' proxy type"
|
|
20471
|
+
},
|
|
20467
20472
|
proxy_trust_custom_ca: {
|
|
20468
20473
|
type: "boolean",
|
|
20469
20474
|
description: "Trust the custom CA certificate for SSL interception. Enable when using Charles Proxy, mitmproxy, or similar tools that intercept HTTPS traffic. Default: false"
|
|
@@ -22299,8 +22304,8 @@ var openapi_default = {
|
|
|
22299
22304
|
description: "CSS selector or natural language description for the element to capture. Required when mode is 'element'. Examples: 'div.profile', '#submit-btn', 'the login form'"
|
|
22300
22305
|
},
|
|
22301
22306
|
scale: {
|
|
22302
|
-
type: "
|
|
22303
|
-
description: "Scale percentage for the output image (1-100). Default is 100 (no scaling). Example: 50 will return an image at 50
|
|
22307
|
+
type: "string",
|
|
22308
|
+
description: "Scale percentage for the output image (1-100). Default is 100 (no scaling). Example: 50 will return an image at 50%% of the original size (half width and height)."
|
|
22304
22309
|
}
|
|
22305
22310
|
},
|
|
22306
22311
|
required: [
|
|
@@ -22529,6 +22534,204 @@ var openapi_default = {
|
|
|
22529
22534
|
}
|
|
22530
22535
|
}
|
|
22531
22536
|
},
|
|
22537
|
+
"/api/execute/browser_extract_site": {
|
|
22538
|
+
post: {
|
|
22539
|
+
summary: "Browser Extract Site",
|
|
22540
|
+
description: "Extract content from multiple pages of a website. Crawls links starting from a URL and extracts content in the specified format. Returns a job_id immediately for async progress tracking. Use browser_extract_site_progress to monitor and browser_extract_site_result to get output.",
|
|
22541
|
+
tags: [
|
|
22542
|
+
"General"
|
|
22543
|
+
],
|
|
22544
|
+
requestBody: {
|
|
22545
|
+
required: true,
|
|
22546
|
+
content: {
|
|
22547
|
+
"application/json": {
|
|
22548
|
+
schema: {
|
|
22549
|
+
type: "object",
|
|
22550
|
+
properties: {
|
|
22551
|
+
context_id: {
|
|
22552
|
+
type: "string",
|
|
22553
|
+
description: "The unique identifier of the browser context (e.g., 'ctx_000001')"
|
|
22554
|
+
},
|
|
22555
|
+
url: {
|
|
22556
|
+
type: "string",
|
|
22557
|
+
description: "Starting URL to begin extraction from"
|
|
22558
|
+
},
|
|
22559
|
+
depth: {
|
|
22560
|
+
type: "string",
|
|
22561
|
+
description: "How many link levels to follow from the starting page. Default: 2. Higher values extract more pages but take longer"
|
|
22562
|
+
},
|
|
22563
|
+
max_pages: {
|
|
22564
|
+
type: "string",
|
|
22565
|
+
description: "Maximum number of pages to extract. Default: 5. Limits total extraction to prevent runaway crawling"
|
|
22566
|
+
},
|
|
22567
|
+
follow_external: {
|
|
22568
|
+
type: "boolean",
|
|
22569
|
+
description: "Whether to follow links to external domains. Default: false. When false, only links within the same domain are followed"
|
|
22570
|
+
},
|
|
22571
|
+
output_format: {
|
|
22572
|
+
type: "string",
|
|
22573
|
+
description: "Output format for extracted content: 'markdown' (default), 'text', or 'json'. Markdown preserves structure, text is plain, JSON includes metadata",
|
|
22574
|
+
enum: [
|
|
22575
|
+
"markdown",
|
|
22576
|
+
"text",
|
|
22577
|
+
"json"
|
|
22578
|
+
]
|
|
22579
|
+
},
|
|
22580
|
+
include_images: {
|
|
22581
|
+
type: "boolean",
|
|
22582
|
+
description: "Include resolved image URLs in output. Default: true"
|
|
22583
|
+
},
|
|
22584
|
+
include_metadata: {
|
|
22585
|
+
type: "boolean",
|
|
22586
|
+
description: "Include page title and description metadata. Default: true"
|
|
22587
|
+
},
|
|
22588
|
+
exclude_patterns: {
|
|
22589
|
+
type: "string",
|
|
22590
|
+
description: 'Array of URL patterns to skip (glob patterns). Example: ["*/login*", "*/admin/*"]'
|
|
22591
|
+
},
|
|
22592
|
+
timeout_per_page: {
|
|
22593
|
+
type: "string",
|
|
22594
|
+
description: "Timeout per page in milliseconds. Default: 10000 (10 seconds)"
|
|
22595
|
+
}
|
|
22596
|
+
},
|
|
22597
|
+
required: [
|
|
22598
|
+
"context_id",
|
|
22599
|
+
"url"
|
|
22600
|
+
]
|
|
22601
|
+
}
|
|
22602
|
+
}
|
|
22603
|
+
}
|
|
22604
|
+
},
|
|
22605
|
+
responses: {
|
|
22606
|
+
"200": {
|
|
22607
|
+
description: "Successful response"
|
|
22608
|
+
},
|
|
22609
|
+
"400": {
|
|
22610
|
+
description: "Bad request"
|
|
22611
|
+
},
|
|
22612
|
+
"401": {
|
|
22613
|
+
description: "Unauthorized"
|
|
22614
|
+
}
|
|
22615
|
+
}
|
|
22616
|
+
}
|
|
22617
|
+
},
|
|
22618
|
+
"/api/execute/browser_extract_site_progress": {
|
|
22619
|
+
post: {
|
|
22620
|
+
summary: "Browser Extract Site Progress",
|
|
22621
|
+
description: "Get progress of a site extraction job. Returns pages_completed, pages_total, current_url, and status. Status can be: 'running', 'completed', 'cancelled', or 'error'.",
|
|
22622
|
+
tags: [
|
|
22623
|
+
"General"
|
|
22624
|
+
],
|
|
22625
|
+
requestBody: {
|
|
22626
|
+
required: true,
|
|
22627
|
+
content: {
|
|
22628
|
+
"application/json": {
|
|
22629
|
+
schema: {
|
|
22630
|
+
type: "object",
|
|
22631
|
+
properties: {
|
|
22632
|
+
job_id: {
|
|
22633
|
+
type: "string",
|
|
22634
|
+
description: "The job ID returned from browser_extract_site"
|
|
22635
|
+
}
|
|
22636
|
+
},
|
|
22637
|
+
required: [
|
|
22638
|
+
"job_id"
|
|
22639
|
+
]
|
|
22640
|
+
}
|
|
22641
|
+
}
|
|
22642
|
+
}
|
|
22643
|
+
},
|
|
22644
|
+
responses: {
|
|
22645
|
+
"200": {
|
|
22646
|
+
description: "Successful response"
|
|
22647
|
+
},
|
|
22648
|
+
"400": {
|
|
22649
|
+
description: "Bad request"
|
|
22650
|
+
},
|
|
22651
|
+
"401": {
|
|
22652
|
+
description: "Unauthorized"
|
|
22653
|
+
}
|
|
22654
|
+
}
|
|
22655
|
+
}
|
|
22656
|
+
},
|
|
22657
|
+
"/api/execute/browser_extract_site_result": {
|
|
22658
|
+
post: {
|
|
22659
|
+
summary: "Browser Extract Site Result",
|
|
22660
|
+
description: "Get the result of a completed site extraction job. Returns the formatted content based on the output_format specified when starting the job (markdown, text, or json).",
|
|
22661
|
+
tags: [
|
|
22662
|
+
"General"
|
|
22663
|
+
],
|
|
22664
|
+
requestBody: {
|
|
22665
|
+
required: true,
|
|
22666
|
+
content: {
|
|
22667
|
+
"application/json": {
|
|
22668
|
+
schema: {
|
|
22669
|
+
type: "object",
|
|
22670
|
+
properties: {
|
|
22671
|
+
job_id: {
|
|
22672
|
+
type: "string",
|
|
22673
|
+
description: "The job ID returned from browser_extract_site"
|
|
22674
|
+
}
|
|
22675
|
+
},
|
|
22676
|
+
required: [
|
|
22677
|
+
"job_id"
|
|
22678
|
+
]
|
|
22679
|
+
}
|
|
22680
|
+
}
|
|
22681
|
+
}
|
|
22682
|
+
},
|
|
22683
|
+
responses: {
|
|
22684
|
+
"200": {
|
|
22685
|
+
description: "Successful response"
|
|
22686
|
+
},
|
|
22687
|
+
"400": {
|
|
22688
|
+
description: "Bad request"
|
|
22689
|
+
},
|
|
22690
|
+
"401": {
|
|
22691
|
+
description: "Unauthorized"
|
|
22692
|
+
}
|
|
22693
|
+
}
|
|
22694
|
+
}
|
|
22695
|
+
},
|
|
22696
|
+
"/api/execute/browser_extract_site_cancel": {
|
|
22697
|
+
post: {
|
|
22698
|
+
summary: "Browser Extract Site Cancel",
|
|
22699
|
+
description: "Cancel a running site extraction job. Returns success status.",
|
|
22700
|
+
tags: [
|
|
22701
|
+
"General"
|
|
22702
|
+
],
|
|
22703
|
+
requestBody: {
|
|
22704
|
+
required: true,
|
|
22705
|
+
content: {
|
|
22706
|
+
"application/json": {
|
|
22707
|
+
schema: {
|
|
22708
|
+
type: "object",
|
|
22709
|
+
properties: {
|
|
22710
|
+
job_id: {
|
|
22711
|
+
type: "string",
|
|
22712
|
+
description: "The job ID to cancel"
|
|
22713
|
+
}
|
|
22714
|
+
},
|
|
22715
|
+
required: [
|
|
22716
|
+
"job_id"
|
|
22717
|
+
]
|
|
22718
|
+
}
|
|
22719
|
+
}
|
|
22720
|
+
}
|
|
22721
|
+
},
|
|
22722
|
+
responses: {
|
|
22723
|
+
"200": {
|
|
22724
|
+
description: "Successful response"
|
|
22725
|
+
},
|
|
22726
|
+
"400": {
|
|
22727
|
+
description: "Bad request"
|
|
22728
|
+
},
|
|
22729
|
+
"401": {
|
|
22730
|
+
description: "Unauthorized"
|
|
22731
|
+
}
|
|
22732
|
+
}
|
|
22733
|
+
}
|
|
22734
|
+
},
|
|
22532
22735
|
"/api/execute/browser_extract_json": {
|
|
22533
22736
|
post: {
|
|
22534
22737
|
summary: "Browser Extract Json",
|
|
@@ -24728,13 +24931,14 @@ var openapi_default = {
|
|
|
24728
24931
|
},
|
|
24729
24932
|
type: {
|
|
24730
24933
|
type: "string",
|
|
24731
|
-
description: "Proxy protocol type: 'http' (HTTP proxy), 'https' (HTTPS proxy), 'socks4' (SOCKS4), 'socks5' (SOCKS5 with local DNS), 'socks5h' (SOCKS5 with remote DNS - most private)",
|
|
24934
|
+
description: "Proxy protocol type: 'http' (HTTP proxy), 'https' (HTTPS proxy), 'socks4' (SOCKS4), 'socks5' (SOCKS5 with local DNS), 'socks5h' (SOCKS5 with remote DNS - most private), 'gae' (private app proxy)",
|
|
24732
24935
|
enum: [
|
|
24733
24936
|
"http",
|
|
24734
24937
|
"https",
|
|
24735
24938
|
"socks4",
|
|
24736
24939
|
"socks5",
|
|
24737
|
-
"socks5h"
|
|
24940
|
+
"socks5h",
|
|
24941
|
+
"gae"
|
|
24738
24942
|
]
|
|
24739
24943
|
},
|
|
24740
24944
|
host: {
|
|
@@ -26912,8 +27116,18 @@ async function callBrowserAPI(toolName, args) {
|
|
|
26912
27116
|
};
|
|
26913
27117
|
}
|
|
26914
27118
|
}
|
|
27119
|
+
function isContextLimitError(result) {
|
|
27120
|
+
if (typeof result === "object" && result !== null) {
|
|
27121
|
+
const obj = result;
|
|
27122
|
+
return obj.error === true && obj.code === "CONTEXT_LIMIT_EXCEEDED";
|
|
27123
|
+
}
|
|
27124
|
+
return false;
|
|
27125
|
+
}
|
|
26915
27126
|
function trackContext(toolName, args, result) {
|
|
26916
27127
|
if (toolName === "browser_create_context" && typeof result === "object" && result !== null) {
|
|
27128
|
+
if (isContextLimitError(result)) {
|
|
27129
|
+
return;
|
|
27130
|
+
}
|
|
26917
27131
|
const contextId = result.context_id;
|
|
26918
27132
|
if (contextId) {
|
|
26919
27133
|
activeContexts.set(contextId, { createdAt: /* @__PURE__ */ new Date() });
|
|
@@ -26943,6 +27157,33 @@ function formatResponse(toolName, result) {
|
|
|
26943
27157
|
};
|
|
26944
27158
|
}
|
|
26945
27159
|
const data = result.data;
|
|
27160
|
+
if (typeof data === "object" && data !== null) {
|
|
27161
|
+
const dataObj = data;
|
|
27162
|
+
if (dataObj.success === true && typeof dataObj.result === "object" && dataObj.result !== null) {
|
|
27163
|
+
const innerResult = dataObj.result;
|
|
27164
|
+
if (innerResult.error === true && innerResult.code === "CONTEXT_LIMIT_EXCEEDED") {
|
|
27165
|
+
const details = innerResult.details || {};
|
|
27166
|
+
const errorMsg = innerResult.message || `Developer license context limit reached (${details.max_contexts || "unknown"} contexts). Close existing contexts or upgrade license.`;
|
|
27167
|
+
return {
|
|
27168
|
+
content: [
|
|
27169
|
+
{
|
|
27170
|
+
type: "text",
|
|
27171
|
+
text: JSON.stringify({
|
|
27172
|
+
success: false,
|
|
27173
|
+
error: errorMsg,
|
|
27174
|
+
code: "CONTEXT_LIMIT_EXCEEDED",
|
|
27175
|
+
details: {
|
|
27176
|
+
current_contexts: details.current_contexts,
|
|
27177
|
+
max_contexts: details.max_contexts,
|
|
27178
|
+
license_type: details.license_type || "developer"
|
|
27179
|
+
}
|
|
27180
|
+
}, null, 2)
|
|
27181
|
+
}
|
|
27182
|
+
]
|
|
27183
|
+
};
|
|
27184
|
+
}
|
|
27185
|
+
}
|
|
27186
|
+
}
|
|
26946
27187
|
const isImageTool = toolName === "browser_screenshot" || toolName === "browser_get_live_frame";
|
|
26947
27188
|
if (isImageTool) {
|
|
26948
27189
|
let base64Data = null;
|