feat(browser): 增加托管 Browser MCP 运行时与内置会话浏览器 - #535
Closed
lj64212585 wants to merge 2 commits into
Closed
Conversation
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 在不替换 Codeg 现有 Agent、ACP、Session、MCP 设置链或 Delegation 系统的前提下,
增加以 Windows 为首要运行平台的托管 Browser MCP 运行时。它将固定版本的 Browser sidecar
打包进客户端,通过现有 MCP 汇合点注入兼容的 ACP 会话,并为每个会话增加内置 Browser
界面,使用户与 Agent 操作同一个托管 Chromium target。
主要改动
@codeg/browser-mcpsidecar,提供 20 个严格校验的工具,覆盖运行时、标签页、页面检查、语义操作、截图和受控下载。
BrowserRuntimeManager,作为 sidecar、托管 Chromium 进程树、私有 loopback endpoint、每次启动生成的 bearer、managed profile、下载目录、健康状态和恢复流程的唯一所有者。
逻辑 session 创建时冻结的启用快照和 runtime Ready 状态全部满足时,才向 Agent 注入 Browser。
任一门禁失败都保持 fail closed,不会阻断 Agent session,也不会提供失效的 MCP endpoint。
标签;隐藏或切换只停止帧附着,显式关闭才释放该 session 的 targets。
pointer、wheel 和 key 输入映射。
embedded/external backend 切换、health/recover 操作和保存失败回滚。
第三方声明、安全测试和 Windows Chrome smoke 覆盖。
安全与隐私
http:和https:,并按 SSRF 策略校验 URL、DNS 结果、redirect 和被拦截的子资源请求。
持久设置、renderer 状态或普通日志。
也不静默复用其 cookie。
evaluate、上传、系统文件对话框或任意文件保存工具。
范围
这不代表提供跨平台 Browser 支持。
codeg-browser-sidecar与现有 Delegation companioncodeg-mcp保持独立。