20 Commits

Author SHA1 Message Date
eze 33eef84a55 fix: stabilize CDP page readiness (v2.5.4) 2026-08-19 09:36:33 +08:00
eze 7af34af6a2 fix(v2.5.3): /new and /navigate accept URL via POST body
修复目标 URL 含 query 时参数被切分的 bug (issue #111)。

根因:旧版用 GET ?url=... 传目标 URL,proxy 用 URL.searchParams 解析
时,目标 URL 里未编码的 & 会被当成 proxy 自身的 query 分隔符,导致
token 等关键参数(如小红书的 xsec_token)被错误吃掉,页面返回"内容
不存在"。

修复:/new 和 /navigate 改为 POST,URL 通过 body 原样传入。body 是
不透明字节流(边界由 Content-Length 显式声明),不存在分隔符歧义,
URL 原样传输、零编码负担、对 Agent 调用最友好。

Breaking change:旧 GET ?url=... / ?target=&url=... 形式返回 400 +
迁移指引。迁移文档:references/migration-2.5.3.md

Closes #111
2026-05-16 13:22:26 +08:00
eze 918d9334ce feat: Microsoft Edge 支持 + 浏览器偏好持久化 (v2.5.2)
- CDP Proxy 新增 Edge 适配(及 Chromium / Chrome Canary 等 Chromium 系),
  通过 browser-discovery 模块统一发现 + 决策,不绑定 Chrome
- 新增 config.env 持久化默认浏览器偏好(WEB_ACCESS_BROWSER),
  多浏览器同开 toggle 时询问用户;支持 --browser 单次覆盖
- 偏好/指定的浏览器未启动时硬错并给出明确处理步骤,不擅自降级;
  proxy 首次成功连接后 pin 住浏览器 id,防止运行中漂移
- find-url 同步支持 Chrome / Edge,默认遍历所有已安装的,
  --browser 可限定单一来源

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 14:24:04 +08:00
eze 6688efb0fb chore: bump idle tab timeout to 15min, update README 2026-04-23 11:44:59 +08:00
Lewis Liu cbe8fa4afd feat: auto-cleanup idle tabs created by proxy
Agents often fail to call /close when they crash, run out of context,
or exit early, leaving orphan tabs in the user's browser.

Track proxy-created tabs in a managedTabs Map (never touches user tabs).
Any tab idle for 5 minutes (configurable via CDP_TAB_IDLE_TIMEOUT env)
is automatically closed. On process shutdown (SIGINT/SIGTERM), all
managed tabs are cleaned up.

Changes:
- Add managedTabs tracking in /new, remove on /close
- Centralized touchTab() refreshes activity on every API call with ?target=
- 60s sweep interval closes tabs exceeding idle timeout
- Graceful shutdown handler closes all managed tabs
- /health endpoint reports managedTabs count
2026-04-21 19:20:03 +08:00
eze 6532d4da49 polish: find-url 文案与 Windows 安装引导
- SKILL.md:触发信号具象化("本人访问过的页面" 与 "组织内部系统"
  分别配口语例子),让 agent 更精准识别何时使用
- find-url.mjs:sqlite3 缺失时提示 Windows 的 winget 安装命令

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 18:36:38 +08:00
eze 3ebaae3fb4 feat: 本地 Chrome 书签/历史检索 find-url.mjs (v2.5.0)
新增 scripts/find-url.mjs 原子工具,从本地 Chrome 书签/历史按关键词、
时间窗、访问频度检索 URL。解决公网搜索覆盖不到的目标定位
(组织内部系统、SSO 后台等)与历史回查需求。

CLI:
  find-url [关键词...] [--only bookmarks|history] [--limit N]
           [--since 1d|7h|YYYY-MM-DD] [--sort recent|visits]

- 关键词空格分词 AND,匹配 title + url
- 多 profile 自动聚合,仅跨 profile 才标注 @profile 减噪
- History SQLite 运行时锁,自动 copy 到 tmp 绕开
- 跨平台(macOS / Linux / Windows)
- 零依赖(仅 node 标准库 + sqlite3 命令)

SKILL.md 在「联网工具选择」末尾新增「补充:本地 Chrome 资源」小节。

场景感谢 @MVPGFC 在 #60 提出。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 18:32:03 +08:00
eze 9f5d5c1d85 fix: CLAUDE_SKILL_DIR 路径问题 + 站点经验列表合并到前置检查 (v2.4.3)
- bash 代码块改用 ${CLAUDE_SKILL_DIR} 字符串替换语法,修复 Windows Git Bash 路径转换错误和变量未设置问题 (#47 #46)
- 站点经验列表合并到 check-deps.mjs,启动检查后自动输出,移除不可靠的 ! 内联注入
- 删除多余的 list-sites.mjs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 09:36:24 +08:00
eze 59c0d2bdd1 feat: 通用风控提醒 + CDP 调试端口探测拦截 (v2.4.2)
- 风控提醒从小红书专属改为通用,移至前置检查统一展示
- 新增 Fetch.enable 拦截页面对 Chrome 调试端口的探测请求(反风控)
- 优化 SKILL.md 措辞:强调用户视角交互、GUI 作为探测手段

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 09:15:56 +08:00
Eze 656fbe2af7 Merge pull request #28 from HaiyiMei/fix/clear-port-cache-on-error
fix: clear cached chrome port on WebSocket connection error
2026-03-31 08:54:47 +08:00
eze d7615dc657 refactor: 脚本从 bash 迁移到 Node.js,支持跨平台
check-deps.sh 和 match-site.sh 重写为 .mjs,消除对 bash/curl/sed 等 Unix 工具的依赖,
Windows 用户不再因 `bash` 命令不存在而报错。核心逻辑(DevToolsActivePort 探测、
端口回退、proxy 自动启动)1:1 保留。SKILL.md 和 README.md 中的调用命令同步更新。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 21:07:37 +08:00
HaiyiMei daf73957f3 fix: clear cached chrome port on WebSocket connection error
When connect() failed (e.g. connecting to a Docker port instead of Chrome),
chromePort was not reset, causing all subsequent requests to keep using the
wrong port. Now onError clears the cache like onClose does, so the next
request re-discovers the correct Chrome port.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:58:51 +07:00
eze 1116c082a7 fix: check-deps.sh 用 /targets 替代 /health 统一连接检测,proxy connect() 防重入避免重复弹窗
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:07:10 +08:00
li-xiu-qi de3c8b3376 fix: detect current-browser CDP port in preflight 2026-03-24 20:48:37 +08:00
VegetaPn eb5fd05809 fix: use relative path to locate cdp-proxy.mjs in check-deps.sh
The script hardcoded `~/.claude/skills/web-access/scripts/cdp-proxy.mjs`
which fails when the skill is installed in a project-local `.claude/skills/`
directory. Resolve the proxy script path relative to the check-deps.sh
location so it works regardless of where the skill is installed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:01:16 +08:00
eze 601a4094bf update: 移除 proxy 自动退出机制,改为持续运行,不建议主动停止 2026-03-23 14:23:01 +08:00
eze e7ea65f4cf chore: 移除 CDP Proxy 空闲超时,改为常驻运行
远程场景下 20 分钟超时断开后需重新授权,改为连上即常驻,用户关 Chrome 自然断开。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:10:23 +08:00
eze b59bbdfbde feat: v2.3 浏览哲学重构、Jina 积极推荐、子 Agent prompt 指引优化,新增站点经验 x.com/xiaohongshu 2026-03-20 09:39:00 +08:00
eze 98c09b0ff6 feat: v2.2 — WebSocket直连 + /clickAt真实鼠标点击 + /setFiles文件上传 + site-patterns格式 2026-03-19 22:41:37 +08:00
eze c219dbe81c init: web-access skill v2.0.0
三层联网通道(WebSearch/Jina/CDP)+ 浏览器 CDP 模式 + 并行分治策略

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 13:54:51 +08:00