feat(browser): 增加托管 Browser MCP 运行时与内置会话浏览器 - #549
Open
lj64212585 wants to merge 9 commits into
Open
Conversation
新增 Rust 持有的 child WebView2 runtime、私有 bridge、安全策略与生命周期管理。 接入 Browser sidecar 原生 backend、AuxPanel native surface、External 回退及完整回归测试。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 为 Windows Desktop 增加托管 Browser MCP 运行时与会话内置浏览器,并通过现有 ACP/MCP 汇合点接入 Agent,不替换现有 Agent、Session、Delegation 或用户 MCP 配置模型。
原生模式使用 Rust 管理的 child WebView2 作为用户可见页面,并通过私有认证 bridge 让 Browser sidecar 操作同一 controller;同时保留 External Chromium/CDP 作为显式回退方案。
主要改动
@codeg/browser-mcpsidecar,提供 20 个严格校验的 runtime、tab、page、action 和 download 工具。BrowserRuntimeManager,统一管理 sidecar、每次启动生成的 loopback bearer、managed profile、下载目录、健康状态、恢复和退出清理。NativeBrowserRuntime与 Windows WebView2 controller registry,按(connection_id, tab_id, generation)管理页面所有权、生命周期和 stale-session 校验。CODEG_DATA_DIR的并发环境变量竞争。安全与兼容性
embedded设置值会迁移到原生 WebView2 backend,不清除已有 profile 或 download 数据;原生启动失败时可显式切换到 External。