@deepseek-ai/dsh-experimental-browser-use-chrome-devtools-mcp 0.1.6-alpha.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/experimental/browser-use-chrome-devtools-mcp/README.md
5
+ README.md: b4ef51079d79429b570ec222f283b3c20112546b
6
+ README.zh.md: 5ce248b9759e4fb942629fc10217bb055f1a0e65
package/README.md ADDED
@@ -0,0 +1,116 @@
1
+ ---
2
+ description: "Operate Chromium through Chrome DevTools MCP with separate browser state for each live Session."
3
+ kind: "package-reference"
4
+ ---
5
+
6
+ # @deepseek-ai/dsh-experimental-browser-use-chrome-devtools-mcp
7
+
8
+ English | [中文](README.zh.md)
9
+
10
+ ## Summary
11
+
12
+ Use Chrome DevTools MCP to inspect pages and operate Chromium through its upstream tools. The provider initializes a Session's MCP connection before creation or resume completes and retains it across turns. Launch a separate browser or attach one Session to an existing browser with its current tabs and login state. This published experimental package activates only when explicitly mounted.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Use this package](#use-this-package)
17
+ - [Understand the implementation](#understand-the-implementation)
18
+ - [Further Exploration](#further-exploration)
19
+ - [Model Experience](#model-experience)
20
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
21
+ - [Dev Note](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## Use this package
27
+
28
+ Mount both entries before creating or resuming a Session, in a profile composition that supplies Agents, tools, and system prompts. Loading or reloading this provider does not adopt Sessions that are already active. Browser installation follows the upstream runtime; select an existing Chromium installation with `executablePath`.
29
+
30
+ ```yaml
31
+ - name: '@deepseek-ai/dsh-browser-use'
32
+ - name: '@deepseek-ai/dsh-experimental-browser-use-chrome-devtools-mcp'
33
+ config:
34
+ mode: launch
35
+ headless: true
36
+ ```
37
+
38
+ Use `mode: attach` and set `endpoint` to an HTTP(S) debugging URL or WS(S) browser endpoint to operate an existing browser. The new live Session claims the attachment during initialization and retains it until unloading. If the attachment is busy, that activation continues without this browser and does not retry on later turns. After release, a newly created or resumed activation can acquire it. Direct calls from another Session fail. Cleanup disconnects and leaves the external browser and its pages running.
39
+
40
+ | Field | Default | Meaning |
41
+ |---|---|---|
42
+ | `mode` | required | `launch` or `attach`, fixed for this provider activation |
43
+ | `headless` | `true` | Launch without a visible window |
44
+ | `executablePath` | upstream discovery | Chromium executable for launch |
45
+ | `endpoint` | required for attach | Existing browser debugging endpoint |
46
+ | `toolCallTimeoutMs` | MCP client default | Per-call timeout in milliseconds |
47
+
48
+ The [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-experimental-browser-use-chrome-devtools-mcp) lists accepted fields. The profile or preset selects the browser mode.
49
+
50
+ When configuring the system prompt's `toolOrder` for the whole process, leave browser tools under `<unlisted-tools>`. Explicitly listing browser tool names can make prompt assembly fail for Sessions without a browser connection.
51
+
52
+ -----
53
+
54
+ <a id="understand-the-implementation"></a>
55
+ ## Understand the implementation
56
+
57
+ <details>
58
+ <summary>Implementation internals — click to expand</summary>
59
+
60
+ The provider resolves its pinned npm entry and starts it under the current Node executable. A temporary protocol probe may precede the serving process. The [shared runtime](../browser-use-runtime/README.md) owns awaited Agent initialization, per-Session serialization, and cleanup; the [MCP client](../../mcp/mcp-client/README.md) owns transport, discovery, and result projection. No runtime invariant companion is published because the provider maintains no independent connection observation.
61
+
62
+ Browser state survives turns while its live Session remains attached. Disposal waits for server shutdown before releasing resources. Resume after reload starts fresh browser runtime state; stored conversation history does not restore cookies or pages.
63
+
64
+ </details>
65
+
66
+ -----
67
+
68
+ <a id="further-exploration"></a>
69
+ ## Further Exploration
70
+
71
+ - [Browser use](../../../docs/subsystems/browser-use.md) — provider selection and Session ownership.
72
+ - [Browser-use service](../../browser-use/browser-use/README.md) — exclusive provider registration.
73
+ - [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp) — upstream installation and browser behavior.
74
+
75
+ -----
76
+
77
+ <a id="model-experience"></a>
78
+ ## Model Experience
79
+
80
+ ### Browser tools and screenshots
81
+
82
+ #### What the model sees
83
+
84
+ Tools retain upstream descriptions and JSON schemas under `mcp__chrome-devtools-mcp__<tool>` names. Text and screenshots use the normal tool-result pipeline and Session log. Screenshots require an attachment store and an image-capable model route; other routes receive the MCP image diagnostic. The MCP client also exposes resource helpers and attributed server instructions. Browser instructions are shown only after this Session owns a connection; targeted resource requests enforce the same ownership.
85
+
86
+ #### Token effect
87
+
88
+ The catalog, resource helpers, and server instructions add tool definitions and prompt text. Calls add arguments, text, and admitted images to Session history. Inline image bytes stay outside model-visible history.
89
+
90
+ #### KV Cache effect
91
+
92
+ An unchanged catalog preserves its tool-definition prefix. Results append to history; provider or catalog changes can reduce prefix reuse.
93
+
94
+ ## Known Limitations and Deferred Work
95
+
96
+ <a id="known-limitations-and-deferred-work"></a>
97
+
98
+ The integration retains the pinned server's browser and tool restrictions.
99
+
100
+ - Chromium only; Firefox and WebKit are not selectable.
101
+ - Startup failure or cancellation rejects Session creation or resume and triggers client cleanup. A disconnected client is not retried; after fixing the cause, create a new Session or unload and resume the existing one.
102
+ - Attachment exclusivity is local to this provider instance. Other processes and browser users can still modify the same pages.
103
+ - The shared resource-server inventory can show inherited server names; it does not grant access to another Session's browser.
104
+ - Cancellation does not undo navigation, clicks, or other actions already delivered to the browser.
105
+ - Tool schemas follow the pinned experimental dependency and carry no DSH stability promise.
106
+ - Usage statistics are disabled. Other features, including performance tools, retain their upstream behavior.
107
+
108
+ <a id="dev-note"></a>
109
+ ### Dev Note
110
+
111
+ <details>
112
+ <summary>Working context for maintainers — click to expand</summary>
113
+
114
+ None.
115
+
116
+ </details>
package/README.zh.md ADDED
@@ -0,0 +1,116 @@
1
+ ---
2
+ description: "通过 Chrome DevTools MCP 操作 Chromium,为每个活动 Session 保持独立浏览器状态。"
3
+ kind: "package-reference"
4
+ ---
5
+
6
+ # @deepseek-ai/dsh-experimental-browser-use-chrome-devtools-mcp
7
+
8
+ [English](README.md) | 中文
9
+
10
+ ## 概述
11
+
12
+ 通过 Chrome DevTools MCP 的上游工具检查网页并操作 Chromium。提供方在 Session 创建或恢复完成前初始化其 MCP 连接,并跨轮次保留连接。可以启动独立浏览器,也可以让一个 Session 接入已有浏览器,使用其现有标签页和登录状态。本包以实验状态发布,仅在显式挂载后启用。
13
+
14
+ ## 目录
15
+
16
+ - [使用此包](#use-this-package)
17
+ - [理解实现](#understand-the-implementation)
18
+ - [进一步探索](#further-exploration)
19
+ - [模型体验](#model-experience)
20
+ - [已知限制与待办事项](#known-limitations-and-deferred-work)
21
+ - [开发备注](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## 使用此包
27
+
28
+ 在创建或恢复 Session 前,将以下条目挂载到已提供 Agent、工具和系统提示词的 profile 组合中。加载或重新加载此提供方不会接管已经活动的 Session。浏览器安装遵循上游运行时;使用 `executablePath` 选择已有 Chromium 安装。
29
+
30
+ ```yaml
31
+ - name: '@deepseek-ai/dsh-browser-use'
32
+ - name: '@deepseek-ai/dsh-experimental-browser-use-chrome-devtools-mcp'
33
+ config:
34
+ mode: launch
35
+ headless: true
36
+ ```
37
+
38
+ 使用 `mode: attach`,并在 `endpoint` 中设置 HTTP(S) 调试 URL 或 WS(S) 浏览器端点,即可操作已有浏览器。新的活动 Session 在初始化时占用附加连接,并持续保留直到卸载。如果连接已被占用,本次激活不使用该浏览器,但继续运行,后续轮次不会重试。连接释放后,新创建或恢复的激活可以获取它。其他 Session 的直接调用会失败。清理只断开连接,保留外部浏览器及其页面。
39
+
40
+ | 字段 | 默认值 | 含义 |
41
+ |---|---|---|
42
+ | `mode` | 必填 | `launch` 或 `attach`,在本次提供方激活期间固定 |
43
+ | `headless` | `true` | 启动时不显示窗口 |
44
+ | `executablePath` | 上游发现 | 启动使用的 Chromium 可执行文件 |
45
+ | `endpoint` | attach 时必填 | 已有浏览器调试端点 |
46
+ | `toolCallTimeoutMs` | MCP 客户端默认值 | 单次调用超时,单位为毫秒 |
47
+
48
+ [配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-experimental-browser-use-chrome-devtools-mcp)列出接受的字段。浏览器模式由 profile 或 preset 选择。
49
+
50
+ 为整个进程配置系统提示词的 `toolOrder` 时,将浏览器工具留在 `<unlisted-tools>` 中。显式列出浏览器工具名称可能导致未获得浏览器连接的 Session 无法组装提示词。
51
+
52
+ -----
53
+
54
+ <a id="understand-the-implementation"></a>
55
+ ## 理解实现
56
+
57
+ <details>
58
+ <summary>实现细节 — 点击展开</summary>
59
+
60
+ 提供方解析固定版本 npm 包的可执行入口,并使用当前 Node 启动。服务进程之前可能运行临时协议探测进程。[共享运行时](../browser-use-runtime/README.zh.md)负责等待 Agent 初始化、逐 Session 串行执行与清理;[MCP 客户端](../../mcp/mcp-client/README.zh.md)负责传输、发现和结果投影。提供方不维护独立的连接观测,因此不发布运行时不变量配套入口。
61
+
62
+ 只要活动 Session 保持连接,浏览器状态就会跨轮次保留。销毁会等待服务器关闭,再释放资源。重新加载后恢复 Session 会创建新的浏览器运行状态;已保存的对话历史不会还原 Cookie 或页面。
63
+
64
+ </details>
65
+
66
+ -----
67
+
68
+ <a id="further-exploration"></a>
69
+ ## 进一步探索
70
+
71
+ - [浏览器使用](../../../docs/subsystems/browser-use.zh.md) — 提供方选择与 Session 所有权。
72
+ - [浏览器使用服务](../../browser-use/browser-use/README.zh.md) — 提供方独占注册。
73
+ - [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp) — 上游安装与浏览器行为。
74
+
75
+ -----
76
+
77
+ <a id="model-experience"></a>
78
+ ## 模型体验
79
+
80
+ ### 浏览器工具与截图
81
+
82
+ #### 模型可见内容
83
+
84
+ 工具以 `mcp__chrome-devtools-mcp__<tool>` 命名,保留上游描述和 JSON schema。文本与截图通过常规工具结果流程进入 Session 日志。截图需要附件存储及支持图片输入的模型路由;其他路由会收到 MCP 图片诊断。MCP 客户端还提供资源工具和注明服务器来源的指导。只有当前 Session 拥有连接后才显示浏览器指导;针对该服务器的资源请求执行相同的所有权检查。
85
+
86
+ #### Token 影响
87
+
88
+ 工具目录、资源工具和服务器指导会增加工具定义与提示词文本。调用会向 Session 历史加入参数、文本和获准输入的图片。内联图片字节不进入模型可见历史。
89
+
90
+ #### KV Cache 影响
91
+
92
+ 不变的工具目录会保留工具定义前缀。结果追加到历史;更换提供方或目录可能降低前缀复用率。
93
+
94
+ ## 已知限制与待办事项
95
+
96
+ <a id="known-limitations-and-deferred-work"></a>
97
+
98
+ 本集成保留固定版本服务器的浏览器与工具限制。
99
+
100
+ - 仅支持 Chromium;不可选择 Firefox 或 WebKit。
101
+ - 启动失败或取消会拒绝 Session 创建或恢复,并触发客户端清理。断开的客户端不会重试;修复原因后,创建新 Session,或卸载并恢复已有 Session。
102
+ - 连接独占仅在此提供方实例内有效。其他进程与浏览器用户仍可修改相同页面。
103
+ - 共享资源服务器目录可以显示继承的服务器名称,但不会授予对其他 Session 浏览器的访问权限。
104
+ - 取消不会撤销已发送给浏览器的导航、点击或其他操作。
105
+ - 工具 schema 跟随固定的实验依赖版本,不承诺 DSH 稳定性。
106
+ - 使用统计已禁用。包括性能工具在内的其他功能保留其上游行为。
107
+
108
+ <a id="dev-note"></a>
109
+ ### 开发备注
110
+
111
+ <details>
112
+ <summary>维护者工作上下文 — 点击展开</summary>
113
+
114
+ 无。
115
+
116
+ </details>
package/lib/index.js ADDED
@@ -0,0 +1,39 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import { BrowserMcpConfig, mountSessionMcp, validateBrowserMcpConfig } from "@deepseek-ai/dsh-experimental-browser-use-runtime/mcp";
3
+ //#region lib/types/index.js
4
+ /** Chromium inspection and automation through the pinned Chrome DevTools MCP server. @module */
5
+ /** Cordis identity for the Chrome DevTools MCP browser provider. */
6
+ const name = "experimental-browser-use-chrome-devtools-mcp";
7
+ /** Services required for scoped MCP startup and prompt readiness checks. */
8
+ const inject = [
9
+ "browserUse",
10
+ "agents",
11
+ "tools",
12
+ "systemPrompt"
13
+ ];
14
+ /** Validate the launch or attachment configuration before activation. */
15
+ const Config = BrowserMcpConfig;
16
+ /**
17
+ * Expose Chrome DevTools' upstream catalog through one MCP process per live Session.
18
+ * Attached browsers remain externally owned; the server disables usage statistics.
19
+ * @param ctx - provider context supplying browser use, Agents, and tools.
20
+ * @param config - validated browser choice and optional tool timeout.
21
+ */
22
+ function apply(ctx, config) {
23
+ validateBrowserMcpConfig(config);
24
+ const args = [fileURLToPath(import.meta.resolve("chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js")), "--no-usage-statistics"];
25
+ if (config.mode === "attach") args.push(/^wss?:/u.test(config.endpoint) ? "--ws-endpoint" : "--browser-url", config.endpoint);
26
+ else {
27
+ args.push("--isolated", `--headless=${String(config.headless)}`);
28
+ if (config.executablePath !== void 0) args.push("--executable-path", config.executablePath);
29
+ }
30
+ mountSessionMcp(ctx, {
31
+ name: "chrome-devtools-mcp",
32
+ exclusive: config.mode === "attach",
33
+ command: process.execPath,
34
+ args,
35
+ ...config.toolCallTimeoutMs === void 0 ? {} : { toolCallTimeoutMs: config.toolCallTimeoutMs }
36
+ });
37
+ }
38
+ //#endregion
39
+ export { Config, apply, inject, name };
@@ -0,0 +1,19 @@
1
+ /** Chromium inspection and automation through the pinned Chrome DevTools MCP server. @module */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ import { BrowserMcpConfig } from '@deepseek-ai/dsh-experimental-browser-use-runtime/mcp';
4
+ /** Cordis identity for the Chrome DevTools MCP browser provider. */
5
+ export declare const name = "experimental-browser-use-chrome-devtools-mcp";
6
+ /** Services required for scoped MCP startup and prompt readiness checks. */
7
+ export declare const inject: string[];
8
+ /** Fixed Chromium launch or existing-browser attachment settings. */
9
+ export type Config = BrowserMcpConfig;
10
+ /** Validate the launch or attachment configuration before activation. */
11
+ export declare const Config: typeof BrowserMcpConfig;
12
+ /**
13
+ * Expose Chrome DevTools' upstream catalog through one MCP process per live Session.
14
+ * Attached browsers remain externally owned; the server disables usage statistics.
15
+ * @param ctx - provider context supplying browser use, Agents, and tools.
16
+ * @param config - validated browser choice and optional tool timeout.
17
+ */
18
+ export declare function apply(ctx: Context, config: Config): void;
19
+ //# sourceMappingURL=index.d.ts.map
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@deepseek-ai/dsh-experimental-browser-use-chrome-devtools-mcp",
3
+ "description": "Experimental per-Session Chromium browser tools through chrome-devtools-mcp",
4
+ "version": "0.1.6-alpha.1",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/experimental/browser-use-chrome-devtools-mcp"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./src/*": "./src/*",
22
+ "./package.json": "./package.json"
23
+ },
24
+ "files": [
25
+ "lib/index.js",
26
+ "lib/types/**/*.d.ts"
27
+ ],
28
+ "license": "MIT",
29
+ "dependencies": {
30
+ "chrome-devtools-mcp": "1.9.0",
31
+ "@deepseek-ai/dsh-experimental-browser-use-runtime": "^0.1.6-alpha.1"
32
+ },
33
+ "peerDependencies": {
34
+ "@deepseek-ai/cordis": "^4.0.2",
35
+ "@deepseek-ai/dsh-browser-use": "^0.1.6-alpha.1",
36
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
37
+ "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.1",
38
+ "@deepseek-ai/dsh-tools": "^0.1.6-alpha.1"
39
+ },
40
+ "devDependencies": {
41
+ "@deepseek-ai/cordis": "^4.0.2",
42
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
43
+ "@deepseek-ai/dsh-browser-use": "^0.1.6-alpha.1",
44
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
45
+ "@deepseek-ai/cordis-plugin-include": "^1.0.7",
46
+ "@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.1",
47
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
48
+ "@deepseek-ai/dsh-tools": "^0.1.6-alpha.1",
49
+ "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.1",
50
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
51
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.1"
52
+ }
53
+ }