@mcp-use/cli 3.2.0-canary.6 → 3.2.0-canary.7
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/commands/screenshot.d.ts +7 -0
- package/dist/commands/screenshot.d.ts.map +1 -1
- package/dist/index.cjs +89 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +89 -36
- package/dist/index.js.map +1 -1
- package/dist/utils/cdp-screenshot.d.ts +21 -10
- package/dist/utils/cdp-screenshot.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -6,7 +6,14 @@ export interface CaptureScreenshotOptions {
|
|
|
6
6
|
waitForSelector: string;
|
|
7
7
|
timeoutMs: number;
|
|
8
8
|
outputPath: string;
|
|
9
|
-
|
|
9
|
+
/** Path to local Chrome. Required unless `cdpUrl` is supplied. */
|
|
10
|
+
chromePath?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Pre-existing CDP WebSocket URL (ws:// or wss://). When set, no local
|
|
13
|
+
* Chrome is spawned — we connect directly to this endpoint. Useful for
|
|
14
|
+
* driving a hosted Chromium (e.g. Notte) in sandboxed environments.
|
|
15
|
+
*/
|
|
16
|
+
cdpUrl?: string;
|
|
10
17
|
/** Extra wait after the readiness selector matches, to let animations settle. */
|
|
11
18
|
delayMs?: number;
|
|
12
19
|
/**
|
|
@@ -18,16 +25,20 @@ export interface CaptureScreenshotOptions {
|
|
|
18
25
|
bundle?: unknown;
|
|
19
26
|
}
|
|
20
27
|
/**
|
|
21
|
-
* Headlessly render `url`
|
|
28
|
+
* Headlessly render `url` and write a PNG to disk.
|
|
29
|
+
*
|
|
30
|
+
* Two modes, selected by whether `opts.cdpUrl` is provided:
|
|
31
|
+
* - **Remote** (`cdpUrl` set): connect directly to an existing CDP
|
|
32
|
+
* WebSocket. No Chrome process is spawned.
|
|
33
|
+
* - **Local** (`chromePath` set): spawn Chrome with
|
|
34
|
+
* `--headless=new --remote-debugging-port=0` + throwaway user-data-dir
|
|
35
|
+
* and parse the WebSocket URL from stderr.
|
|
22
36
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* 4. Apply viewport + prefers-color-scheme via Emulation.* commands.
|
|
29
|
-
* 5. Page.navigate, then poll Runtime.evaluate for `waitForSelector`.
|
|
30
|
-
* 6. Page.captureScreenshot, write PNG, clean up.
|
|
37
|
+
* After the WebSocket is connected, the flow is identical:
|
|
38
|
+
* - Open a tab via Target.createTarget, attach in flat mode.
|
|
39
|
+
* - Apply viewport + prefers-color-scheme via Emulation.* commands.
|
|
40
|
+
* - Page.navigate, then poll Runtime.evaluate for `waitForSelector`.
|
|
41
|
+
* - Page.captureScreenshot, write PNG, clean up.
|
|
31
42
|
*/
|
|
32
43
|
export declare function captureScreenshot(opts: CaptureScreenshotOptions): Promise<void>;
|
|
33
44
|
//# sourceMappingURL=cdp-screenshot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp-screenshot.d.ts","sourceRoot":"","sources":["../../src/utils/cdp-screenshot.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"cdp-screenshot.d.ts","sourceRoot":"","sources":["../../src/utils/cdp-screenshot.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA4HD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,IAAI,CAAC,CA2Of"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-use/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.2.0-canary.
|
|
4
|
+
"version": "3.2.0-canary.7",
|
|
5
5
|
"description": "The mcp-use CLI is a tool for building and deploying MCP servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.",
|
|
6
6
|
"author": "mcp-use, Inc.",
|
|
7
7
|
"license": "MIT",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"vite-plugin-singlefile": "^2.3.2",
|
|
56
56
|
"ws": "^8.19.0",
|
|
57
57
|
"zod": "4.3.5",
|
|
58
|
-
"mcp-use": "1.28.0-canary.
|
|
59
|
-
"@mcp-use/inspector": "6.0.0-canary.
|
|
58
|
+
"mcp-use": "1.28.0-canary.7",
|
|
59
|
+
"@mcp-use/inspector": "6.0.0-canary.7"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/ws": "^8.18.1",
|