Files
GenericAgent/memory/web_setup_sop.md

25 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Web 工具链初始化执行 SOP
若 web_scan 和 web_execute_js 已测试可用,无需执行此 SOP。
仅供初始安装时code_run 可用但 web 工具尚未配置的场景。
## 目标
在仅具备系统级权限code_run建立 Web 交互能力web_scan / web_execute_js
## 前置:检测浏览器
## 安装 tmwd_cdp_bridge 扩展
扩展路径: `../assets/tmwd_cdp_bridge/`MV3 Chrome 扩展,含 CDP debugger + scripting + cookie 能力)
### 自动打开扩展管理页
`chrome://extensions` 无法通过命令行或 JS 打开,需用剪贴板+地址栏方案
### 安装步骤chrome扩展页难以自动化
1. 打开扩展管理页,开启「开发者模式」
2. 点击「加载已解压的扩展程序」,选择 `assets/tmwd_cdp_bridge/` 目录,或让用户直接拖入
3. 显示“错误”不用管一般只是因为还没连上GA
## 验证
⚠ web_scan 显示「没有可用标签页」不一定是扩展没装好,可能是浏览器未打开或只有 blank 页。
此时禁止乱试,先用 `start "" "https://www.baidu.com"` 打开一个正常页面,再 `web_scan` 确认。
若仍不可用,无法自动探测默认浏览器是哪个、插件装在了哪个浏览器、或是否已安装——此时请求用户协助。