mcp-scraper 0.3.7 → 0.3.9
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 +3 -3
- package/dist/bin/api-server.cjs +9 -4
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +1 -1
- package/dist/bin/browser-agent-stdio-server.cjs +9 -12
- package/dist/bin/browser-agent-stdio-server.cjs.map +1 -1
- package/dist/bin/browser-agent-stdio-server.js +2 -2
- package/dist/bin/mcp-scraper-cli.cjs +3 -3
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +3 -3
- package/dist/bin/mcp-scraper-cli.js.map +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs +10 -13
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.js +3 -3
- package/dist/bin/mcp-scraper-install.cjs +1 -1
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +1 -1
- package/dist/bin/mcp-stdio-server.cjs +2 -2
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/chunk-7VNTN4Q7.js +7 -0
- package/dist/chunk-7VNTN4Q7.js.map +1 -0
- package/dist/{chunk-IWNLHCKA.js → chunk-BRUVQRJK.js} +10 -13
- package/dist/chunk-BRUVQRJK.js.map +1 -0
- package/dist/{chunk-2O7RAK6E.js → chunk-KDKQ5Y7V.js} +3 -3
- package/dist/{chunk-2O7RAK6E.js.map → chunk-KDKQ5Y7V.js.map} +1 -1
- package/dist/{server-HRVD52CX.js → server-ZSHE4R5Z.js} +10 -5
- package/dist/{server-HRVD52CX.js.map → server-ZSHE4R5Z.js.map} +1 -1
- package/docs/mcp-tool-craft-lint.generated.md +1 -1
- package/docs/mcp-tool-manifest.generated.json +10 -10
- package/package.json +1 -1
- package/dist/chunk-2NEVRPK3.js +0 -7
- package/dist/chunk-2NEVRPK3.js.map +0 -1
- package/dist/chunk-IWNLHCKA.js.map +0 -1
package/dist/bin/api-server.js
CHANGED
|
@@ -17,7 +17,7 @@ loadDotEnv();
|
|
|
17
17
|
async function main() {
|
|
18
18
|
const [{ serve }, { app }, { startWorker }, { migrate }] = await Promise.all([
|
|
19
19
|
import("@hono/node-server"),
|
|
20
|
-
import("../server-
|
|
20
|
+
import("../server-ZSHE4R5Z.js"),
|
|
21
21
|
import("../worker-56IXWOQU.js"),
|
|
22
22
|
import("../db-BE4JVB3V.js")
|
|
23
23
|
]);
|
|
@@ -27,7 +27,7 @@ function browserServiceProfileSaveChanges() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// src/version.ts
|
|
30
|
-
var PACKAGE_VERSION = "0.3.
|
|
30
|
+
var PACKAGE_VERSION = "0.3.9";
|
|
31
31
|
|
|
32
32
|
// src/mcp/browser-agent-tool-schemas.ts
|
|
33
33
|
var import_zod = require("zod");
|
|
@@ -47,7 +47,7 @@ var BrowserOpenInputSchema = {
|
|
|
47
47
|
label: import_zod.z.string().optional().describe("Optional human label for this session, shown in the watch console."),
|
|
48
48
|
url: import_zod.z.string().url().optional().describe("Optional URL to navigate to immediately after opening."),
|
|
49
49
|
profile: import_zod.z.string().optional().describe("Optional saved hosted profile name to load a logged-in session for a site."),
|
|
50
|
-
save_profile_changes: import_zod.z.boolean().optional().describe("Persist cookies and
|
|
50
|
+
save_profile_changes: import_zod.z.boolean().optional().describe("Persist cookies and browser storage back to the named profile when the session is closed. Use this for profile setup or intentional auth refreshes; avoid parallel sessions writing to the same profile."),
|
|
51
51
|
timeout_seconds: import_zod.z.number().int().min(60).max(259200).optional().describe("How long the direct no-proxy browser session may live before auto-termination. Defaults to 600. The browser idles into a zero-cost standby between actions, so a longer timeout is cheap.")
|
|
52
52
|
};
|
|
53
53
|
var BrowserProfileOnboardInputSchema = {
|
|
@@ -755,12 +755,11 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
755
755
|
profile,
|
|
756
756
|
save_profile_changes: true,
|
|
757
757
|
disable_default_proxy: true,
|
|
758
|
-
timeout_seconds: input.timeout_seconds
|
|
758
|
+
timeout_seconds: input.timeout_seconds,
|
|
759
|
+
url: setupUrl
|
|
759
760
|
});
|
|
760
761
|
if (!open.ok) return errorResult("browser_profile_onboard", open.data);
|
|
761
762
|
const session = open.data;
|
|
762
|
-
const goto = await req("POST", `/agent/sessions/${session.session_id}/goto`, { url: setupUrl });
|
|
763
|
-
if (!goto.ok) return errorResult("browser_profile_onboard", goto.data, session.session_id);
|
|
764
763
|
return structuredResult({
|
|
765
764
|
ok: true,
|
|
766
765
|
tool: "browser_profile_onboard",
|
|
@@ -797,13 +796,11 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
797
796
|
...profile ? { profile } : {},
|
|
798
797
|
...profile && typeof saveProfileChanges === "boolean" ? { save_profile_changes: saveProfileChanges } : {},
|
|
799
798
|
disable_default_proxy: true,
|
|
800
|
-
timeout_seconds: input.timeout_seconds
|
|
799
|
+
timeout_seconds: input.timeout_seconds,
|
|
800
|
+
...input.url ? { url: input.url } : {}
|
|
801
801
|
});
|
|
802
802
|
if (!open.ok) return errorResult("browser_open", open.data);
|
|
803
803
|
const session = open.data;
|
|
804
|
-
if (input.url) {
|
|
805
|
-
await req("POST", `/agent/sessions/${session.session_id}/goto`, { url: input.url });
|
|
806
|
-
}
|
|
807
804
|
return structuredResult({
|
|
808
805
|
ok: true,
|
|
809
806
|
tool: "browser_open",
|
|
@@ -1004,7 +1001,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
1004
1001
|
"browser_replay_stop",
|
|
1005
1002
|
{
|
|
1006
1003
|
title: "Stop Recording",
|
|
1007
|
-
description: "Stop a replay recording and expose the final view_url and download_url. Use browser_replay_download to save the MP4
|
|
1004
|
+
description: "Stop a replay recording and expose the final view_url and download_url. Use browser_replay_download to save the MP4 to the configured output directory.",
|
|
1008
1005
|
inputSchema: BrowserReplayStopInputSchema,
|
|
1009
1006
|
outputSchema: BrowserReplayStopOutputSchema,
|
|
1010
1007
|
annotations: annotations("Stop Recording")
|
|
@@ -1049,7 +1046,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
1049
1046
|
"browser_replay_download",
|
|
1050
1047
|
{
|
|
1051
1048
|
title: "Download Replay MP4",
|
|
1052
|
-
description: "Download a replay recording through MCP Scraper and save the MP4
|
|
1049
|
+
description: "Download a replay recording through MCP Scraper and save the MP4 under MCP_SCRAPER_OUTPUT_DIR/browser-replays. Use after browser_replay_stop or browser_list_replays.",
|
|
1053
1050
|
inputSchema: BrowserReplayDownloadInputSchema,
|
|
1054
1051
|
outputSchema: BrowserReplayDownloadOutputSchema,
|
|
1055
1052
|
annotations: annotations("Download Replay MP4")
|
|
@@ -1123,7 +1120,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
1123
1120
|
"browser_replay_annotate",
|
|
1124
1121
|
{
|
|
1125
1122
|
title: "Annotate Replay MP4",
|
|
1126
|
-
description: "Download a browser replay MP4, render visual annotations over it, and save a new annotated MP4
|
|
1123
|
+
description: "Download a browser replay MP4, render visual annotations over it, and save a new annotated MP4 under MCP_SCRAPER_OUTPUT_DIR/browser-replays. Use this after browser_replay_stop when the user wants proof videos with circles, boxes, arrows, underlines, or labels. For accurate timing and placement, prefer annotations returned by browser_replay_mark while the replay is recording; otherwise use exact left/top/width/height bounds from browser_locate. If the replay video size differs from the screenshot coordinate space, pass source_width and source_height.",
|
|
1127
1124
|
inputSchema: BrowserReplayAnnotateInputSchema,
|
|
1128
1125
|
outputSchema: BrowserReplayAnnotateOutputSchema,
|
|
1129
1126
|
annotations: annotations("Annotate Replay MP4")
|