rename: Agent Eyes → Agent Reach

全局重命名:
- 包名: agent_eyes → agent_reach
- CLI: agent-eyes → agent-reach
- 类名: AgentEyes → AgentReach
- 显示名: Agent Eyes → Agent Reach
- GitHub: Panniantong/agent-eyes → Panniantong/Agent-Reach

所有 36 个测试通过,CLI/doctor/read/search 全部正常。
This commit is contained in:
Panniantong
2026-02-24 10:25:46 +01:00
parent 4b0ae20fd7
commit 5c62a21f32
38 changed files with 251 additions and 251 deletions
+5 -5
View File
@@ -4,8 +4,8 @@
import pytest
from unittest.mock import patch, MagicMock
from agent_eyes.channels import get_channel_for_url, get_channel, get_all_channels
from agent_eyes.channels.base import ReadResult, SearchResult
from agent_reach.channels import get_channel_for_url, get_channel, get_all_channels
from agent_reach.channels.base import ReadResult, SearchResult
class TestChannelRouting:
@@ -74,7 +74,7 @@ class TestSearchResult:
class TestGitHubChannel:
@patch("agent_eyes.channels.github.requests.get")
@patch("agent_reach.channels.github.requests.get")
@pytest.mark.asyncio
async def test_search(self, mock_get):
mock_resp = MagicMock()
@@ -93,10 +93,10 @@ class TestGitHubChannel:
class TestExaSearch:
@patch("agent_eyes.channels.exa_search.requests.post")
@patch("agent_reach.channels.exa_search.requests.post")
@pytest.mark.asyncio
async def test_search(self, mock_post):
from agent_eyes.config import Config
from agent_reach.config import Config
config = Config(config_path="/tmp/test-exa-config.yaml")
config.set("exa_api_key", "test-key")
+7 -7
View File
@@ -1,29 +1,29 @@
# -*- coding: utf-8 -*-
"""Tests for Agent Eyes CLI."""
"""Tests for Agent Reach CLI."""
import pytest
from unittest.mock import patch
from agent_eyes.cli import main
from agent_reach.cli import main
class TestCLI:
def test_version(self, capsys):
with pytest.raises(SystemExit) as exc_info:
with patch("sys.argv", ["agent-eyes", "version"]):
with patch("sys.argv", ["agent-reach", "version"]):
main()
assert exc_info.value.code == 0
captured = capsys.readouterr()
assert "Agent Eyes v" in captured.out
assert "Agent Reach v" in captured.out
def test_no_command_shows_help(self, capsys):
with pytest.raises(SystemExit) as exc_info:
with patch("sys.argv", ["agent-eyes"]):
with patch("sys.argv", ["agent-reach"]):
main()
assert exc_info.value.code == 0
def test_doctor_runs(self, capsys):
with patch("sys.argv", ["agent-eyes", "doctor"]):
with patch("sys.argv", ["agent-reach", "doctor"]):
main()
captured = capsys.readouterr()
assert "Agent Eyes" in captured.out
assert "Agent Reach" in captured.out
assert "" in captured.out
+2 -2
View File
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
"""Tests for Agent Eyes config module."""
"""Tests for Agent Reach config module."""
import os
import tempfile
@@ -8,7 +8,7 @@ from pathlib import Path
import pytest
import yaml
from agent_eyes.config import Config
from agent_reach.config import Config
@pytest.fixture
+6 -6
View File
@@ -1,18 +1,18 @@
# -*- coding: utf-8 -*-
"""Tests for AgentEyes core class."""
"""Tests for AgentReach core class."""
import pytest
from agent_eyes.config import Config
from agent_eyes.core import AgentEyes
from agent_reach.config import Config
from agent_reach.core import AgentReach
@pytest.fixture
def eyes(tmp_path):
config = Config(config_path=tmp_path / "config.yaml")
return AgentEyes(config=config)
return AgentReach(config=config)
class TestAgentEyes:
class TestAgentReach:
def test_init(self, eyes):
assert eyes.config is not None
@@ -33,4 +33,4 @@ class TestAgentEyes:
def test_doctor_report(self, eyes):
report = eyes.doctor_report()
assert isinstance(report, str)
assert "Agent Eyes" in report
assert "Agent Reach" in report
+3 -3
View File
@@ -2,8 +2,8 @@
"""Tests for doctor module."""
import pytest
from agent_eyes.config import Config
from agent_eyes.doctor import check_all, format_report
from agent_reach.config import Config
from agent_reach.doctor import check_all, format_report
@pytest.fixture
@@ -31,6 +31,6 @@ class TestDoctor:
def test_format_report(self, tmp_config):
results = check_all(tmp_config)
report = format_report(results)
assert "Agent Eyes" in report
assert "Agent Reach" in report
assert "" in report
assert "渠道可用" in report