feat(experience): one-liner install/update docs catch up + version-watching skill
The one-liner entry docs were untouched by the backend upgrade — new users following "帮我安装 Agent Reach" would still get the old world. Now: - docs/install.md: xiaohongshu section rewritten (desktop OpenCLI with the one manual extension click / server xiaohongshu-mcp with QR + 150MB first-run warning / legacy xhs-cli kept as fallback); Reddit section says plainly there is no zero-config path; optional-channel menu gains OpenCLI; upstream table matches the new routing with a doctor --json pointer - docs/update.md: full rewrite — upgrade-only-what-exists tool refresh (incl. npm update for OpenCLI/mcporter, pinned git source for rdt-cli), one-time OpenCLI offer for desktops, skill sync now rides doctor's auto-sync instead of an inline python blob, WeChat-era content removed - check-update / watch: "update available" now leads with the one-liner (帮我更新 Agent Reach:<update.md>) which updates package + tools + skill; bare pip stays as the package-only alternative - fix: version compare was `!=` — a local build AHEAD of the latest release (installed from main during a release window) was told to "update" into a downgrade; now semantic tuple compare with fallback (+4 tests) - skill (zh+en): description gains a NOT-for boundary (fetch-only, no write ops, defer to dedicated skills); new standing rule — after substantial tasks run check-update and append a one-liner update hint to the wrap-up, never interrupting or nagging - SKILL_en.md restructured to the same three-layer skeleton as the Chinese version (124-line body, shared references/) instead of a 263-line everything-inline page Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -183,3 +183,19 @@ class TestCheckUpdateRetry:
|
||||
assert result == "error"
|
||||
assert "网络超时" in captured.out
|
||||
assert "已重试 3 次" in captured.out
|
||||
|
||||
|
||||
class TestVersionCompare:
|
||||
def test_newer_remote_triggers_update(self):
|
||||
assert cli._is_newer_version("1.5.0", "1.4.2") is True
|
||||
|
||||
def test_equal_versions_no_update(self):
|
||||
assert cli._is_newer_version("1.5.0", "1.5.0") is False
|
||||
|
||||
def test_local_ahead_of_release_no_downgrade_prompt(self):
|
||||
"""发版窗口期本地装了 main(更新)时,不能提示"有更新"诱导降级。"""
|
||||
assert cli._is_newer_version("1.4.2", "1.5.0") is False
|
||||
|
||||
def test_unparseable_falls_back_to_inequality(self):
|
||||
assert cli._is_newer_version("2026.06-beta", "1.5.0") is True
|
||||
assert cli._is_newer_version("1.5.0", "1.5.0-dev") is True
|
||||
|
||||
Reference in New Issue
Block a user