Skip to content

Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.

fix: drop ensure/execute/resume, internal validation logs and 'latest version' wording

Pnantd2ed0f6e9c37
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5740cafd..49ca87ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,14 +30,14 @@ English:
- 加一个平台只要一句话,需要的软件(Node.js、Chrome、ffmpeg、浏览器扩展)都会自动装好,不需要管理员密码;你只需要登录或者填一个 Key。
- 默认平台也能去掉,去掉后更新不会再加回来;去掉时会一起清掉它的登录和专用工具。
-- 更新会把各平台用到的工具升到最新版;有新版本时,AI 会用大白话告诉你改了什么,你同意了才更新。
+- 更新时,有已测版本的工具保持在已测版本,其他工具用兼容范围内的最新版;有新版本时,AI 会用大白话告诉你改了什么,你同意了才更新。
- 优先按站点复用本地已有登录,原浏览器不变;查询默认无头,需要本人登录时才显窗。
English:
- Adding a platform takes one sentence. Whatever it needs (Node.js, Chrome, ffmpeg, the browser extension) is installed for you, with no admin password; you only log in or enter a key.
- Default platforms can be removed, and updates won't add them back; removing one also clears its login and private tools.
-- Updating also moves each platform's tools to their latest versions. When a new version is out, your AI tells you in plain words what changed and updates only if you say yes.
+- Updating keeps tools that have a tested version at that version; other tools get the newest version inside their supported range. When a new version is out, your AI tells you in plain words what changed and updates only if you say yes.
- Reuse existing local site sessions read-only; queries default to headless, with a visible window for human login.
1.6 is a rebuild. Agents call one command, `agent-reach`; everything Agent Reach installs or stores lives under `~/.agent-reach/`.
@@ -49,13 +49,13 @@ English:
- **Management / 管理命令**: `setup`, `add` / `remove <channel>`, `login` / `logout <channel>`, `doctor`, `check`, `skill`, `skill link <dir>`, `update`, `configure`, `uninstall`.
- **One-step setup / 一步装好**: `setup` adds every default channel through the same path as `add` (bili-cli goes into `~/.agent-reach/tools/`) and reports what works, which AIs can read the skill, optional channels and optional logins. / `setup` 用和 `add` 同一套逻辑开启全部默认渠道,并汇报哪些能用、哪些 AI 能读到 skill、可选渠道和可选登录。
- **Skill placement / skill 放置**: one real copy at `~/.agents/skills/agent-reach/SKILL.md` (read directly by Codex, OpenCode, Cline, Warp, Zed); a link to it in the skill folder of Claude Code, OpenClaw, Hermes, Cursor, Gemini CLI, GitHub Copilot and Windsurf when installed (a copy where links are not allowed, e.g. Windows). `agent-reach skill link <dir>` covers any other AI. / 只放一份真文件,其他 AI 的 skill 目录里放指向它的链接(链接:一个指向原文件的快捷方式)。
-- **Private upstream installs, latest allowed version / 上游私有安装,用最新可用版本**: tools go into `~/.agent-reach/tools/`; the user's own copies are untouched. New installations use the declared tested versions where available; otherwise they install the latest allowed version. `floor` and `exclude` define acceptable existing tools. `state.json` records the version actually installed and `doctor` shows it. Single-instance tools (OpenCLI) reuse the user's copy; if it is older than the floor, it is upgraded only with `--allow-upgrade`. / 优先安装已验收版本;已有工具按兼容范围复用;doctor 显示实际版本。
+- **Private upstream installs, tested versions / 上游私有安装,用已测版本**: tools go into `~/.agent-reach/tools/`; the user's own copies are untouched. Tools with a declared tested version install at that version, and `update` keeps them there; other tools install the newest version inside `floor` and `exclude`, which also define acceptable existing tools. `state.json` records the version actually installed and `doctor` shows it. Single-instance tools (OpenCLI) reuse the user's copy; if it is outside the supported versions, it is upgraded only with `--allow-upgrade`. / 有已测版本的工具装已测版本,`update` 也保持不变;其他工具用兼容范围内的最新版;doctor 显示实际版本。
- **`add` gives a finished result / `add` 一步到位**: missing prerequisites are installed without an admin password: uv (official script), ffmpeg (`imageio-ffmpeg` in a private venv), Node.js (official release under `~/.agent-reach/tools/node/` when the system has none), CloakBrowser (falling back to installed Chrome on download failure). git is no longer needed (Boss installs from a GitHub archive). The user only logs in or enters a key. / 缺的依赖自动装好,用户只需登录或填 Key。
- **Login state under `~/.agent-reach/` / 登录状态统一管理**: CLI tool logins in `sessions/`, browser logins in a dedicated Agent Reach browser. The browser opens by itself when a channel needs it and closes after 10 minutes without use. The OpenCLI extension is loaded automatically on each CloakBrowser launch; Windows system-Chrome fallback may need one Web Store click. Only the requested site’s cookies are copied read-only from an existing connected local browser; the source remains unchanged. / 专用浏览器按需自动打开,10 分钟不用自动关闭;macOS/Linux 自动装好扩展。
- **remove cleans up / 去掉渠道会清理干净**: deletes the channel's private tools nobody else uses, its CLI session, its login keys and its site cookies in the Agent Reach browser. The shared browser profile is retained for explicit logout/reuse; unused private tools are pruned.
- **Removable default channels / 默认渠道可去掉**: `state.json` records `removed_defaults`; `setup` and `update` never add them back; `add` brings one back.
- **doctor states / 体检**: not_added, needs_setup, needs_login, unverified, ready, broken; plus `regressed` per channel (passed in the previous check, fails in the latest).
-- **update** runs `uv tool install --force` on the latest release, upgrades every added channel's tools to the latest allowed version (also when Agent Reach itself has no new release), prunes tools no added channel uses, drops channels no longer in the registry, and refreshes the skill. `result.user_actions` lists in plain sentences what the user must do afterwards. Rollback: `uv tool install --force <previous release zip>`, then `agent-reach update --sync-only`. uv is the only supported installer. 1.5 and earlier installs are migrated on first `setup` / `update`; `config.yaml` keys are kept.
+- **update** runs `uv tool install --force` on the latest release, reinstalls every added channel's tools at their declared versions (tested version when set, otherwise the newest version inside `floor`/`exclude`; also when Agent Reach itself has no new release), prunes tools no added channel uses, drops channels no longer in the registry, and refreshes the skill. `result.user_actions` lists in plain sentences what the user must do afterwards. Rollback: `uv tool install --force <previous release zip>`, then `agent-reach update --sync-only`. uv is the only supported installer. 1.5 and earlier installs are migrated on first `setup` / `update`; `config.yaml` keys are kept.
- **Update notice / 新版本提醒**: explicit `update --check` refreshes the release cache. Ordinary queries never start a background version check or update dependencies. Cached newer releases appear in `meta.update`; updating requires the user’s agreement. / 只在明确检查后提示新版本,用户同意才更新。
- **Release notes / 发布说明**: every CHANGELOG version section starts with a plain summary for users in Chinese and English; it becomes the GitHub release body the AI shows users.
- Xueqiu quotes and stock search via Tencent public quotes (no login); Xueqiu community data uses a session synced from the dedicated browser with `agent-reach login xueqiu --sync`.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 140fe0b5..5e6e2e4a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -25,7 +25,7 @@ A channel is a `Channel` subclass in `agent_reach/channels/`, registered in `age
- `name`, `description`, and `can_handle(url)` so `agent-reach read <url>` can route links to it.
- `level`: `"default"` (works with no setup), `"optional"` (turned on with `agent-reach add`), or `"experimental"` (works but may break any time).
- `actions`: a tuple of `Action`s. Each has a `name`, `help`, `params` (a tuple of `Param(name, help, required, type, default)`), and **ordered** `backends` as `(label, method name)` pairs. The dispatcher tries them in order and falls back on retryable errors. `live_test` holds the params `agent-reach check` uses; a backend passes when it returns at least one item. Slow actions can set `timeout`.
-- `tools` (optional): keys of `runtime.tools.TOOLS` that `agent-reach add` installs privately under `~/.agent-reach/tools/`. Versions are not pinned: `add` and `update` install the latest allowed version. A tool may set `floor` (minimum version) and `exclude` (known-bad versions); add a version to `exclude` in a release when an upstream release breaks.
+- `tools` (optional): keys of `runtime.tools.TOOLS` that `agent-reach add` installs privately under `~/.agent-reach/tools/`. A tool with `tested` is installed at that version by `add` and `update`; other tools get the newest version allowed by `floor` (minimum version) and `exclude` (known-bad versions). Add a version to `exclude` in a release when an upstream release breaks.
- `prereqs` (optional): machine prerequisites (keys of `runtime.manage.PREREQS`: node, chrome, ffmpeg, uv) that `agent-reach add` installs by itself when missing, without an admin password.
- Login, if the platform needs it:
- `login_url`: page opened in the Agent Reach browser by `agent-reach login`; the user logs in there.
diff --git a/README.md b/README.md
index 5e15f17c..69462bfe 100644
--- a/README.md
+++ b/README.md
@@ -164,7 +164,7 @@ flowchart LR
| "看看 Agent Reach 状态" | `agent-reach doctor --text` | 每个渠道的状态:未开启 / 待配置 / 待登录 / 未验证 / 可用 / 故障,并标出"上次还好、现在坏了"的渠道 |
| "加上小红书" / "去掉小红书" | `agent-reach add` / `remove <渠道>` | 开启渠道并装好它需要的一切,你只需登录或提供 Key / 关闭渠道并清掉它的登录和专用工具(默认渠道也能去掉) |
| "B站登录过期了" / "退出登录" | `agent-reach login` / `logout <渠道>` | 登录(你本人操作)/ 清除登录 |
-| "升级 Agent Reach" | `agent-reach update` | 一次更新程序、各渠道的工具(升到最新)和 skill,并告诉你还需要做什么,见 [update.md](docs/update.md) |
+| "升级 Agent Reach" | `agent-reach update` | 一次更新程序、各渠道的工具(有已测版本的保持已测版本,其他用兼容范围内的最新版)和 skill,并告诉你还需要做什么,见 [update.md](docs/update.md) |
| "卸载 Agent Reach" | `agent-reach uninstall` | 见下面"安全性"里的卸载说明 |
| "让另一个 AI 也能用" | `agent-reach skill link <它的 skill 目录>` | 给不在自动名单里的 AI 也放一个说明链接 |
@@ -184,9 +184,9 @@ flowchart LR
平台改版、工具失效是常态。换后端只是调整这个列表,Agent 的调用方式不变。
-### 📌 保持最新,私有安装
+### 📌 已测版本,私有安装
-Agent Reach 装的工具位于 `~/.agent-reach/tools/`,可复用现有 OpenCLI。部分工具固定为已测版本,Boss 固定到已验证提交;`doctor` 显示实际版本。
+Agent Reach 装的工具位于 `~/.agent-reach/tools/`,可复用现有 OpenCLI。有已测版本的工具按已测版本安装,`update` 也不会改动;其他工具用兼容范围内的最新版;Boss 固定到已验证提交;`doctor` 显示实际版本。
### 🩺 能用要靠实测
diff --git a/agent_reach/channels/facebook.py b/agent_reach/channels/facebook.py
index 0532bfe1..0de3d4d0 100644
--- a/agent_reach/channels/facebook.py
+++ b/agent_reach/channels/facebook.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-"""Facebook — Cloak search first; OpenCLI search/profile fallback."""
+"""Facebook search and profiles through OpenCLI in the shared Agent Reach browser."""
from ._opencli_site import OpenCLISiteChannel
from .base import Action, Param
diff --git a/agent_reach/channels/instagram.py b/agent_reach/channels/instagram.py
index 7419c7af..4f609078 100644
--- a/agent_reach/channels/instagram.py
+++ b/agent_reach/channels/instagram.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-"""Instagram — CloakBrowser first, OpenCLI fallback."""
+"""Instagram users, profiles and posts through OpenCLI in the shared Agent Reach browser."""
from ._opencli_site import OpenCLISiteChannel
from .base import Action, Param
diff --git a/agent_reach/channels/xueqiu.py b/agent_reach/channels/xueqiu.py
index 5e4bb4d3..af26a6e0 100644
--- a/agent_reach/channels/xueqiu.py
+++ b/agent_reach/channels/xueqiu.py
@@ -9,7 +9,14 @@ import urllib.parse
import urllib.request
from typing import Any
-from agent_reach.runtime.result import BAD_INPUT, NEED_LOGIN, NOT_FOUND, UPSTREAM_BROKEN, ReachError, make_item
+from agent_reach.runtime.result import (
+ BAD_INPUT,
+ NEED_LOGIN,
+ NOT_FOUND,
+ UPSTREAM_BROKEN,
+ ReachError,
+ make_item,
+)
from agent_reach.runtime.run import http_request
from .base import Action, Channel, Param
diff --git a/agent_reach/channels/youtube.py b/agent_reach/channels/youtube.py
index 4995aff4..2be56abd 100644
--- a/agent_reach/channels/youtube.py
+++ b/agent_reach/channels/youtube.py
@@ -10,8 +10,8 @@ import sys
from agent_reach.runtime.result import (
BAD_INPUT,
- PLATFORM_BLOCKED,
NOT_FOUND,
+ PLATFORM_BLOCKED,
RATE_LIMITED,
ReachError,
make_item,
diff --git a/agent_reach/runtime/cli.py b/agent_reach/runtime/cli.py
index f124319a..9dadd509 100644
--- a/agent_reach/runtime/cli.py
+++ b/agent_reach/runtime/cli.py
@@ -45,9 +45,6 @@ HELP = """agent-reach — internet access for AI agents (all output is JSON)
For agents:
agent-reach channels list channels, actions, params
- agent-reach ensure CHANNEL install/reuse/verify a channel; resumable
- agent-reach execute CHANNEL ACTION --params JSON prepare and run one action
- agent-reach resume OPERATION_ID continue after the user logs in
agent-reach <channel> <action> [args] e.g. agent-reach bilibili search python
agent-reach read <url> read a link with the matching channel
Search/read try declared public web routes first; --backend selects a site tool
@@ -521,42 +518,6 @@ def _cmd_browser(args: Sequence[str]) -> int:
return _bad_input(None, "browser", str(exc))
-def _cmd_flow(head: str, args: Sequence[str]) -> int:
- from . import flow
-
- parser = _Parser(prog=head, add_help=False)
- if head == "resume":
- parser.add_argument("operation_id")
- else:
- parser.add_argument("channel")
- if head == "execute":
- parser.add_argument("channel_action")
- parser.add_argument("--params", required=True)
- parser.add_argument("--timeout", type=float, default=60.0)
- parser.add_argument("--backend")
- else:
- parser.add_argument("--action")
- parser.add_argument("--no-verify", action="store_true")
- try:
- ns = parser.parse_args(list(args))
- if head == "resume":
- from .flow import resume
- result = resume(ns.operation_id)
- elif head == "ensure":
- result = flow.ensure(ns.channel, action=ns.action, verify=not ns.no_verify)
- else:
- params = json.loads(ns.params)
- if not isinstance(params, dict):
- raise _ArgError("--params must be a JSON object")
- result = flow.execute(ns.channel, ns.channel_action, params, timeout=ns.timeout, backend=ns.backend)
- except (ValueError, _ArgError) as exc:
- return _bad_input(None, head, str(exc))
- except ReachError as err:
- return _emit(envelope(channel=None, action=head, error=err))
- return _emit({"schema_version": SCHEMA_VERSION, "action": head, **result})
-
-
-
def main(argv: Sequence[str]) -> int:
global _SHOW_NOTICE
@@ -571,8 +532,6 @@ def main(argv: Sequence[str]) -> int:
head, rest = argv[0], argv[1:]
if head == "channels":
return _cmd_channels(rest)
- if head in ("ensure", "execute", "resume"):
- return _cmd_flow(head, rest)
if head == "check":
return _cmd_check(rest)
if head == "read":
diff --git a/agent_reach/runtime/dispatch.py b/agent_reach/runtime/dispatch.py
index 7d3c72f1..a42a6e4d 100644
--- a/agent_reach/runtime/dispatch.py
+++ b/agent_reach/runtime/dispatch.py
@@ -5,7 +5,7 @@ from __future__ import annotations
import threading
import time
from contextlib import nullcontext
-from typing import Any, Callable, Dict, List, Optional
+from typing import Any, Dict, List, Optional
from agent_reach.channels.base import Action, Channel
@@ -201,9 +201,6 @@ def run_action(
*,
timeout: float = DEFAULT_TIMEOUT,
only_backend: Optional[str] = None,
- preferred_backend: Optional[str] = None,
- before_backends: Optional[Callable[[], None]] = None,
- public_first: bool = True,
) -> dict:
"""Execute one unified action and return the envelope dict."""
started = time.monotonic()
@@ -223,8 +220,6 @@ def run_action(
if not backends:
return envelope(channel=channel.name, action=action_name, elapsed_ms=elapsed(),
error=ReachError(BAD_INPUT, f"no backend named '{only_backend}'"))
- if preferred_backend:
- backends.sort(key=lambda backend: backend[0] != preferred_backend)
clock = Clock(timeout - (time.monotonic() - started))
attempts: List[dict] = []
errors: List[ReachError] = []
@@ -234,8 +229,7 @@ def run_action(
if limited:
raise ReachError(RATE_LIMITED, limited["message"],
hint=f"Wait {limited['retry_after_seconds']} seconds before retrying this channel.")
- if action.public_web and ((public_first and only_backend is None and not _channel_added(channel))
- or public_only):
+ if action.public_web and ((only_backend is None and not _channel_added(channel)) or public_only):
budget = clock.remaining() if public_only else min(public_web.MAX_SECONDS, clock.remaining() / 2)
public = public_web.attempt(channel, action, clean, timeout=budget)
if public is not None:
@@ -245,16 +239,6 @@ def run_action(
return public
elif public_only:
raise ReachError(BAD_INPUT, "This input has no public web route; use a full supported URL")
- # Preparation is deferred until public access actually proves insufficient.
- if before_backends:
- if clock.remaining() <= 0:
- raise ReachError(TIMEOUT, "No time left to prepare the site tool")
- # Keep the existing rule: cold setup is outside the query deadline.
- clock.pause()
- try:
- before_backends()
- finally:
- clock.resume()
# One action per site keeps an agent's parallel requests from fighting
# over the same persistent session; worker-level profile locks remain.
browser_action = any(b[0] in {"opencli", "boss-agent-cli"} for b in action.backends)
diff --git a/agent_reach/runtime/flow.py b/agent_reach/runtime/flow.py
deleted file mode 100644
index c8bd0438..00000000
--- a/agent_reach/runtime/flow.py
+++ /dev/null
@@ -1,184 +0,0 @@
-"""Resumable setup and execution for the CLI.
-
-The caller selects a channel and action. Reach handles its declared primary
-backend, reuses available local site sessions, and records a real
-query result. No password, cookie, or browser database is exposed here.
-"""
-
-from __future__ import annotations
-
-import secrets
-from typing import Any, Optional
-
-from . import manage, state, tools
-from .browser_binding import execution_lock
-from .dispatch import cooldown, find_action, run_action, validate_action
-from .result import BAD_INPUT, NEED_LOGIN, NEED_SETUP, PLATFORM_BLOCKED, RATE_LIMITED, ReachError
-
-
-def _action(ch, name: Optional[str]):
- action = find_action(ch, name) if name else next(
- (a for a in ch.actions if a.name in ("search", "jobs")), ch.actions[0] if ch.actions else None
- )
- if action is None:
- raise ReachError(BAD_INPUT, f"{ch.name} has no action named {name}")
- return action
-
-
-def _needs(channel: str, action: str, kind: str, message: str, **extra) -> dict:
- return {"ok": False, "status": "needs_user_action", "channel": channel, "action": action,
- "required_action": {"type": kind, "message": message, **extra}}
-
-
-
-def _record(channel: str, action: str, out: dict) -> None:
- stamp = state.now()
- signature = manage.fingerprint(channel)
- def change(data):
- old = data["checks"].get(channel, {})
- actions = dict(old.get("actions", {}))
- actions[action] = bool(out["ok"])
- codes = dict(old.get("codes", {}))
- if actions[action]:
- codes.pop(action, None)
- else:
- codes[action] = (out.get("error") or {}).get("code", "EMPTY")
- evidence = dict(old.get("evidence", {}))
- previous = evidence.get(action, {})
- keep_verified = (out["ok"] and not out["items"] and old.get("actions", {}).get(action)
- and previous.get("verified", True) and previous.get("item_count", 0) > 0
- and previous.get("fingerprint") == signature
- and state.age_seconds(previous.get("at")) < manage.CHECK_FRESH_SECONDS)
- if not keep_verified:
- evidence[action] = {"backend": out.get("backend"), "at": stamp,
- "item_count": len(out["items"]), "verified": bool(out["ok"] and out["items"]),
- "fingerprint": signature, "access": out.get("meta", {}).get("access")}
- data["checks"][channel] = {"at": stamp, "actions": actions, "codes": codes,
- "previous": old.get("actions", {}), "scope": action,
- "evidence": evidence,
- "last_result": {"action": action, "at": stamp, "backend": out.get("backend"),
- "item_count": len(out["items"]), "ok": bool(out["ok"]), "error": out.get("error")}}
- if codes.get(action) == RATE_LIMITED:
- data.setdefault("cooldowns", {})[channel] = {
- "code": RATE_LIMITED, "message": (out.get("error") or {}).get("message"), "at": stamp}
- elif actions[action] and state.age_seconds(data.get("cooldowns", {}).get(channel, {}).get("at")) >= 3600:
- data.setdefault("cooldowns", {}).pop(channel, None)
- state.mutate(change)
-
-
-def prepare(channel: str, *, action: Optional[str] = None,
- install: bool = True) -> dict:
- """Prepare dependencies and the shared browser and reuse the requested site’s local login. No model."""
- ch = manage._channel(channel)
- selected = _action(ch, action)
- with execution_lock("prepare:" + channel):
- limited = cooldown(channel)
- if limited:
- return {"ok": False, "status": "cooldown", "channel": channel,
- "action": selected.name, "retry_after_seconds": limited["retry_after_seconds"],
- "error": {"code": RATE_LIMITED, "message": limited["message"]}}
- browser_action = selected.backends[0][0] in {"opencli", "boss-agent-cli"}
- if not browser_action:
- # Native clients prepare their own session only if that route needs it.
- # A stock quote must not provision the whole community browser channel.
- for tool in dict.fromkeys((*ch.prereqs, *ch.tools)):
- if tool in {"chrome", "opencli"} or tools.present(tool):
- continue
- if not install:
- return _needs(channel, selected.name, "install", f"Run agent-reach add {channel}")
- tools.ensure(tool)
- elif not manage.is_added(ch) or any(not tools.present(t) for t in manage.channel_tools(ch)):
- if not install:
- return _needs(channel, selected.name, "install", f"Run agent-reach add {channel}")
- manage.add(channel)
- if ch.login_url and browser_action:
- from . import session_reuse
- session_reuse.prepare(channel)
- return {"ok": True, "status": "prepared", "channel": channel,
- "action": selected.name, "backend": selected.backends[0][0]}
-
-
-def ensure(channel: str, *, action: Optional[str] = None,
- verify: bool = True, install: bool = True) -> dict:
- prepared = prepare(channel, action=action, install=install)
- if not prepared["ok"] or not verify:
- return prepared
- selected = _action(manage._channel(channel), prepared["action"])
- if selected.live_test is None:
- return {**prepared, "status": "prepared", "verified": False}
- out = run_action(manage._channel(channel), selected.name, dict(selected.live_test),
- timeout=selected.timeout or 60, preferred_backend=prepared.get("backend"), public_first=False)
- _record(channel, selected.name, out)
- if out["ok"]:
- return {**prepared, "status": "ready" if out["items"] else "prepared", "verified": bool(out["items"]),
- "backend": out["backend"], "item_count": len(out["items"])}
- return _failure(channel, selected.name, out)
-
-
-def _failure(channel: str, action: str, out: dict) -> dict:
- err = out.get("error") or {"code": "EMPTY", "message": "Query returned no items"}
- code = err["code"]
- if code in {NEED_LOGIN, PLATFORM_BLOCKED}:
- return {**_needs(channel, action, "platform_verification" if code == PLATFORM_BLOCKED else "login",
- err["message"]), "error": err}
- return {"ok": False, "status": "cooldown" if code == RATE_LIMITED else "failed",
- "channel": channel, "action": action, "error": err, "attempts": out["meta"]["attempts"],
- **({"retry_after_seconds": 3600} if code == RATE_LIMITED else {})}
-
-
-def execute(channel: str, action: str, params: dict[str, Any], *, timeout: float = 60,
- operation_id: Optional[str] = None, backend: Optional[str] = None) -> dict:
- if not isinstance(params, dict):
- raise ReachError(BAD_INPUT, "params must be an object")
- ch = manage._channel(channel)
- _, params = validate_action(ch, action, params, timeout=timeout)
- prepared: dict = {}
- def prepare_site():
- prepared.update(prepare(channel, action=action))
- if not prepared["ok"]:
- err = prepared.get("error")
- if err:
- raise ReachError(err["code"], err["message"], err.get("hint"))
- required = prepared.get("required_action") or {}
- code = {"login": NEED_LOGIN, "platform_verification": PLATFORM_BLOCKED}.get(required.get("type") or "", NEED_SETUP)
- raise ReachError(code, required.get("message") or "Site tool preparation did not complete")
-
- # Resuming a confirmed auth wall verifies the site path, not another index hit.
- out = run_action(ch, action, params, timeout=timeout, before_backends=prepare_site,
- public_first=operation_id is None, only_backend=backend)
- if prepared and not prepared["ok"]:
- result = prepared
- else:
- _record(channel, action, out)
- result = ({"ok": True, "status": "ready", "channel": channel, "action": action,
- "backend": out["backend"], "items": out["items"], "meta": out["meta"]}
- if out["ok"] else _failure(channel, action, out))
- if result["status"] == "needs_user_action":
- token = operation_id or "op_" + secrets.token_urlsafe(12)
- with execution_lock("pending:" + channel):
- def save_pending(data):
- pending = data.setdefault("pending", {})
- pending[token] = {"channel": channel, "action": action,
- "params": params, "timeout": timeout, "backend": backend, "at": state.now()}
- for old in list(pending):
- if state.age_seconds(pending[old].get("at", "")) > 7 * 86400:
- pending.pop(old, None)
- while len(pending) > 32:
- pending.pop(next(iter(pending)))
- state.mutate(save_pending)
- result["operation_id"] = token
- elif operation_id and result["status"] == "ready":
- with execution_lock("pending:" + channel):
- state.mutate(lambda data: data.setdefault("pending", {}).pop(operation_id, None))
- elif operation_id:
- result["operation_id"] = operation_id
- return result
-
-
-def resume(operation_id: str) -> dict:
- pending = state.load().get("pending", {}).get(operation_id)
- if not pending:
- raise ReachError(BAD_INPUT, "Unknown or completed operation_id")
- result = execute(pending["channel"], pending["action"], pending["params"],
- timeout=pending["timeout"], operation_id=operation_id, backend=pending.get("backend"))
- return result
diff --git a/agent_reach/runtime/manage.py b/agent_reach/runtime/manage.py
index e6639ff5..bf71681d 100644
--- a/agent_reach/runtime/manage.py
+++ b/agent_reach/runtime/manage.py
@@ -349,10 +349,6 @@ def remove(name: str) -> dict:
saved["removed_defaults"].append(name)
for key in ("reuse_sources", "setup_failures", "backend_health", "cooldowns"):
saved.get(key, {}).pop(name, None)
- for key in ("pending", "ask_pending"):
- for ident, task in list(saved.get(key, {}).items()):
- if task.get("channel") == name:
- saved[key].pop(ident, None)
saved.setdefault("session_revisions", {})[name] = state.now()
state.mutate(forget)
return {"channel": name, "removed": True, "removed_tools": _prune(state.load()),
@@ -643,7 +639,7 @@ def setup() -> dict:
user_actions = _retired_mcp_notice()
if state.load()["tools"].get("mcporter", {}).get("owner") == tools.OURS:
tools.remove_private("mcporter") # retired LinkedIn MCP transport, only our private copy
- state.mutate(lambda saved: (saved.pop("reuse_sources", None), saved.pop("ask_pending", None)))
+ state.mutate(lambda saved: [saved.pop(key, None) for key in ("reuse_sources", "ask_pending", "pending")])
skill = place_skill()
data = state.load()
defaults = [c for c in _channels() if c.level == "default" and is_added(c, data)]
diff --git a/agent_reach/runtime/tools.py b/agent_reach/runtime/tools.py
index 9abe5482..768006c6 100644
--- a/agent_reach/runtime/tools.py
+++ b/agent_reach/runtime/tools.py
@@ -1,8 +1,8 @@
-"""Upstream tools and machine prerequisites Agent Reach installs, at their latest allowed version.
+"""Upstream tools and machine prerequisites Agent Reach installs, at their declared versions.
-New installations prefer the tested versions declared below. Each tool may set `floor` (oldest version we accept)
-and `exclude` (known-bad versions, added in a release when an upstream breaks);
-Unpinned tools use the newest version inside those limits. Existing user tools are not silently downgraded.
+Tools with `tested` are installed at that version, and `update` keeps them there. Each tool may set `floor`
+(oldest version we accept) and `exclude` (known-bad versions, added in a release when an upstream breaks);
+tools without `tested` use the newest version inside those limits. Existing user tools are not silently downgraded.
state.json records the version actually installed.
Kinds:
@@ -474,7 +474,8 @@ def record(name: str, version: Optional[str], *, owner: str = OURS, scope: str =
def ensure(name: str, *, allow_upgrade: bool = False, upgrade: bool = False) -> dict:
"""Make sure the tool is installed inside its limits; record it in state.
- `upgrade`: reinstall our private copy at the latest allowed version (update/sync).
+ `upgrade`: reinstall our private copy at its install spec (update/sync): the tested
+ version when declared, otherwise the newest version inside floor/exclude.
Returns {"tool", "owner", "scope", "version"}; owner "system" = not ours, not recorded.
"""
tool = TOOLS[name]
diff --git a/docs/README_en.md b/docs/README_en.md
index 3794caa3..436b0730 100644
--- a/docs/README_en.md
+++ b/docs/README_en.md
@@ -166,7 +166,7 @@ Just tell your agent in plain words; it runs the command for you:
| "How is Agent Reach doing?" | `agent-reach doctor --text` | status of every channel: not_added / needs_setup / needs_login / unverified / ready / broken, and which ones broke since the last check |
| "Add Xiaohongshu" / "Remove Xiaohongshu" | `agent-reach add` / `remove <channel>` | turn a channel on and install everything it needs; you only log in or provide a key / turn it off and clear its login and private tools (default channels too) |
| "My Bilibili login expired" / "Log out" | `agent-reach login` / `logout <channel>` | log in (you do it) / forget the login |
-| "Upgrade Agent Reach" | `agent-reach update` | update the program, every channel's tools (to their latest versions) and the skill in one go, and tell you anything left to do, see [update.md](update.md) |
+| "Upgrade Agent Reach" | `agent-reach update` | update the program, every channel's tools (tested versions stay put; others get the newest supported version) and the skill in one go, and tell you anything left to do, see [update.md](update.md) |
| "Uninstall Agent Reach" | `agent-reach uninstall` | see Uninstall under Security below |
| "Let my other AI use it too" | `agent-reach skill link <its skills folder>` | link the instructions for an AI not covered automatically |
@@ -184,9 +184,9 @@ Each action of each channel has an ordered list of backends. `bilibili read` tri
Platforms change and tools break all the time. Switching backends only reorders that list; the way the agent calls Agent Reach stays the same.
-### 📌 Kept current, private installs
+### 📌 Tested versions, private installs
-Tools are private under ~/.agent-reach/tools/. Selected dependencies use tested versions; Boss is pinned to a verified Git commit. Do not overwrite this local fork with an upstream update.
+Tools are private under ~/.agent-reach/tools/. Tools with a tested version install at that version, and `update` keeps them there; other tools use the newest version inside their supported range; Boss is pinned to a verified Git commit. `doctor` shows the installed versions.
### 🩺 Working means live-tested
diff --git a/docs/plans/2026-10-20-shared-cloak-browser.md b/docs/plans/2026-10-20-shared-cloak-browser.md
index 7872ac24..79ed4f26 100644
--- a/docs/plans/2026-10-20-shared-cloak-browser.md
+++ b/docs/plans/2026-10-20-shared-cloak-browser.md
@@ -16,4 +16,4 @@
## Live acceptance record
-387 local core tests, Ruff and Mypy passed. Live Xiaohongshu search/read/comments, explicit session import, scoped cleanup and shortened idle/reopen tests passed. BOSS returned PLATFORM_BLOCKED and requires manual verification. Details: docs/validation/shared-browser-20261020.md. Browser creation and test imports are authorized by the user's current implementation request. Do not mark a platform authenticated merely because cookies were copied; verify with the upstream channel action. Do not send messages, submit applications, post comments, or otherwise write to platforms.
+387 local core tests, Ruff and Mypy passed. Live Xiaohongshu search/read/comments, explicit session import, scoped cleanup and shortened idle/reopen tests passed. BOSS returned PLATFORM_BLOCKED and requires manual verification. Browser creation and test imports are authorized by the user's current implementation request. Do not mark a platform authenticated merely because cookies were copied; verify with the upstream channel action. Do not send messages, submit applications, post comments, or otherwise write to platforms.
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index 0a884c47..c44afde4 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -13,7 +13,7 @@ Every failed command returns `ok: false` and an `error` with `code`, `message` a
| Code | Meaning | What to do |
|---|---|---|
-| `NEED_SETUP` | a tool, key or selected browser connection is missing | run `agent-reach doctor --text` and follow the problem listed for the channel; use `agent-reach ensure <channel>` for supported channel setup |
+| `NEED_SETUP` | a tool, key or selected browser connection is missing | run `agent-reach doctor --text` and follow the problem listed for the channel; use `agent-reach add <channel>` to install the channel's tools |
| `NEED_LOGIN` | login is missing or expired | the user runs `agent-reach login <channel>` and logs in themselves; do not delete credentials to fix a connection or platform-verification error |
| `UPSTREAM_BROKEN` | the upstream tool or platform failed | don't retry in a loop; try again later, inspect the upstream error and pinned dependency version, then `agent-reach check <channel>`; still broken → open an issue with the `message` |
| `TIMEOUT` | no backend answered in time | retry later, or pass a larger `--timeout SECONDS`; on a restricted network set a proxy (below) |
@@ -26,7 +26,7 @@ Every failed command returns `ok: false` and an `error` with `code`, `message` a
| Status | Meaning | What to do |
|---|---|---|
| `not_added` | optional channel not turned on | `agent-reach add <channel>` |
-| `needs_setup` | something is missing; `problems` says what | use `agent-reach ensure <channel>` or follow the specific setup step |
+| `needs_setup` | something is missing; `problems` says what | use `agent-reach add <channel>` or follow the specific setup step |
| `needs_login` | the last live check failed only on login | `agent-reach login <channel>` (the user logs in) |
| `unverified` | set up, but no live check in the last 24 hours | `agent-reach check <channel>` |
| `search_ready` | search returned nonempty results in the last 24 hours | read and other actions need their own checks |
diff --git a/docs/update.md b/docs/update.md
index b9519127..4ba93c3c 100644
--- a/docs/update.md
+++ b/docs/update.md
@@ -9,7 +9,7 @@ agent-reach update
One command does everything:
- upgrades the program to the latest GitHub release (`uv tool install --force <release zip>`)
-- upgrades the tools of every added channel to their latest versions, even when Agent Reach itself has no new release (known-bad versions are skipped); tools no channel uses any more are removed
+- reinstalls the tools of every added channel, even when Agent Reach itself has no new release: tools with a tested version stay at that version, other tools get the newest version inside their supported range (known-bad versions are skipped); tools no channel uses any more are removed
- refreshes the Agent Reach skill (the one real copy, and the links that let your other AIs read it)
Default channels you removed stay removed; `agent-reach add <channel>` brings one back.
diff --git a/docs/validation/dedicated-policy-20261020.md b/docs/validation/dedicated-policy-20261020.md
deleted file mode 100644
index d13758a8..00000000
--- a/docs/validation/dedicated-policy-20261020.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# Dedicated browser policy audit — 2026-10-20
-
-Historical candidate record. The user subsequently authorized local site-session reuse. Current behavior and acceptance are in [headless-session-reuse-20261021.md](headless-session-reuse-20261021.md); dedicated-only authentication statements below are superseded, not current rules.
-
-Candidate only. PR #815 remains a draft against `release/1.6`. No merge, tag or official release. Package version remains 1.6.0. The earlier 63c272a claim of complete acceptance was too broad.
-
-## Review findings and fixes
-
-All five concrete code defects were confirmed. The changes below distinguish regression coverage from live business acceptance.
-
-| Finding | Final change | Evidence |
-|---|---|---|
-| BOSS detail used native HTTP authentication | `boss read` now invokes the official OpenCLI `boss detail` browser adapter, pinned to the shared dedicated profile. Native BOSS helper handles browser search only. | Route/parameter regression passed. **Real JD acceptance still pending** after the earlier platform block; no repeated risk requests. |
-| Removal reported success after login cleanup failed | Required browser cleanup runs before channel/task/tool deregistration. Failure propagates; the channel remains registered. | Failure injection passed; real synthetic site cleanup passed. |
-| www/subdomain storage was missed | Capture open and previously visited origins, include www/cookie origins, clear selected site data and verify remaining cookies. | Regression passed; real local subdomain localStorage/cookie cleared, another site cookie retained. This does not claim discovery of every historical origin from older builds. |
-| BOSS archive source caused repeated installation | Accept the installed archive URL or the exact expected VCS commit; repeated prepare reuses it. | Two ensure calls caused zero installs in provenance regression. |
-| XHS error hint pointed to personal Chrome | Hint now opens Reach login; all personal-browser export/import commands and source flags removed. | Retired-source commands fail before credential/browser access. |
-
-## Eight-rule implementation
-
-- Work stayed on a feature branch. PR stays draft; release workflow now requires real per-action evidence for the exact source digest. Unit tests and doctor cannot satisfy the gate.
-- No maintainer account, credential, absolute home path, browser profile, binary or local API/research prototype is included in the candidate.
-- Official OpenCLI 1.8.7 was compared with its npm archive: **2,340 published files matched; no extra non-dependency files**. No upstream source edits.
-- Authentication is completed by the human in one dedicated Reach profile. Only already-saved dedicated state is reused. Personal Chrome cookies/files are never imported.
-- Ordinary commands no longer launch detached update checks. Existing tools/extensions are reused; an explicit update or allow-upgrade is required to change installed versions.
-- Cursor/other application MCP configuration is never changed. A retired entry recorded by old Reach is reported as a manual action only.
-- Created artifacts are recorded. Deletion uses this ledger or existing owned-tool records. Unknown files, unrecorded sessions and extra Skill notes survive. If the browser cannot close, uninstall stops before deleting files.
-- The user approved an official OpenCLI Bridge companion. The watcher starts/reaps its own child; a failed owned Bridge closes the browser. An existing compatible user Bridge is borrowed, never killed. Reach-started Bridge children always exit with the dedicated browser, even if another client connected meanwhile. Incompatible existing versions are left unchanged.
-
-## Browser lifetime
-
-- Login cookies are periodically saved; closing the window is not required to save them.
-- Trusted page clicks, keyboard input, scrolling and touch, plus Reach calls, reset idle closure. Script-generated input does not. Browser toolbar activity outside the page is not measured.
-- Real accelerated lifecycle test: 6-second idle closed the browser and watcher. Production default remains **600 seconds**. Existing user-owned Bridge PID was preserved.
-- Shared profile, automatic extension, Chrome fallback and on-demand reopening remain. Windows execution is **not accepted in this round**.
-
-## Real console acceptance
-
-All rows below came from `python -m agent_reach.cli`, including saved proxy/PATH preparation. A preliminary in-process probe skipped that preparation and produced YouTube/V2EX errors; it is excluded from release evidence.
-
-| Channel | Action | Backend | Items | ms |
-|---|---|---|---:|---:|
-| github | search | gh | 2 | 2089 |
-| youtube | search | yt-dlp | 2 | 7279 |
-| bilibili | search | bili-cli | 2 | 1090 |
-| v2ex | hot | v2ex-api | 3 | 2154 |
-| web | search | exa | 2 | 1686 |
-| xiaohongshu | search | opencli | 2 | 3129 |
-| xiaohongshu | read | opencli | 1 | 7262 |
-| xiaohongshu | comments | opencli | 25 | 9729 |
-
-XHS comments are the records actually loaded by upstream, including replies; this is not a complete-comment export guarantee.
-**8 of 40 declared actions accepted on macOS. 32 remain without current candidate acceptance.** BOSS requires human verification before another business request. Other platforms/actions need their own acceptance; no status/installation/old success is promoted to a new pass.
-
-## Quality and distribution
-
-- 399 unit/regression tests passed; Ruff passed; Mypy checked 47 source files. Tests include failure retention, www/observed subdomains, archive reuse, BOSS browser detail routing, unknown-file preservation, trusted activity, Bridge ownership and source-bound release evidence.
-- `scripts/check_release_acceptance.py` intentionally fails for this manifest until all missing actions are truly accepted. A v* tag therefore cannot publish this candidate through the release workflow.
-- Formal stable installation points to the verified v1.5.0 release and its instructions. This unpublished 1.6.0 candidate uses its supplied wheel; it never points users at an absent v1.6.0 tag. Ordinary installed users may explicitly run update.
-- Xiaoyuzhou remains present. ask/Reach MCP/custom Cloak site scraping/OpenCLI patching remain removed.
-- Archive and wheel are built only from reviewed Git files. Installed Skill files are generated from that source, not copied from a maintainer-specific working profile.
-
-Source digest: `36a297596b48bf7872e2e602731a2e3fd36bc147a2cf6dedab997a545fa5c645`. Sanitized machine-readable evidence: [release-acceptance.json](release-acceptance.json).
diff --git a/docs/validation/full-reacceptance-20261021.md b/docs/validation/full-reacceptance-20261021.md
deleted file mode 100644
index e0804b4d..00000000
--- a/docs/validation/full-reacceptance-20261021.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# 全环节复验:2026-10-21
-> 本文保留下午首轮验收的历史结果;后续修复和重新验收见 [PR 更新复验](reacceptance-pr-refresh-20261021.md)。
-
-
-## 结论
-
-**当前仍不能发版。** 40 个声明动作中,31 个至少通过一条正式声明的访问路径;其余 9 个受平台验证、限流或缺少转录 Key 影响。公开搜索通过不等于该平台的登录搜索也通过。
-
-另外复现了公开降级、错误分类、清理归属和发布门禁方面的程序缺口。448 项自动化测试通过没有覆盖住这些问题。本轮没有修改业务代码、上游源码或推送分支;更新了验收记录,保留失败项。
-
-- 测试系统:macOS,ARM64。
-- 源代码摘要:`21ab1b85eab356e890c562f4d654f0d4b3212705196a9be0c488675057d99e9e`。
-- 本机安装的 wheel 与 49 个生产 Python 文件逐一一致,已安装中文 Skill 与渲染结果一致。
-- PR #815 仍为 draft,目标分支 `release/1.6`,未合并;本机新改动尚未推送。
-- 所有真实业务请求只读;限流或风控后停止该平台,没有切换账号、浏览器或后端继续请求。
-
-## 逐项验收
-
-✅ 本机真实验证;🧪 隔离测试或静态检查通过;❌ 发现缺口;⏳ 本轮未完成真实验证。
-
-| 环节 | 结果 | 本轮证据与边界 |
-|---|---|---|
-| 功能分支、PR、不直接推主分支 | ✅ | 当前为功能分支;GitHub 查询确认 PR draft、未合并;本轮没有推送 |
-| 不分发维护者路径、账号、Key、Cookie、API 原型 | ✅ | 候选 wheel 扫描未命中本机身份/密钥模式;退休模块与 API 原型不在包内 |
-| 不修改 OpenCLI 源码 | ✅ | 2,340 个发布文件与缓存官方 npm 归档逐字节一致,无额外发布文件 |
-| 不修改其他上游依赖 | 🧪 | Cloak/B站/BOSS 分别有 26/23/170 个文件通过安装 RECORD 哈希校验;这不是重新从远端下载的独立证明 |
-| 移除 ask、Reach MCP、旧 Cloak 逐站抓取和 OpenCLI 补丁 | ✅ | 安装包中无这些模块;真实 CLI 拒绝退休命令;Cursor/Codex 中未发现 Reach MCP 注册 |
-| 网页提取交给上游工具 | 🧪 | 没有新增逐站 DOM 抓取后端;保留原有公开 API 客户端、字段整理和通用活动检测 |
-| 一个共享专用配置、Cloak 优先 | ✅ | 多平台使用同一 `browser/profile`;实际运行后端为 CloakBrowser |
-| 普通查询默认无头 | ✅ | 实际进程含 headless 参数;真实站内查询成功 |
-| 显窗与无头共用登录和存储 | ✅ | 本地测试页跨两次切换保留 Cookie 和 localStorage;原有 167 项网站 Cookie 哈希不变 |
-| 登录窗口无需关闭即可保存 | ✅ | 窗口仍开着时,watcher 自动将测试 Cookie 保存到快照 |
-| 优先复用本地已有登录 | ✅ | 小红书真实业务成功;来源的 17 项站点 Cookie 前后哈希一致,没有改原浏览器 |
-| 继承完整浏览器状态 | ⏳ | 本地来源导入目前是站点 Cookie;不迁移来源的全部 localStorage/IndexedDB,不承诺所有网站均可直接继承 |
-| 登录由本人完成、不问密码 | 🧪 | 本轮复用已有登录,没有让 AI 输入账号密码;显窗和保存实测通过,未人为退出真实账号重做登录 |
-| 自动加载 OpenCLI 扩展 | ✅ | 重开后扩展已连接,随后的站内搜索成功,无需手工接桥 |
-| 添加浏览器渠道准备依赖 | ✅ | 对已安装渠道实际执行 add,返回三个依赖结果,版本不变;这次验证的是复用已有依赖 |
-| 从空电脑完整冷安装 | ⏳ | 本机已有依赖;没有将依赖卸光再装,Windows 冷安装和业务尚需真机验收 |
-| Cloak 下载失败退回本机 Chrome | 🧪 | 相关回归测试通过;本轮没有破坏现有内核来触发真实下载失败 |
-| 删除站点登录,覆盖 www 子域 | ✅ | 本地真实页面的 Cookie/localStorage 清除成功,另一站点的 Cookie/localStorage 保留;未清除用户真实平台登录 |
-| 清理失败保留渠道、退出后不自动复活登录 | 🧪 | 隔离回归测试通过;没有拿真实账号做破坏性退出测试 |
-| 十分钟自动关闭 | ✅ | 正常计时 600 秒;watcher 结束写入发生在约 601 秒,浏览器和 watcher 均退出 |
-| 手动输入影响计时,脚本伪事件不影响 | ✅ | 本地页面的可信输入重置计时,JS dispatchEvent 事件不重置 |
-| 不重复启动 watcher | ✅ | 第二个 watcher 返回 another watcher is running |
-| 关闭后自动重开并继续使用登录 | ✅ | 自动关闭后直接运行小红书站内搜索,自动以无头 Cloak 重开,返回 2 条结果 |
-| 浏览器关闭后回收计时进程 | ✅ | 自动关闭和显式停止均验证 watcher 退出;最终没有留下测试浏览器 |
-| 用户原有 Bridge 不被结束 | ✅ | 本轮开始前的用户 Bridge 在显窗切换、自动关闭、显式关闭后仍保留 |
-| Reach 自启 Bridge 的回收分支 | 🧪 | 隔离测试通过;当前端口由用户已有 Bridge 使用,没有停止它来制造测试条件 |
-| 普通查询不自动更新依赖 | ✅ | setup、add、业务查询前后记录的工具版本一致,未执行 update |
-| 不改其他软件配置 | ✅ | setup 前后 Cursor/Codex 配置哈希一致;只更新允许放置的 Skill |
-| 版本、小宇宙、安装摘要 | ✅ | 版本 1.6.0;小宇宙渠道和脚本保留;5/5 默认依赖就绪,实际输出问候和三列表 |
-| 正式安装/升级文档 | 🧪 | 文档区分正式版与未发布候选,已有正式用户使用 update;候选版不能冒充已发布 1.6.0 |
-| 无额外模型 Key、无本机 Reach MCP 服务 | ✅ | 普通搜索无需模型 Key;退休命令拒绝,未发现 Reach MCP 注册;Web 仍使用既有远端服务 |
-| 公开优先、只为缺口准备浏览器 | ❌ | 声明公开路径已生效;但 GitHub 未登录 gh 阻断公开 API,execute 查雪球行情仍启动浏览器,见问题 1/2 |
-| 正确区分登录、网络和平台验证 | ❌ | 雪球 403/坏 JSON、YouTube 机器人验证和 GitHub 普通 403 仍有错误分类,见问题 3 |
-| 限流后不再发平台请求 | ✅ | IG 429 后停止其余动作;再次调用被本地保护拦截,后端尝试数为 0 |
-| 卸载只删有明确归属的文件 | ❌ | 预先存在的未登记缓存被认领,卸载删除了其中未登记文件;仅在隔离目录复现 |
-| 数据只落 Reach 目录 | ❌ | 字幕/音频临时目录仍使用系统临时目录;隔离复现确认自动删除,但不满足“全部放 Reach 下”的字面约定 |
-| PR/发布必须有真实验收 | ❌ | 发版接了动作检查,PR CI 没接;检查器未执行 release_ready/额外 Windows 待验字段,见问题 5 |
-| 英文 Skill 同步最新 CLI 说明 | ⏳ | 英文版本尚未解释 public-web 参数和本轮 CLI 公开优先细节,需同步 |
-
-## 渠道实际结果
-
-| 渠道 | 本轮结果 | 已取得的粒度 |
-|---|---|---|
-| GitHub | ✅ 当前环境;❌ 未登录默认路线 | 当前 gh 搜索、仓库 README、Issue/PR 及返回的评论可读;隔离匿名公开 API 也成功,但默认路由先被未登录 gh 阻断 |
-| YouTube | ⚠️ 搜索通过,读取受阻 | 搜索返回 2 条;视频信息读取遇机器人验证后停止,字幕未继续;转录预检明确缺少 Key |
-| B站 | ✅ 4/4 | 搜索、视频信息、热门、首P字幕;字幕 979 字,不代表整套多P或视频画面理解 |
-| V2EX | ✅ 4/4 | 热门、节点、用户、主题及返回的回复;主题读取 7,172 字,未声称全量分页回复 |
-| 网页 | ✅ 2/2 | Exa 搜索和 Jina 页面文本读取 |
-| 小红书 | ✅ 3/3 | 公开索引搜索、站内搜索、正文 602 字、10 条已加载评论/回复;不代表完整评论树或图像理解 |
-| X/Twitter | ✅ 4/4 | 搜索、公开账号资料、动态、50 条线程结果;实际线程文字 6,107 字,不保证全部回复 |
-| Reddit | ✅ 3/3 | 公开索引与站内搜索、板块列表、帖子与实际返回评论;读取 7,819 字 |
-| Facebook | ✅ 2/2 | 搜索卡片和主页元信息;没有验证完整帖子正文或评论导出 |
-| LinkedIn | ✅ 公开搜索和 JD;❌ 站内搜索 | JD 3,882 字;官方 OpenCLI 1.8.7 站内搜索仍等待英文 Jobs,公开搜索路线成功 |
-| BOSS | ❌ 本轮被拒绝 | 原生 Boss CLI 返回环境风控 code 37;停止,未换后端,没有新 JD 通过记录 |
-| Instagram | ❌ 本轮被限流 | 主页接口 HTTP 429;其余两个动作跳过,没有继续请求或要求反复重登 |
-| 雪球 | ✅ 4/4 | 行情、股票搜索、热帖和热股;直接行情不启动浏览器,execute 的准备流程仍有缺口 |
-| 小宇宙 | ⏳ 待 Key | 渠道和转录脚本保留;本机没有 Groq Key,未发送转录请求 |
-
-总计 31/40 是按“动作至少有一条通过路线”统计。LinkedIn 的公开职位搜索计入成功,其站内搜索失败仍单列;没有把公开结果算成站内能力通过。登录相关动作按站内路线计为 16/22,其余是 BOSS 两项、IG 三项和 LinkedIn 站内搜索。
-
-## 需要修复的程序问题
-
-1. **GitHub 的公开降级仍会被登录阻断。** 在新的隔离 HOME 中,同一条真实 CLI 搜索默认返回 NEED_LOGIN;加上 `--backend github-api` 后返回公开仓库。没有退出或更改用户真实 GitHub 登录。`channels/github.py` 将 gh 未配置凭据归为 NEED_LOGIN,`runtime/dispatch.py` 遇此代码直接结束,公开 API 没被调用。
-2. **execute 对公开原生动作仍准备浏览器。** 从浏览器关闭状态分别查询同一条雪球行情:直接命令不启动浏览器;execute 返回同样的腾讯行情,同时启动 Cloak。`runtime/flow.py:prepare` 依照整个渠道的 login_url 准备会话,没有区分此动作是否需要浏览器。
-3. **错误分类没有统一到所有原生客户端。** 隔离复现中,雪球把普通 HTTP 403 和无效 JSON 都报为 NEED_LOGIN,GitHub 把普通 403 报为 RATE_LIMITED;真实 YouTube 请求的机器人验证也被报成 NEED_LOGIN。这些信号分别需要按权限、服务/格式错误和平台验证处理,不能直接引导重登。
-4. **未登记缓存会被认领并删除。** 在隔离目录先创建未登记的 cache/用户文件,再调用 install_env:整个 cache 被记入台账,文件本身未登记;实际执行隔离 uninstall 后,文件消失。真实用户目录未被卸载或删除。
-5. **真实验收门禁不完整。** PR CI 只跑自动化和打包;真实动作检查在 tag 发版阶段。检查器在一个隔离样本里,对 release_ready=false 和 Windows 待验字段返回无错误。目前仍因缺少 9 个真实动作而阻止发版;未来补齐动作后,这两项额外条件也必须被明确执行。
-
-次级待收口:系统临时文件目录、英文 Skill 说明、Windows 真机与空环境冷安装、真实下载失败后的系统 Chrome 回退分支。
-
-## 记录与收尾
-
-- 448 项测试通过,Ruff 与 mypy 覆盖 49 个生产 Python 文件。
-- `release-acceptance.json` 更新为当前源码实测,保留 9 项待验和 release_ready=false;实际运行发布检查返回失败,未发布。
-- 原始业务内容、站点 URL、Cookie 哈希及本机环境证明保存在本机私有验收目录,没有写进分发清单。
-- 测试末尾再次显式关闭专用浏览器,等待 watcher 退出;用户原有 Bridge 保留。真实平台登录未被清除,其他软件配置未被修改。
diff --git a/docs/validation/headless-session-reuse-20261021.md b/docs/validation/headless-session-reuse-20261021.md
deleted file mode 100644
index e49c0146..00000000
--- a/docs/validation/headless-session-reuse-20261021.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# 无头查询与本地登录复用验收(2026-10-21)
-
-这是测试候选记录。目标是让用户直接说任务,由程序复用已有站点登录、准备依赖并执行;只有真正缺少登录或需要本人验证时才请用户操作。全部操作只读,未修改上游源码或原浏览器。此记录取代此前“只允许在专用浏览器登录”的候选规则。
-
-## 已改的流程
-
-1. 公开内容仍先用 Agent 已有搜索和读取,足够时直接回答。
-2. 需要 Reach 的动作时,普通查询默认无头。先从已连接的本地官方 Browser Bridge 只读复制所需网站 Cookie;不碰密码库、Cookie 数据库或其他网站。
-3. 没有来源连接时保留已有 Reach 会话。多个来源不猜账号,选择一次来源;Cookie 复制成功不等于登录已经验证。
-4. 本人登录才显窗,定期保存。下一次查询在同一配置转回无头,先恢复会话再打开目标页。
-5. 退出或删除渠道后停止自动导入;原浏览器不变。验证码停止,限流暂停一小时,不更换账号或后端重试。
-
-## 真实业务验收
-
-下表列明已取得的粒度;搜索卡片不算正文,已加载回复不等于完整评论树。最终源代码对应的计数和时间见 `release-acceptance.json`。
-
-| 渠道 | 结果 | 实际取得的内容 |
-|---|---|---|
-| 小红书 | 通过 | 搜索、文字描述、已加载评论和回复;图像内容未做识别 |
-| BOSS | 通过 | 深圳岗位搜索、搜索结果的 JD;均走同一浏览器 |
-| X / Twitter | 通过 | 搜索、主页、用户推文、所返回的线程回复 |
-| Reddit | 通过 | 搜索、帖子正文和返回的评论、板块列表;公开网页路径仍可免登录先用 |
-| Facebook | 通过 | 搜索卡片、用户主页信息;未声明完整帖子或评论导出 |
-| 雪球 | 通过 | 热帖、热股;公开行情和股票搜索不准备浏览器 |
-| B站 | 通过 | 首P已有字幕,所测样本返回 979 字;不代表整套多P视频 |
-| Instagram | 未通过 | 搜索接口此前返回 404;刷新登录快照后的主页接口返回 401,原已登录浏览器请求同一接口返回 429;停止本轮请求 |
-| LinkedIn | 部分通过 | 现有 1.8.7 正式路由已读取 4,783 字 JD;搜索卡在中文账号界面的 Jobs 等待;2.0.1 CDP 搜索仅为隔离试验 |
-
-Instagram 的 404 不应引导反复重登,错误映射已修正。网页访问、登录态复制和接口访问分别验收;限流时停止请求。领英的新后端是否接入,需要确认后再改依赖;独立试验结果不计正式通过。
-
-## 修复与边界
-
-- 默认无头已通过实际进程参数验证。显窗、无头切换使用同一配置,Cookie 和 localStorage 在本地测试页上保留;测试页状态随后清除。
-- 首次复用小红书前后,来源站点 Cookie 对照一致。凭据只在本机传递,不输出到模型上下文。
-- 修复后台执行线程重复获取共享浏览器锁造成的 BUSY。
-- BOSS JD 调用上游 `job_card_browser()`,不调用会走独立 HTTP 会话的 `job_detail()` / `job_card()`。短期职位引用保存在渠道私有目录,账号会话改变后失效,不输出 securityId/lid。
-- B站用上游官方凭据写入接口,站点登录通过进程标准输入传递。没有可用来源时沿用已保存的原生 CLI 登录;没有字幕与字幕下载失败分别报告。
-- 雪球只为社区动作自动同步登录。Node 警告不再盖住真正的上游错误;HTTP 404 不再仅因提示中有 login 字样被归为未登录。
-- macOS 回归测试通过;Windows 无头、登录复用和业务动作尚需真机复测。
-
-本轮尚未完成所有登录渠道的目标,不合并、不发布。发布门禁仍要求全部已声明动作的当前源码实测,单元测试不能代替业务结果。候选包不含账号、Cookie、Key、浏览器配置或浏览器二进制。
-
-本轮最终源码:`3ac98c106151237cb8e4deff46d315b23411411e3779d70728c3c0bc756e338f`。18 个动作通过,覆盖 7 类完整渠道和领英 JD;全项目 40 个声明动作中仍有 22 个缺少本次源码的实测,所以发布门禁保持阻断。415 项单测、Ruff 和 Mypy 通过。官方 OpenCLI 1.8.7 的 2,340 个发布文件再次逐字节核对,无修改。
-
-Instagram 在等待期结束后又做了一次低频主页验收,仍返回 HTTP 429,已重新暂停,未尝试其他账号或后端。安装后的命令已成功查询小红书;重新启动的实际进程带 headless 参数,官方扩展已连接,Cursor 配置前后校验一致。
-
-## 本轮继续核验
-
-- 领英 JD 在现有官方 1.8.7 正式路由上通过。搜索故障定位到中文账号界面与英文 Jobs 等待不匹配;试过浏览器语言设置后仍失败,已撤回该尝试,没有强制更改所有网站的界面语言,也未新增第二套后端。
-- Cookie 复用改成该站快照,清掉专用浏览器中来源没有的旧 Cookie,保留其他网站;导入失败尝试回滚并保留保存的快照。真实 CDP 测试验证旧 Cookie 消失、其他网站 Cookie 不变,测试数据已清除。
-- 更换来源保留明确退出和本人手动登录的选择,不会让已退出渠道自动重新登录。
-- 原生 B站字幕不再被可选 OpenCLI 来源发现拦住。模拟未安装 OpenCLI 的运行环境后,真实 B站 CLI 仍取到 979 字字幕;这项额外诊断不重复计入 18 个正式动作。
-- 修正两个仅在 POSIX 成立的测试断言,保留 Windows 真机业务验收待办。415 项单测、Ruff、Mypy 通过。
-
-本目标共 22 个登录相关动作,当前 18 个通过,剩余为领英搜索及 Instagram 搜索、主页、帖子。遇到明确限流后停止请求,不自动切换账号或后端。目标保持未完成,PR 保持草稿。
-
-## 用户确认网页正常后的 Instagram 对照
-
-用户确认日常浏览器能查看 NASA 主页和帖子后,等待期结束再做一次正式主页查询。11 项站点 Cookie 已复制,导入后的值与来源一致,无头参数已确认;正式路由本次返回 HTTP 401。随后打开专用浏览器里的 NASA 公开主页,可以看到简介和 12 个帖子链接,但显示为访客,导入的认证 Cookie 已不在目标浏览器中。复制成功不能计作认证通过,帖子链接也不计作帖子正文。
-
-为区分浏览器环境和接口路径,在原浏览器已打开、显示登录账号和内容的 Instagram 页面中,只读请求同一个上游主页接口一次:返回 HTTP 429 和 HTML,原页面地址保持不变。使用官方 Bridge 的临时绑定,结束时解除绑定并恢复原先选中的标签页;未切换账号、修改上游、要求重新登录或继续请求搜索和帖子接口。程序记录了一小时渠道保护;期限结束也不自动重试。
-
-据此,原浏览器网页可见与结构化接口可用是两项能力。当前证据同时暴露接口拒绝请求和专用环境认证未通过,不能将故障全部归为用户未登录、Cloak 检测或全站不可访问。现阶段可用网页工具读取公开页面,Instagram 的三个正式动作继续保留未通过状态。本机脱敏记录与失败结果已保存,未将临时诊断写成新的网页抓取后端。
diff --git a/docs/validation/public-first-cli-20261021.md b/docs/validation/public-first-cli-20261021.md
deleted file mode 100644
index 6a2213d4..00000000
--- a/docs/validation/public-first-cli-20261021.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# CLI 先公开访问,再按需使用站内能力
-
-2026-10-21,本机候选版验证。当前改动位于功能分支,尚未发布。
-
-后续[全环节复验](full-reacceptance-20261021.md)发现,公开优先尚未覆盖所有旧路径:未登录的 gh 会阻断 GitHub 公开 API,execute 查雪球行情仍准备浏览器。本文保留这轮已经取得的样本,不代表全项目均已解决不必要登录或配置。
-
-## 执行顺序
-
-1. 先验证参数。带 `public_web` 声明的搜索、阅读动作复用现有 Web 渠道,不先安装浏览器或导入登录。
-2. 返回公开结果时标记 `backend: public-web`;`meta.access.scope` 区分 `search_results` 与 `page_text`,不承诺完整性和实时性。
-3. 公开访问不足或服务失败后,才尝试所选动作的站内工具;优先复用已有会话。实际站内路径返回 `NEED_LOGIN` 才提示用户本人登录。
-4. 页面正文旁的登录链接不构成登录墙;空壳、明确登录页不当作正文。搜索为空、DNS/TLS、403、超时和服务错误都不能单独证明用户需要登录。
-5. `--backend public-web` 限定公开访问;指定已声明的站内后端可直接获得站内结果。`execute` 支持相同选择。`ensure` 验收站内能力;`resume` 验证实际待完成的站内动作,避免用公开索引命中掩盖认证失败。
-
-公开路径声明覆盖:LinkedIn jobs/read、Reddit search/read、小红书 search/read、BOSS search/read、X search、Facebook search。其他渠道已有的公开原生接口保持原流程。Instagram 搜用户、评论、字幕、账号列表等独立动作保留原语义,不用网页摘要替代。
-
-公开路径仍使用既有 Exa/Jina 服务。Exa 响应传输截断时,只在原时间预算内补试一次;HTTP 429、403 和工具返回的错误不补试。服务限流归属 Web 服务,不写成目标平台的账号限流。
-
-## 最终安装版真实 CLI 验收
-
-代码摘要:`21ab1b85eab356e890c562f4d654f0d4b3212705196a9be0c488675057d99e9e`。
-
-| 请求 | 实际后端 | 本次结果 |
-|---|---|---|
-| LinkedIn 找深圳数据工程师 | public-web | 2 条,1,817 字;约 2.1 秒;无需启动浏览器 |
-| LinkedIn 读取 CASETiFY 公开职位链接 | public-web 尝试后转 opencli | Jina 403,Exa 抓取超时;已有会话返回 3,882 字 JD;约 24.9 秒;没有要求用户重新登录 |
-| execute LinkedIn jobs | public-web | 2 条,1,817 字;约 1.8 秒;未准备站内工具 |
-| Reddit 搜 LocalLLaMA llama.cpp | public-web | 2 条,1,990 字;约 3.9 秒;搜索证据不当作完整帖子或评论树 |
-
-另一次开发阶段的公开 JD 读取曾返回 4,465 字;最终安装版这次走了已有站内会话。两次结果说明公开读取服务存在波动,不能把此样本写成“所有 JD 稳定匿名可读”。测试结束后,测试使用的专用浏览器与计时程序均已关闭。
-
-这轮没有重复验收其他平台的真实业务;新增公开声明不等于全部渠道已通过发布验收。既有完整发布验收仍需按新源码摘要重新执行。
-
-## 代码与验证
-
-- 共用公开路由读取动作声明,未增加站点 DOM 选择器或自写网页提取器。
-- LinkedIn 将公开索引里的地区域名、标题式职位链接转换为官方工具接受的标准职位 ID 链接,先校验域名与路径;未修改 OpenCLI 源码。
-- 普通命令、通用 read、execute 采用同一公开优先路由;公开成功时跳过站内准备。
-- Skill 和安装摘要同步:LinkedIn 显示“找职位、读公开详情”,站内搜索按实际认证结果决定是否登录。
-- 448 项自动化测试通过;49 个生产 Python 文件通过 Ruff 和 mypy;安装 wheel 与这 49 个文件逐一比对一致。
-- 覆盖无结果/错域名、空壳/登录页、正文附登录链接、短正文、明确认证失败、限流归属、显式后端、恢复待办、冷启动预算及响应截断边界。
-- 候选 wheel 排除本机 API 原型、个人配置、Cookie、浏览器目录及已移除的 ask/MCP 模块。本机 CLI 和已安装 Skill 已同步。
diff --git a/docs/validation/reacceptance-pr-refresh-20261021.md b/docs/validation/reacceptance-pr-refresh-20261021.md
deleted file mode 100644
index b3b2c66c..00000000
--- a/docs/validation/reacceptance-pr-refresh-20261021.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# PR 更新复验:2026-10-21
-
-本轮已合入 `release/1.6` 的 `aa8db87`,在功能分支修复本地缺口,并用重新构建、实际安装的 wheel 进行只读查询。**仍为测试候选,不能合并或发布。**
-
-源码摘要:`3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98`。
-
-## 本轮修复与真实核验
-
-| 项目 | 结果 |
-|---|---|
-| gh 没登录阻断公开 GitHub API | 修复;隔离 HOME、移除 GitHub 凭据环境变量后,默认 CLI 返回公开仓库,无需登录 |
-| execute 查公开行情却准备整个浏览器渠道 | 修复;直接命令及 execute 均返回行情,前后浏览器保持关闭;本地回归也覆盖未添加渠道的情况 |
-| 普通 403、坏 JSON、机器人验证误报登录 | 修复;隔离回归区分权限拒绝、限流证据、格式错误、401 和平台验证 |
-| 已存在的未知 cache 被认领并递归删除 | 修复;使用单独登记的下载子目录;隔离安装及实际卸载保留原有未知文件 |
-| 临时音频/字幕文件落在系统临时目录 | 改为 Reach 内的独立登记目录;实际临时目录在异常退出后也清理,用户显式指定的输出目录保留 |
-| 验收门禁遗漏 ready 标记、待验项和空时间 | 修复;PR CI 增加真实验收检查,缺失记录和待验状态继续阻断合并、发版 |
-| BOSS 默认站内搜索 | 改为优先官方 OpenCLI;两条真实结果约 7.7 秒返回;保留原生 CLI 显式入口 |
-| BOSS 详情误报登录 | 官方适配器仍失败;Reach 将已知歧义信号归为上游故障,避免反复要求用户重登 |
-| 英文 Skill | 补齐公开优先、结果范围和显式 backend 说明 |
-
-自动化:**462 项通过**;49 个生产 Python 文件类型检查通过;Ruff 基础错误检查通过。自动化结果不代替下面的联网验收。
-
-## 渠道结果
-
-✅ 表示本机至少一条声明路径真实返回内容;搜索卡片、正文、评论、字幕分别计数。
-
-| 渠道 | 本轮结果与边界 |
-|---|---|
-| GitHub | ✅ 搜索、README、Issue/PR 及返回评论;匿名默认路径另外验收通过 |
-| YouTube | ✅ 搜索、简介 3,844 字、字幕 64,352 字;转录缺 Key。前轮曾遇机器人验证,本次通过不构成稳定性保证 |
-| B站 | ✅ 搜索、信息、热门、首P字幕;不代表整套多P或画面理解 |
-| V2EX | ✅ 热门、节点、用户、主题及返回回复;不保证全量分页 |
-| Web | ✅ 页面文字;❌ Exa 搜索两轮出现响应传输中断,原因仍需区分网络路径和服务端 |
-| 小红书 | ✅ 搜索、正文 315 字、8 条已加载评论/回复;非完整评论树 |
-| X/Twitter | ✅ 搜索、资料、动态、50 条线程结果;非全部回复保证 |
-| Reddit | ✅ 公开搜索、站内搜索、板块、帖子及返回评论;正文与评论文字合计 7,819 字 |
-| Facebook | ✅ 搜索卡片、主页元信息;本版未声明帖子全文和评论导出 |
-| LinkedIn | ✅ 公开职位搜索、JD 3,882 字;❌ 官方 OpenCLI 站内搜索仍等待英文 Jobs |
-| BOSS | ✅ OpenCLI 搜索;❌ JD 结构化提取,网页可访问不能计作 detail 命令通过 |
-| Instagram | ❌ 官方接口 429,余下动作停止;本地保护再次拦截时后端尝试数为零 |
-| 雪球 | ✅ 行情、股票搜索、热帖、热股 |
-| 小宇宙 | 保留渠道和转录脚本;缺 Groq Key,未发送转录请求 |
-
-共 **33/40** 个声明动作至少通过一条正式路径。7 个待验动作:BOSS read、Instagram 三项、Web search、YouTube transcribe、小宇宙 transcribe。LinkedIn 的公开搜索已计入通过,站内搜索失败另列,未混同。
-
-## 浏览器与发布约束
-
-- 共用 Cloak 配置;真实进程含 headless 参数。显窗和无头切换保留 Cookie 与 localStorage。
-- 窗口仍打开时自动保存;可信输入重置计时,脚本伪事件不重置;第二个 watcher 不会重复启动。
-- 本地真实页面验证单站 Cookie、www 子域存储清理,另一站保持原样;169 项原有网站 Cookie 前后哈希一致。
-- 十分钟自动关闭:使用真实 600 秒阈值;30 秒轮询在 630 秒确认浏览器与 watcher 均退出,用户原有 Bridge 保留。关闭后直接搜索会自动以无头 Cloak 重开,返回一条结果;收尾再次关闭浏览器和 watcher。
-- 本地来源只读复用;来源站点 Cookie 哈希不变。导入范围仍是 Cookie,未承诺复制完整浏览器存储。
-- OpenCLI 1.8.7 的 2,340 个发布文件与官方归档一致。没有修改上游源码、增加逐站 DOM 提取、恢复 ask 或 Reach MCP。
-- wheel 含 49 个生产 Python 文件,逐一对应源码;无 API 原型、退休模块、维护者路径或密钥;小宇宙保留。
-- setup 成功,安装后能力表和 Skill 已同步;Cursor/Codex 配置哈希未变化,依赖没有自动升级。
-- Windows 真机、空环境冷安装仍待验。当前 `release_ready=false`,PR 和发版检查必须拒绝放行。
-
-原始内容和环境证据仅保存在本机私有验收目录;提交的清单保留计数、时间、错误码和源码摘要。
diff --git a/docs/validation/release-acceptance.json b/docs/validation/release-acceptance.json
deleted file mode 100644
index 0386b09e..00000000
--- a/docs/validation/release-acceptance.json
+++ /dev/null
@@ -1,720 +0,0 @@
-{
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "release_ready": false,
- "results": [
- {
- "at": "2026-10-21T07:34:37.432667+00:00",
- "method": "real-cli",
- "backend": "bili-cli",
- "item_count": 2,
- "text_chars": 205,
- "elapsed_ms": 885,
- "channel": "bilibili",
- "action": "hot",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:36.529817+00:00",
- "method": "real-cli",
- "backend": "bili-cli",
- "item_count": 1,
- "text_chars": 69,
- "elapsed_ms": 880,
- "channel": "bilibili",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:35.630227+00:00",
- "method": "real-cli",
- "backend": "bili-cli",
- "item_count": 2,
- "text_chars": 0,
- "elapsed_ms": 1881,
- "channel": "bilibili",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:39.427832+00:00",
- "method": "real-cli",
- "backend": "bili-cli",
- "item_count": 1,
- "text_chars": 979,
- "elapsed_ms": 1955,
- "channel": "bilibili",
- "action": "subtitle",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:31:09.775120+00:00",
- "method": "real-cli",
- "backend": null,
- "item_count": 0,
- "text_chars": 0,
- "elapsed_ms": 20546,
- "channel": "boss",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": false,
- "acceptance_scope": "site",
- "error": {
- "code": "UPSTREAM_BROKEN"
- }
- },
- {
- "at": "2026-10-21T07:30:49.217490+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 2,
- "text_chars": 0,
- "elapsed_ms": 7665,
- "channel": "boss",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:33:17.957318+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 1,
- "text_chars": 0,
- "elapsed_ms": 9834,
- "channel": "facebook",
- "action": "profile",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:33:22.530496+00:00",
- "method": "real-cli",
- "backend": "public-web",
- "item_count": 2,
- "text_chars": 411,
- "elapsed_ms": 4549,
- "channel": "facebook",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "default",
- "error": null
- },
- {
- "at": "2026-10-21T07:33:53.846288+00:00",
- "method": "real-cli",
- "backend": "gh",
- "item_count": 1,
- "text_chars": 4745,
- "elapsed_ms": 3560,
- "channel": "github",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:33:45.210058+00:00",
- "method": "real-cli",
- "backend": "gh",
- "item_count": 2,
- "text_chars": 297,
- "elapsed_ms": 1608,
- "channel": "github",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:29.863191+00:00",
- "channel": "instagram",
- "action": "posts",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": false,
- "acceptance_scope": "site",
- "error": {
- "code": "NOT_EXECUTED"
- }
- },
- {
- "at": "2026-10-21T07:34:29.855006+00:00",
- "method": "real-cli",
- "backend": null,
- "item_count": 0,
- "text_chars": 0,
- "elapsed_ms": 11347,
- "channel": "instagram",
- "action": "profile",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": false,
- "acceptance_scope": "site",
- "error": {
- "code": "RATE_LIMITED"
- }
- },
- {
- "at": "2026-10-21T07:34:29.862945+00:00",
- "channel": "instagram",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": false,
- "acceptance_scope": "site",
- "error": {
- "code": "NOT_EXECUTED"
- }
- },
- {
- "at": "2026-10-21T07:34:18.488404+00:00",
- "method": "real-cli",
- "backend": "public-web",
- "item_count": 2,
- "text_chars": 1817,
- "elapsed_ms": 7555,
- "channel": "linkedin",
- "action": "jobs",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "default",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:10.919879+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 1,
- "text_chars": 3882,
- "elapsed_ms": 17916,
- "channel": "linkedin",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:32:41.322053+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 1,
- "text_chars": 7819,
- "elapsed_ms": 14865,
- "channel": "reddit",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:32:52.977047+00:00",
- "method": "real-cli",
- "backend": "public-web",
- "item_count": 2,
- "text_chars": 1990,
- "elapsed_ms": 2412,
- "channel": "reddit",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "default",
- "error": null
- },
- {
- "at": "2026-10-21T07:32:50.542243+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 2,
- "text_chars": 0,
- "elapsed_ms": 9208,
- "channel": "reddit",
- "action": "subreddit",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:31:36.441225+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 1,
- "text_chars": 0,
- "elapsed_ms": 14228,
- "channel": "twitter",
- "action": "profile",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:32:10.157616+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 2,
- "text_chars": 926,
- "elapsed_ms": 14735,
- "channel": "twitter",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "default",
- "error": null
- },
- {
- "at": "2026-10-21T07:31:55.408562+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 50,
- "text_chars": 6247,
- "elapsed_ms": 13051,
- "channel": "twitter",
- "action": "thread",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:31:42.327924+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 2,
- "text_chars": 960,
- "elapsed_ms": 5857,
- "channel": "twitter",
- "action": "tweets",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:21.537352+00:00",
- "method": "real-cli",
- "backend": "v2ex-api",
- "item_count": 2,
- "text_chars": 1535,
- "elapsed_ms": 2810,
- "channel": "v2ex",
- "action": "hot",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:24.086950+00:00",
- "method": "real-cli",
- "backend": "v2ex-api",
- "item_count": 2,
- "text_chars": 646,
- "elapsed_ms": 2549,
- "channel": "v2ex",
- "action": "node",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:33.722232+00:00",
- "method": "real-cli",
- "backend": "v2ex-api",
- "item_count": 1,
- "text_chars": 6090,
- "elapsed_ms": 9634,
- "channel": "v2ex",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:36.126523+00:00",
- "method": "real-cli",
- "backend": "v2ex-api",
- "item_count": 1,
- "text_chars": 0,
- "elapsed_ms": 2403,
- "channel": "v2ex",
- "action": "user",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:43.663061+00:00",
- "method": "real-cli",
- "backend": "jina",
- "item_count": 1,
- "text_chars": 958,
- "elapsed_ms": 2386,
- "channel": "web",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:42:13.393624+00:00",
- "method": "real-cli",
- "backend": null,
- "item_count": 0,
- "text_chars": 0,
- "elapsed_ms": 8227,
- "channel": "web",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": false,
- "acceptance_scope": "public-native-recheck",
- "error": {
- "code": "UPSTREAM_BROKEN"
- }
- },
- {
- "at": "2026-10-21T07:30:40.945948+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 8,
- "text_chars": 378,
- "elapsed_ms": 7976,
- "channel": "xiaohongshu",
- "action": "comments",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:30:32.959482+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 1,
- "text_chars": 315,
- "elapsed_ms": 6849,
- "channel": "xiaohongshu",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:30:26.092628+00:00",
- "method": "real-cli",
- "backend": "opencli",
- "item_count": 2,
- "text_chars": 0,
- "elapsed_ms": 5289,
- "channel": "xiaohongshu",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "method": "configuration-preflight",
- "channel": "xiaoyuzhou",
- "action": "transcribe",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": false,
- "acceptance_scope": "configuration-preflight",
- "error": {
- "code": "NOT_EXECUTED"
- }
- },
- {
- "at": "2026-10-21T07:34:31.712247+00:00",
- "method": "real-cli",
- "backend": "xueqiu-api",
- "item_count": 2,
- "text_chars": 274,
- "elapsed_ms": 1634,
- "channel": "xueqiu",
- "action": "hot_posts",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:33.723705+00:00",
- "method": "real-cli",
- "backend": "xueqiu-api",
- "item_count": 2,
- "text_chars": 39,
- "elapsed_ms": 1967,
- "channel": "xueqiu",
- "action": "hot_stocks",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "site",
- "error": null
- },
- {
- "at": "2026-10-21T07:30:08.862012+00:00",
- "method": "real-cli",
- "backend": "tencent",
- "item_count": 1,
- "text_chars": 21,
- "elapsed_ms": 184,
- "channel": "xueqiu",
- "action": "quote",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-execute",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:30.065470+00:00",
- "method": "real-cli",
- "backend": "tencent",
- "item_count": 1,
- "text_chars": 0,
- "elapsed_ms": 196,
- "channel": "xueqiu",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:05.758741+00:00",
- "method": "real-cli",
- "backend": "yt-dlp",
- "item_count": 1,
- "text_chars": 3844,
- "elapsed_ms": 7993,
- "channel": "youtube",
- "action": "read",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:33:57.765221+00:00",
- "method": "real-cli",
- "backend": "yt-dlp",
- "item_count": 2,
- "text_chars": 256,
- "elapsed_ms": 3919,
- "channel": "youtube",
- "action": "search",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:18.521783+00:00",
- "method": "real-cli",
- "backend": "yt-dlp",
- "item_count": 1,
- "text_chars": 64352,
- "elapsed_ms": 12763,
- "channel": "youtube",
- "action": "subtitle",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": true,
- "acceptance_scope": "public-native",
- "error": null
- },
- {
- "at": "2026-10-21T07:34:18.726640+00:00",
- "method": "real-cli",
- "backend": null,
- "item_count": 0,
- "text_chars": 0,
- "elapsed_ms": 205,
- "channel": "youtube",
- "action": "transcribe",
- "os": "macOS",
- "source_sha256": "3de11065c99dde53e4009cca7b2bddc32b8da7f0fc968934e6c76b682e503f98",
- "passed": false,
- "acceptance_scope": "public-native",
- "error": {
- "code": "NEED_SETUP"
- }
- }
- ],
- "pending": [
- {
- "channel": "boss",
- "action": "read",
- "reason": "OpenCLI JD extraction failed; ambiguous login signal is not treated as proof of expired login"
- },
- {
- "channel": "instagram",
- "action": "posts",
- "reason": "Skipped after rate limit"
- },
- {
- "channel": "instagram",
- "action": "profile",
- "reason": "HTTP 429; paused"
- },
- {
- "channel": "instagram",
- "action": "search",
- "reason": "Skipped after rate limit"
- },
- {
- "channel": "web",
- "action": "search",
- "reason": "Exa response transport interrupted (IncompleteRead), including one later recheck"
- },
- {
- "channel": "xiaoyuzhou",
- "action": "transcribe",
- "reason": "No Groq Key configured"
- },
- {
- "channel": "youtube",
- "action": "transcribe",
- "reason": "No Whisper provider Key configured"
- }
- ],
- "additional_required_validation": [
- "Windows real headless startup, session reuse, cold install and channel queries",
- "Resolve failed actions before marking this source release-ready"
- ],
- "privacy": "Counts, timings, source digest and error codes only; no credentials, account identifiers, queries or content URLs",
- "route_diagnostics": [
- {
- "channel": "boss",
- "action": "search",
- "scope": "site",
- "passed": true,
- "backend": "opencli",
- "error_code": null
- },
- {
- "channel": "boss",
- "action": "read",
- "scope": "site",
- "passed": false,
- "backend": null,
- "error_code": "UPSTREAM_BROKEN"
- },
- {
- "channel": "linkedin",
- "action": "jobs",
- "scope": "site",
- "passed": false,
- "backend": null,
- "error_code": "UPSTREAM_BROKEN"
- },
- {
- "channel": "linkedin",
- "action": "read",
- "scope": "site",
- "passed": true,
- "backend": "opencli",
- "error_code": null
- },
- {
- "channel": "linkedin",
- "action": "jobs",
- "scope": "default",
- "passed": true,
- "backend": "public-web",
- "error_code": null
- },
- {
- "channel": "web",
- "action": "search",
- "scope": "public-native",
- "passed": false,
- "backend": null,
- "error_code": "UPSTREAM_BROKEN"
- },
- {
- "channel": "web",
- "action": "read",
- "scope": "public-native",
- "passed": true,
- "backend": "jina",
- "error_code": null
- },
- {
- "channel": "web",
- "action": "search",
- "scope": "public-native-recheck",
- "passed": false,
- "backend": null,
- "error_code": "UPSTREAM_BROKEN"
- }
- ],
- "verification_summary": {
- "automated_tests": 462,
- "real_action_passed": 33,
- "real_action_total": 40,
- "anonymous_github_default_passed": true,
- "public_quote_execute_keeps_browser_closed": true
- }
-}
diff --git a/docs/validation/shared-browser-20261020.md b/docs/validation/shared-browser-20261020.md
deleted file mode 100644
index ebfdd1c7..00000000
--- a/docs/validation/shared-browser-20261020.md
+++ /dev/null
@@ -1,64 +0,0 @@
-> Historical test record, superseded by the dedicated-only policy audit. The import path described below has been removed. These earlier passes do not certify the current candidate.
-
-# Shared browser acceptance — 2026-10-20
-
-Candidate: **1.6.0**, targeting `release/1.6`. This record separates implementation checks from actual platform access. It does not certify every platform or Windows browser operation.
-
-## Requested scope
-
-| Item | Result | Evidence / limit |
-|---|---|---|
-| Remove model planner | Done | No `ask` command or `runtime/ask.py`; no model key required. |
-| Remove Reach MCP | Done | No server, registration or MCP entry. `setup` removes an old Cursor entry only if its recorded ownership and unchanged contents match. Foreign entries remain. |
-| Remove custom website extraction | Done | Per-site Cloak workers/selectors/API adapters removed. OpenCLI handles browser extraction; BOSS calls its upstream SDK. Normalizing upstream results and existing public/native channels remain. |
-| Remove OpenCLI source patches | Done | Patch command/module removed. Installed official 1.8.7 release: **190 shipped JS/JSON files** match the npm tarball byte for byte. |
-| One dedicated browser | Passed locally | Shared `~/.agent-reach/browser/profile`; CloakBrowser launched by the existing watcher with OpenCLI extension 1.0.26 loaded automatically. No per-channel browser contexts. |
-| Ten idle minutes / automatic reopen | Passed with shortened live timer | Default is 600 seconds. Live test used 3 seconds: browser closed, watcher exited successfully; next call reopened and connected. The test did not wait ten wall-clock minutes. |
-| Chrome fallback | Unit-tested | Installation/download failure selects installed Chrome and remembers the fallback. `browser setup --retry-cloak` retries Cloak. No live network failure was deliberately induced. |
-| Login inheritance | Passed locally | Explicit one-time import of Xiaohongshu cookies from the user-selected Bridge profile; source unchanged; subsequent search returned a result. No personal Chrome Cookie database access. |
-| Preserve login on reopen | Passed locally | Session cookie survived close/reopen; Xiaohongshu and BOSS cookie counts remained 16 and 12. Cookie presence alone does not prove platform authentication. Private snapshot mode: 0600. |
-| BOSS shares browser | Wiring done; business check blocked | Native CLI uses the owned CDP endpoint. Actual search returned **PLATFORM_BLOCKED**. Stopped immediately without backend/account retries; search and JD remain for manual verification. |
-| Browser channel dependencies | Unit-tested; Xiaohongshu add exercised locally | Node, OpenCLI, browser and extension prepared by add. BOSS adds its native CLI too. Cloak download failure can use installed Chrome. |
-| Site-only cleanup | Passed locally + regression tests | Synthetic site cookie removed while another site's cookie survived. Selected-site tabs/storage are cleared; other sites and source Chrome remain. Logout also deletes old per-site snapshots to prevent login revival. |
-| Version / Xiaoyuzhou | Done | Both package versions are 1.6.0; Xiaoyuzhou channel and transcription script restored. Groq key and quota are required; no live transcription check. |
-| Official install / update docs | Done | `docs/install.md` uses the official v1.6.0 archive; existing installs use `agent-reach update`. The candidate must be tested from its own wheel before upstream release. |
-| Prepare / reopen tests | Restored and adapted | Cloak preference, automatic preparation/rebinding, lost connection, shared profile, idle close, fallback, ownership guard and removal are covered. |
-
-## Live Xiaohongshu results
-
-All website extraction used **unmodified official OpenCLI 1.8.7** in the shared Cloak browser.
-
-- Search `VLA`: 2 items; another search after explicit Chrome import returned 1 item.
-- Read one note: 1 item, 22 characters of text. This is the note's text description; it does not interpret its pictures/video.
-- Read comments: 20 loaded comment/reply records, 456 text characters. This does not establish a complete comment tree. An upstream limit can include loaded replies.
-
-Official 1.8.8 failed the Xiaohongshu default-filter path with `UPSTREAM_BROKEN`. The previous local installation had three changes: a longer wait, skipping default filters and choosing the first duplicate option. All were removed. New installations use tested 1.8.7; 1.8.8 is excluded. **OpenCLI 2.x business access is unverified here.** An incompatible user-owned singleton requires explicit `--allow-upgrade` before replacement.
-
-## Lifecycle corrections found during acceptance
-
-- Cloak's private interpreter does not import the main program's Config/PyYAML. The launcher passes only the necessary runtime settings.
-- The browser proxy bypasses localhost so the OpenCLI extension can reach its local Bridge daemon.
-- A previous Reach-owned Chrome profile crashed Cloak locally. It is preserved as a private `profile-before-cloak-*` backup; the shared profile restores Reach's saved cookies. No personal Chrome profile is moved.
-- Setup removes only the obsolete private MCP transport installed by Reach; user-owned copies remain. BOSS installs its verified upstream commit from an archive, avoiding an extra Git prerequisite; archive-only installation and provenance were checked in a clean temporary environment.
-- The watcher saves session cookies every two seconds and before normal shutdown. Login persistence no longer depends on the user closing the window.
-- Closing one site tab does not terminate the watcher. A shared action lock serializes browser channels; a session lock prevents stale saves racing logout.
-- Old Reach-owned per-site snapshots merge once, only filling missing cookies. Logout/removal cannot automatically restore those old credentials.
-- Windows npm `.cmd` and POSIX package layouts are covered for explicit Bridge import. Windows browser launch/import still needs a separate live acceptance run.
-
-## Validation
-
-- Core tests: **387 passed** on local macOS.
-- The curated source checkout also passed all 387 tests, with local API/research files excluded.
-- Ruff: passed. Mypy: passed, 46 source files.
-- Wheel gate passed: 57 entries, about 148 KiB; Skill references and Xiaoyuzhou present, removed modules and browser binaries absent. Clean-venv smoke test confirmed 14 channels and rejection of the four retired command entries.
-- Installed the candidate wheel locally, ran setup successfully (5/5 defaults), refreshed the installed Skill and confirmed no retired Reach MCP configuration/process. An actual Xiaohongshu search through the installed wheel returned one item in 7.48 seconds.
-- Packaging uses reviewed source files only. Local API prototypes, provider research, account data, browser profiles and downloaded binaries are excluded.
-
-## User acceptance
-
-1. Say “去小红书搜 VLA,再看一篇笔记和评论”. Reuse the shared saved login; do not request a model key.
-2. Close the Reach browser and repeat a search. It should reopen with the same profile.
-3. Handle the BOSS verification manually in the dedicated browser, then run one search; verify JD separately. This is the outstanding platform check.
-4. On a second Windows/Mac machine, install this candidate wheel, run setup, add a browser channel, log in or explicitly import one site, then verify the actual action.
-
-No application, message, post, comment or other platform write was performed during this acceptance.
diff --git a/llms.txt b/llms.txt
index d49d5763..180be99e 100644
--- a/llms.txt
+++ b/llms.txt
@@ -16,7 +16,7 @@
- Output: `{schema_version, ok, channel, action, backend, items, meta, error}`; error codes NEED_SETUP, NEED_LOGIN, UPSTREAM_BROKEN, TIMEOUT, RATE_LIMITED, NOT_FOUND, BAD_INPUT
- Management: `setup`, `add|remove <channel>`, `login|logout <channel>` (the user logs in), `browser setup|status`, `doctor`, `check`, `skill`, `skill link <dir>`, `update`, `configure`, `uninstall`
- `add` installs everything a channel needs (Node.js, OpenCLI, CloakBrowser/Chrome, ffmpeg, browser extension; no admin password); the user only logs in or enters a key. `remove` also clears its login and private tools; default channels can be removed and stay removed across updates.
-- `update` upgrades the program and every added channel's tools to their latest versions (not pinned; known-bad versions excluded) and returns `result.user_actions`. When a newer release exists, any JSON output carries `meta.update = {current, latest, notes}`; tell the user and update only after they agree.
+- `update` upgrades the program and reinstalls every added channel's tools: tools with a tested version stay at that version, others get the newest version inside floor/exclude. It returns `result.user_actions`. When a newer release exists, any JSON output carries `meta.update = {current, latest, notes}`; tell the user and update only after they agree.
- Browser channels share one CloakBrowser profile under ~/.agent-reach/browser/profile (system Chrome on download failure); it opens automatically and closes after 10 idle minutes. Explicit one-time site imports are available; no personal Cookie database is read.
## Channels
diff --git a/tests/test_boss_channel.py b/tests/test_boss_channel.py
index 1c750f43..c6ef7aaf 100644
--- a/tests/test_boss_channel.py
+++ b/tests/test_boss_channel.py
@@ -6,6 +6,7 @@ from agent_reach.channels.boss import BossChannel
def test_ambiguous_upstream_detail_login_signal_is_not_a_login_instruction(monkeypatch):
import pytest
+
from agent_reach.backends import opencli
from agent_reach.runtime.result import ReachError
def broken(*a, **k):
diff --git a/tests/test_manage.py b/tests/test_manage.py
index 352418fb..5a88a144 100644
--- a/tests/test_manage.py
+++ b/tests/test_manage.py
@@ -667,19 +667,15 @@ def test_doctor_separates_needs_login_from_broken(env, monkeypatch):
assert _status("bili") == "needs_login"
-def test_remove_browser_channel_forgets_grants_pending_and_only_its_login(env):
+def test_remove_browser_channel_forgets_grants_and_only_its_login(env):
manage.add("site")
manage.add("site2")
- def seed(data):
- data["reuse_sources"] = {"site":{"profile":"old-source"}, "site2":{"profile":"keep"}}
- data["pending"] = {"a":{"channel":"site"}, "b":{"channel":"site2"}}
- state.mutate(seed)
+ state.mutate(lambda data: data.update(reuse_sources={"site": {"profile": "old-source"}, "site2": {"profile": "keep"}}))
env["calls"].clear()
out = manage.remove("site")
assert out["cleared_cookies"] == 3
assert env["calls"] == [("clear_site", ("site.example",))]
assert state.load()["reuse_sources"] == {"site2":{"profile":"keep"}}
- assert state.load()["pending"] == {"b":{"channel":"site2"}}
def test_setup_reports_legacy_mcp_without_editing_external_configuration(env):
diff --git a/tests/test_public_first.py b/tests/test_public_first.py
index 2178c39e..8f224622 100644
--- a/tests/test_public_first.py
+++ b/tests/test_public_first.py
@@ -7,7 +7,7 @@ import pytest
from agent_reach.channels.linkedin import LinkedInChannel
from agent_reach.channels.web import WebChannel
-from agent_reach.runtime import cli, flow, state
+from agent_reach.runtime import cli, manage, state, tools
from agent_reach.runtime.dispatch import run_action
from agent_reach.runtime.result import ReachError, make_item
@@ -24,11 +24,11 @@ def public_search(monkeypatch):
def test_public_success_never_installs_binds_or_opens_a_browser(monkeypatch, public_search):
from agent_reach.runtime import browser, dispatch
- for module, name in ((flow, "prepare"), (browser, "ensure_running"), (dispatch, "execution_lock")):
+ for module, name in ((manage, "add"), (tools, "ensure"), (browser, "ensure_running"), (dispatch, "execution_lock")):
monkeypatch.setattr(module, name, Mock(side_effect=AssertionError("public query touched browser setup")))
monkeypatch.setattr(LinkedInChannel, "_jobs", Mock(side_effect=AssertionError("used site tool")))
- out = flow.execute("linkedin", "jobs", {"query": "Data Engineer", "location": "深圳", "limit": 2})
- assert out["ok"] and out["backend"] == "public-web" and "operation_id" not in out
+ out = run_action(LinkedInChannel(), "jobs", {"query": "Data Engineer", "location": "深圳", "limit": 2})
+ assert out["ok"] and out["backend"] == "public-web"
query = public_search.call_args.kwargs["query"]
assert "site:linkedin.com/jobs/view/" in query and "深圳" in query
assert out["meta"]["access"]["scope"] == "search_results"
@@ -72,24 +72,19 @@ def test_web_provider_failure_does_not_become_platform_login_or_cooldown(monkeyp
def test_no_hits_or_wrong_scope_only_trigger_site_attempt_not_login(monkeypatch, public_search, rows):
public_search.return_value = rows
monkeypatch.setattr(LinkedInChannel, "_jobs", Mock(side_effect=ReachError("TIMEOUT", "Site timed out")))
- monkeypatch.setattr(flow, "prepare", lambda *a, **k: {"ok": True})
- out = flow.execute("linkedin", "jobs", {"query": "Data"})
+ out = run_action(LinkedInChannel(), "jobs", {"query": "Data"})
assert out["error"]["code"] == "TIMEOUT"
- assert "required_action" not in out and "operation_id" not in out
-def test_actual_site_login_wall_is_resumable_only_after_public_attempt(monkeypatch, public_search):
+def test_actual_site_login_wall_is_reported_only_after_public_attempt(monkeypatch, public_search):
public_search.return_value = []
- calls = []
- def prepare(*args, **kwargs):
- calls.append("prepare")
+ def site(*args, **kwargs):
assert public_search.call_count == 1
- return {"ok": True}
- monkeypatch.setattr(flow, "prepare", prepare)
- monkeypatch.setattr(LinkedInChannel, "_jobs", Mock(side_effect=ReachError("NEED_LOGIN", "Site requires login")))
- out = flow.execute("linkedin", "jobs", {"query": "Data"})
- assert calls == ["prepare"] and out["required_action"]["type"] == "login"
- assert state.load()["pending"][out["operation_id"]]["params"]["query"] == "Data"
+ raise ReachError("NEED_LOGIN", "Site requires login")
+ monkeypatch.setattr(LinkedInChannel, "_jobs", site)
+ out = run_action(LinkedInChannel(), "jobs", {"query": "Data"})
+ assert out["error"]["code"] == "NEED_LOGIN"
+ assert [a["backend"] for a in out["meta"]["attempts"]][-1] == "opencli"
def test_public_read_accepts_full_text_beside_a_login_link(monkeypatch):
@@ -109,14 +104,6 @@ def test_short_public_post_beside_login_link_is_still_usable(monkeypatch):
assert out["ok"] and out["backend"] == "public-web"
-def test_cold_preparation_does_not_consume_the_site_query_deadline(monkeypatch):
- import time
- monkeypatch.setattr(LinkedInChannel, "_jobs", Mock(return_value=[make_item(url=URL)]))
- out = run_action(LinkedInChannel(), "jobs", {"query": "Data"}, only_backend="opencli",
- timeout=0.1, before_backends=lambda: time.sleep(0.2))
- assert out["ok"]
-
-
@pytest.mark.parametrize("title,text", [("LinkedIn", ""), ("Sign in | LinkedIn", TEXT),
("LinkedIn", "Please sign in to continue. " * 8),
("Just a moment", TEXT)])
@@ -159,31 +146,16 @@ def test_new_policy_leaves_comments_subtitles_and_user_search_semantics_unchange
assert not action.public_web, (ch.name, action.name)
-def test_resume_verifies_the_pending_site_path_instead_of_hiding_it_with_index_hits(monkeypatch, public_search):
- public_search.return_value = []
- monkeypatch.setattr(flow, "prepare", lambda *a, **k: {"ok": True})
- site = Mock(side_effect=ReachError("NEED_LOGIN", "Login required"))
- monkeypatch.setattr(LinkedInChannel, "_jobs", site)
- waiting = flow.execute("linkedin", "jobs", {"query": "Data"})
- public_search.return_value = [make_item(url=URL)]
- site.side_effect = None
- site.return_value = [make_item(url=URL, title="Verified site job")]
- state.mutate(lambda saved: saved.get("request_starts", {}).pop("linkedin", None))
- resumed = flow.resume(waiting["operation_id"])
- assert resumed["backend"] == "opencli" and site.call_count == 2
- assert public_search.call_count == 1 and not state.load()["pending"]
-
-
-def test_execute_backend_option_can_request_public_only(monkeypatch, public_search, capsys):
- monkeypatch.setattr(flow, "prepare", Mock(side_effect=AssertionError("unexpected setup")))
- assert cli.main(["execute", "linkedin", "jobs", "--params", '{"query":"Data"}',
- "--backend", "public-web"]) == 0
+def test_backend_option_can_request_public_only(monkeypatch, public_search, capsys):
+ monkeypatch.setattr(manage, "add", Mock(side_effect=AssertionError("unexpected setup")))
+ monkeypatch.setattr(LinkedInChannel, "_jobs", Mock(side_effect=AssertionError("public-only fell back")))
+ assert cli.main(["linkedin", "jobs", "Data", "--backend", "public-web"]) == 0
assert json.loads(capsys.readouterr().out)["backend"] == "public-web"
-def test_invalid_backend_is_rejected_before_setup(monkeypatch, public_search):
- monkeypatch.setattr(flow, "prepare", Mock(side_effect=AssertionError("unexpected setup")))
- out = flow.execute("linkedin", "jobs", {"query": "Data"}, backend="unknown")
+def test_invalid_backend_is_rejected_before_any_access(monkeypatch, public_search):
+ monkeypatch.setattr(LinkedInChannel, "_jobs", Mock(side_effect=AssertionError("unexpected site access")))
+ out = run_action(LinkedInChannel(), "jobs", {"query": "Data"}, only_backend="unknown")
assert out["error"]["code"] == "BAD_INPUT"
public_search.assert_not_called()
diff --git a/tests/test_reach_flow.py b/tests/test_reach_flow.py
deleted file mode 100644
index 30bc3d9d..00000000
--- a/tests/test_reach_flow.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""Deterministic CLI preparation/execution survives removal of the MCP adapter."""
-from unittest.mock import Mock
-
-import pytest
-
-from agent_reach.runtime import flow, state
-from agent_reach.runtime.result import ReachError, envelope
-
-
-def test_execute_prepares_and_runs_the_actual_query_once(monkeypatch):
- prepare = Mock(return_value={"ok": True, "backend": "opencli"})
- def execute(*args, **kwargs):
- kwargs["before_backends"]()
- return envelope(channel="xiaohongshu", action="search", backend="opencli", items=[{"title": "note"}])
- run = Mock(side_effect=execute)
- monkeypatch.setattr(flow, "prepare", prepare)
- monkeypatch.setattr(flow, "run_action", run)
- out = flow.execute("xiaohongshu", "search", {"query": "VLA"})
- assert out["ok"] and run.call_count == prepare.call_count == 1
- assert state.load()["checks"]["xiaohongshu"]["evidence"]["search"]["item_count"] == 1
-
-
-def test_pending_query_resumes_without_a_model_or_running_service(monkeypatch):
- monkeypatch.setattr(flow, "prepare", lambda *a, **k: flow._needs("xiaohongshu", "search", "login", "Log in yourself"))
- waiting = flow.execute("xiaohongshu", "search", {"query": "VLA"})
- token = waiting["operation_id"]
- assert state.load()["pending"][token]["params"]["query"] == "VLA"
- monkeypatch.setattr(flow, "prepare", lambda *a, **k: {"ok": True, "backend": "opencli"})
- monkeypatch.setattr(flow, "run_action", lambda *a, **k: envelope(channel="xiaohongshu", action="search", backend="opencli", items=[{"title": "note"}]))
- assert flow.resume(token)["ok"]
- assert token not in state.load()["pending"]
-
-
[email protected]("params", [{}, {"query": "VLA", "unknown": "x"}, {"query": "VLA", "limit": -1}])
-def test_invalid_execute_cannot_install_or_open_browser(monkeypatch, params):
- monkeypatch.setattr(flow, "prepare", lambda *a, **k: pytest.fail("invalid request triggered setup"))
- with pytest.raises(ReachError):
- flow.execute("xiaohongshu", "search", params)
-
-
-def test_unknown_resume_is_explicit_bad_input():
- with pytest.raises(ReachError, match="Unknown"):
- flow.resume("missing")
-
-
[email protected]("action,params", [("quote", {"symbol": "00700"}), ("search", {"query": "腾讯"})])
-def test_native_public_execute_never_prepares_a_browser_channel(monkeypatch, action, params):
- from agent_reach.channels.xueqiu import XueqiuChannel
- from agent_reach.runtime import browser, manage, tools
- monkeypatch.setattr(manage, "is_added", lambda *a: False)
- monkeypatch.setattr(manage, "add", lambda *a, **k: pytest.fail("public action added browser dependencies"))
- monkeypatch.setattr(browser, "ensure_running", lambda *a, **k: pytest.fail("public action opened browser"))
- monkeypatch.setattr(tools, "ensure", lambda *a, **k: pytest.fail("public quote installed a tool"))
- method = "_tencent_quote" if action == "quote" else "_tencent_search"
- monkeypatch.setattr(XueqiuChannel, method, lambda *a, **k: [{"title": "Tencent"}])
- result = flow.execute("xueqiu", action, params)
- assert result["ok"] and result["backend"] == "tencent"
-
-
-def test_prepare_reuses_only_the_shared_dedicated_browser(monkeypatch):
- from agent_reach.runtime import browser, manage, tools
- monkeypatch.setattr(manage, "is_added", lambda *a: True)
- monkeypatch.setattr(tools, "present", lambda *a: True)
- ready = Mock()
- monkeypatch.setattr(browser, "ensure_running", ready)
- assert not hasattr(browser, "import_session")
- flow.prepare("xiaohongshu")
- assert ready.call_count == 1
- assert not state.load().get("reuse_sources"), "no indefinite export authorization"
-
-
[email protected]("argv", [["ask","find VLA"],["mcp"],["cloak","setup"],["browser","repair-opencli"]])
-def test_retired_commands_are_rejected_without_starting_any_service(argv, monkeypatch, capsys):
- from agent_reach.runtime import browser, cli
- monkeypatch.setattr(browser,"ensure_running",lambda *a,**k:pytest.fail("retired command started browser"))
- assert cli.main(argv) == 1
- import json
- assert json.loads(capsys.readouterr().out)["error"]["code"] == "BAD_INPUT"
diff --git a/tests/test_reddit_channel.py b/tests/test_reddit_channel.py
index c5d887c6..ed389375 100644
--- a/tests/test_reddit_channel.py
+++ b/tests/test_reddit_channel.py
@@ -27,27 +27,25 @@ def test_can_handle_rejects_non_reddit():
def test_unconfigured_browser_is_prepared_without_assuming_login(monkeypatch):
- from agent_reach.runtime import browser, flow
- monkeypatch.setattr(flow.manage, "is_added", lambda *a: True)
- monkeypatch.setattr(flow.tools, "present", lambda *a: True)
+ from agent_reach.runtime import browser, session_reuse
launch = Mock()
monkeypatch.setattr(browser, "ensure_running", launch)
- result = flow.prepare("reddit", action="search")
- assert result["status"] == "prepared" and launch.call_count == 1
- assert "required_action" not in result
+ monkeypatch.setattr(browser, "connected_contexts", lambda: [])
+ monkeypatch.setattr(browser, "bound_context", lambda: None)
+ result = session_reuse.prepare("reddit")
+ assert launch.call_count == 1 and result["copied_cookies"] == 0
+ assert "required_action" not in result and not result.get("blocked")
-def test_actual_login_error_remains_resumable(monkeypatch):
+def test_actual_login_error_is_reported_as_need_login(monkeypatch):
from agent_reach.channels import reddit
- from agent_reach.runtime import flow, state
+ from agent_reach.runtime.dispatch import run_action
from agent_reach.runtime.result import NEED_LOGIN, ReachError
- monkeypatch.setattr(flow, "prepare", lambda *a, **k: {"ok": True, "backend": "opencli"})
request = Mock(side_effect=ReachError(NEED_LOGIN, "Login wall on the selected browser path"))
monkeypatch.setattr(reddit, "opencli_call", request)
- result = flow.execute("reddit", "search", {"query": "DeepSeek"})
+ result = run_action(RedditChannel(), "search", {"query": "DeepSeek"}, only_backend="opencli")
assert request.call_count == 1
- assert result["required_action"]["type"] == "login"
- assert state.load()["pending"][result["operation_id"]]["params"]["query"] == "DeepSeek"
+ assert result["error"]["code"] == NEED_LOGIN
def test_bare_403_is_not_classified_as_login():
diff --git a/tests/test_release_policy.py b/tests/test_release_policy.py
index 1472b86f..55726431 100644
--- a/tests/test_release_policy.py
+++ b/tests/test_release_policy.py
@@ -9,16 +9,15 @@ from agent_reach.runtime import bridge, browser, cdp, manage, state, tools
from agent_reach.runtime.result import ReachError
-def test_cleanup_failure_retains_channel_tools_and_pending_request(monkeypatch):
+def test_cleanup_failure_retains_channel_and_tools(monkeypatch):
from agent_reach.channels.xiaohongshu import XiaoHongShuChannel
ch = XiaoHongShuChannel()
state.mutate(lambda data: data["channels"].update(xiaohongshu={"added_at": state.now()}))
- state.mutate(lambda data: data.update(pending={"id": {"channel": ch.name}}))
monkeypatch.setattr(browser, "clear_site", Mock(side_effect=ReachError("UPSTREAM_BROKEN", "clear failed")))
monkeypatch.setattr(tools, "prune", lambda *a: pytest.fail("pruned before cleanup succeeded"))
with pytest.raises(ReachError, match="clear failed"):
manage.remove(ch.name)
- assert manage.is_added(ch) and "id" in state.load()["pending"]
+ assert manage.is_added(ch)
def test_cleanup_includes_www_and_remembered_subdomains_preserving_other_sites(monkeypatch):
@@ -174,6 +173,7 @@ def test_install_and_uninstall_preserve_preexisting_unrecorded_cache(monkeypatch
def test_temporary_work_is_private_recorded_and_removed_on_failure():
from pathlib import Path
+
from agent_reach.utils.paths import private_temporary_directory
with pytest.raises(RuntimeError, match="work failed"):
with private_temporary_directory("test-") as tmp:
diff --git a/tests/test_search_harness.py b/tests/test_search_harness.py
index 8bc4da89..2e5c6dae 100644
--- a/tests/test_search_harness.py
+++ b/tests/test_search_harness.py
@@ -221,16 +221,6 @@ def test_direct_dispatch_cannot_bypass_confirmed_platform_cooldown():
ch.first.assert_not_called()
-def test_prepared_backend_is_first_and_can_still_fall_back():
- ch = SearchChannel()
- ch.first = Mock(return_value=[{"title": "first"}])
- ch.second = Mock(return_value=[{"title": "selected"}])
- assert run_action(ch, "search", {"query": "x"}, preferred_backend="second")["backend"] == "second"
- ch.first.assert_not_called()
- ch.second = Mock(side_effect=ReachError("TIMEOUT", "failed"))
- assert run_action(ch, "search", {"query": "x"}, preferred_backend="second")["backend"] == "first"
-
-
def test_browser_pacing_respects_budget_without_claiming_platform_rate_limit(monkeypatch):
from agent_reach.runtime import dispatch
diff --git a/tests/test_unified_entry.py b/tests/test_unified_entry.py
index 47831cdc..b059a8aa 100644
--- a/tests/test_unified_entry.py
+++ b/tests/test_unified_entry.py
@@ -564,11 +564,28 @@ def test_login_opens_site_in_dedicated_browser(capsys, monkeypatch, fake_browser
login_url = "https://example.test/login"
monkeypatch.setattr(unified, "get_all_channels", lambda: [BrowserChannel()])
+ from agent_reach.runtime import manage
+ added = []
+ # Hermetic: no check of the real OpenCLI install on this machine.
+ monkeypatch.setattr(manage, "add", lambda name, **k: added.append(name))
code, out = _run(capsys, ["login", "web2"])
assert code == 0
+ assert added == ["web2"]
assert fake_browser["opened"] == ["https://example.test/login"]
[email protected]("argv", [["ask", "find VLA"], ["mcp"], ["cloak", "setup"], ["browser", "repair-opencli"],
+ ["ensure", "xiaohongshu"],
+ ["execute", "xiaohongshu", "search", "--params", '{"query":"VLA"}'],
+ ["resume", "op_x"]])
+def test_retired_commands_are_rejected_without_starting_any_service(argv, monkeypatch, capsys):
+ from agent_reach.runtime import browser, manage
+ monkeypatch.setattr(browser, "ensure_running", lambda *a, **k: pytest.fail("retired command started browser"))
+ monkeypatch.setattr(manage, "add", lambda *a, **k: pytest.fail("retired command installed tools"))
+ code, out = _run(capsys, argv)
+ assert code == 1 and out["error"]["code"] == "BAD_INPUT"
+
+
@pytest.mark.parametrize(
"yaml_text, code",
[
diff --git a/tests/test_web_channel.py b/tests/test_web_channel.py
index e5553fe9..f75ea735 100644
--- a/tests/test_web_channel.py
+++ b/tests/test_web_channel.py
@@ -48,6 +48,7 @@ def test_exa_never_loops_after_two_truncated_reads():
def test_exa_does_not_retry_http_limits_or_access_denials():
import urllib.error
+
from agent_reach.channels.web import _exa_call
for code in (429, 403):
with patch("agent_reach.channels.web.http_request", side_effect=urllib.error.HTTPError("https://mcp.exa.ai/mcp", code, "denied", {}, None)) as request:
diff --git a/tests/test_xiaohongshu_comments.py b/tests/test_xiaohongshu_comments.py
index d498f5b1..e5e1047f 100644
--- a/tests/test_xiaohongshu_comments.py
+++ b/tests/test_xiaohongshu_comments.py
@@ -47,9 +47,8 @@ def test_opencli_comments_keep_replies_and_explicit_scope(monkeypatch):
def test_comments_validate_before_prepare(monkeypatch):
- from agent_reach.runtime import flow
- from agent_reach.runtime.result import ReachError
- monkeypatch.setattr(flow, "prepare", lambda *a, **k: pytest.fail("unexpected setup"))
- with pytest.raises(ReachError) as caught:
- flow.execute("xiaohongshu", "comments", {"target": "invalid", "limit": 999})
- assert caught.value.code == "BAD_INPUT"
+ from agent_reach.runtime import browser, manage, session_reuse
+ for module, name in ((manage, "add"), (browser, "ensure_running"), (session_reuse, "prepare")):
+ monkeypatch.setattr(module, name, lambda *a, **k: pytest.fail("unexpected setup"))
+ result = run_action(XiaoHongShuChannel(), "comments", {"target": "invalid", "limit": 999})
+ assert result["error"]["code"] == "BAD_INPUT"