@anvailabs/agentbrowser-mcp 1.8.17 → 1.8.18
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/bin.js +41 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -7684,12 +7684,31 @@ var SessionsClient = class {
|
|
|
7684
7684
|
body: request
|
|
7685
7685
|
});
|
|
7686
7686
|
}
|
|
7687
|
+
/**
|
|
7688
|
+
* Ask the service to navigate to a URL and capture a download as an
|
|
7689
|
+
* artifact. The session must have been created with downloads allowed
|
|
7690
|
+
* (DOWNLOAD_BLOCKED otherwise).
|
|
7691
|
+
*/
|
|
7692
|
+
async download(sessionId, pageId, request) {
|
|
7693
|
+
return this.http.requestJson(`/v1/sessions/${sessionId}/pages/${pageId}/download`, {
|
|
7694
|
+
method: "POST",
|
|
7695
|
+
body: request
|
|
7696
|
+
});
|
|
7697
|
+
}
|
|
7698
|
+
/**
|
|
7699
|
+
* Collect an intercepted download by filename (as reported by the page's
|
|
7700
|
+
* download events) and return its artifact reference.
|
|
7701
|
+
*/
|
|
7702
|
+
async collectDownload(sessionId, pageId, filename) {
|
|
7703
|
+
return this.http.requestJson(`/v1/sessions/${sessionId}/pages/${pageId}/downloads/${encodeURIComponent(filename)}`, { method: "POST" });
|
|
7704
|
+
}
|
|
7687
7705
|
};
|
|
7688
7706
|
var AgentBrowserClient = class {
|
|
7689
7707
|
baseUrl;
|
|
7690
7708
|
timeout;
|
|
7691
7709
|
sessions;
|
|
7692
7710
|
customHeaders;
|
|
7711
|
+
http;
|
|
7693
7712
|
constructor(options = {}) {
|
|
7694
7713
|
this.baseUrl = options.baseUrl || "http://localhost:5709";
|
|
7695
7714
|
this.timeout = options.timeout || 3e4;
|
|
@@ -7697,7 +7716,28 @@ var AgentBrowserClient = class {
|
|
|
7697
7716
|
...options.apiKey !== void 0 ? { Authorization: `Bearer ${options.apiKey}` } : {},
|
|
7698
7717
|
...options.headers
|
|
7699
7718
|
};
|
|
7700
|
-
this.
|
|
7719
|
+
this.http = new HttpClient(this.baseUrl, this.timeout, this.customHeaders);
|
|
7720
|
+
this.sessions = new SessionsClient(this.http);
|
|
7721
|
+
}
|
|
7722
|
+
/**
|
|
7723
|
+
* Service health summary (GET /health). Never requires authentication.
|
|
7724
|
+
*/
|
|
7725
|
+
async health() {
|
|
7726
|
+
return this.http.requestJson("/health");
|
|
7727
|
+
}
|
|
7728
|
+
/**
|
|
7729
|
+
* Liveness probe (GET /health/live).
|
|
7730
|
+
*/
|
|
7731
|
+
async healthLive() {
|
|
7732
|
+
return this.http.requestJson("/health/live");
|
|
7733
|
+
}
|
|
7734
|
+
/**
|
|
7735
|
+
* Readiness probe (GET /health/ready). With a bearer key the response
|
|
7736
|
+
* includes engine and capability detail; without one it is a
|
|
7737
|
+
* disclosure-free readiness statement.
|
|
7738
|
+
*/
|
|
7739
|
+
async healthReady() {
|
|
7740
|
+
return this.http.requestJson("/health/ready");
|
|
7701
7741
|
}
|
|
7702
7742
|
/**
|
|
7703
7743
|
* Set default headers for all requests
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anvailabs/agentbrowser-mcp",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server exposing AgentBrowser as high-level, safe, composable tools (talks to an AgentBrowser service via AGENTBROWSER_BASE_URL)",
|
|
6
6
|
"main": "dist/index.js",
|