mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
Lime Chrome Bridge 扩展
用于把 Chrome 页面能力接入 Lime 的浏览器桥接通道,供各业务 AI Agent 通过统一 browser_execute_action / MCP 浏览器工具调用。
功能
- Observer 通道自动连接:
/lime-chrome-observer/Lime_Key=... - 页面信息上报:标题、URL、Markdown
- 远程指令执行:
open_url/click/type/scroll/switch_tab/list_tabs/go_back等 - 弹窗配置:
serverUrl、bridgeKey、profileKey、监控开关、手动抓取
安装
- 打开 Chrome
chrome://extensions - 打开右上角「开发者模式」
- 点击「加载已解压的扩展程序」
- 选择目录:
extensions/lime-chrome
配置
点击扩展图标打开弹窗,配置:
Server URL:Lime 服务地址,例如ws://127.0.0.1:8999Bridge Key:Lime 服务 API Key(与后端Lime_Key一致)Profile Key:浏览器会话隔离键(建议与业务场景对应,如research_a)
点击「保存并重连」后,扩展会建立 observer WebSocket 连接。
验证
- 在 Lime 设置中查看
get_chrome_bridge_status,observer_count应大于 0 - 调用
browser_execute_action:
{
"profile_key": "default",
"action": "navigate",
"args": { "url": "https://example.com" }
}
- 再调用
browser_execute_action:
{
"action": "read_page"
}
如果返回 success=true 且 data.markdown 有内容,说明链路可用。
自动化联调脚本
仓库提供了桥接链路的端到端联调脚本(模拟 observer/control 双端):
npm run bridge:e2e -- --server ws://127.0.0.1:8787 --key proxy_cast --profile default
脚本会验证:
- observer/control 握手
- 双向心跳 ack
wait_for_page_info=true命令链路(command_result+page_info_update)- 普通命令链路(
command_result)
兼容说明
- 扩展只负责浏览器侧采集与动作执行。
- Agent 侧通过
aster_agent_cmd暴露的现役浏览器 MCP 工具访问。 - 若你同时使用独立 Chrome Profile(Tauri
open_chrome_profile_window),请在对应 Profile 内安装该扩展,并使用不同profileKey做隔离。