configs/default.toml (开发环境), configs/production.toml (生产环境)claude-agent/ ├── src/claude_agent/ # 源代码 │ ├── core/ # 核心功能 │ ├── cli/ # 命令行界面 │ ├── sshout/ # SSHOUT集成 │ ├── mcp/ # MCP工具支持 │ └── utils/ # 工具函数 ├── tests/ # 测试套件 │ ├── unit/ # 单元测试 │ ├── integration/ # 集成测试 │ └── blackbox/ # 黑盒测试 ├── docs/ # 项目文档 ├── scripts/ # 启动脚本 ├── configs/ # 配置文件 └── assets/ # 资源文件
anthropic: Claude API客户端click: 命令行界面框架rich: 美观的终端输出prompt-toolkit: 增强CLI输入处理paramiko: SSH连接支持pytest: 测试框架asyncio: 异步编程支持tomli/tomli-w: TOML配置文件处理TEST_REAL_SSHOUT=1)TEST_SSHOUT_AUTH=1).coveragerc配置文件排除测试文件src/claude_agent目录下的源代码*/tests/*, */test_*, tests/*# 激活虚拟环境 source venv/bin/activate # 1. 运行所有单元测试(明确指定目录避免pytest扫描问题) python -m pytest tests/unit/storage/ tests/unit/telegram/ tests/unit/test_cli/ tests/unit/test_utils/ tests/unit/test_mcp/ -v # 2. 运行单元测试并检查覆盖率 python -m pytest tests/unit/storage/ tests/unit/telegram/ tests/unit/test_cli/ tests/unit/test_utils/ tests/unit/test_mcp/ --cov=src/claude_agent --cov-report=term # 3. 运行单元测试并检查详细覆盖率(显示未覆盖行) python -m pytest tests/unit/storage/ tests/unit/telegram/ tests/unit/test_cli/ tests/unit/test_utils/ tests/unit/test_mcp/ --cov=src/claude_agent --cov-report=term-missing # 4. 运行特定模块测试 python -m pytest tests/unit/telegram/ -v --cov=src/claude_agent/telegram --cov-report=term python -m pytest tests/unit/storage/ -v --cov=src/claude_agent/storage --cov-report=term # 5. 运行集成测试 python -m pytest tests/integration/ -v # 6. 运行黑盒测试 python -m pytest tests/blackbox/ -v # 7. 运行实际连接测试 (可选) TEST_REAL_SSHOUT=1 python -m pytest tests/integration/test_sshout_real_connection.py::TestSSHOUTConnectionReal::test_real_ssh_connection -v # 8. 运行SSH认证黑盒测试 (可选,需要实际SSH认证) TEST_SSHOUT_AUTH=1 python -m pytest tests/blackbox/test_ssh_authentication.py -v # 9. 检查配置文件完整性 python -c "from src.claude_agent.utils.config import get_config_manager; print('✅ 配置加载成功')" # 注意:避免使用 'python -m pytest tests/unit/' 命令,该命令会因pytest目录扫描机制卡住 # 始终使用明确的目录路径列表来避免扫描.pyc缓存文件导致的进程卡死问题
[sshout] mention_patterns = ["@Claude", "@claude", "Claude:", "claude,"] [sshout.server] hostname = "tianjin1.rivoreo.one" # SSHOUT服务器地址 port = 22333 # SSH端口 username = "sshout" # 登录用户名 [sshout.ssh_key] private_key_path = "assets/ssh-keys/id_ecdsa_sshout_test" # SSH私钥路径 timeout = 10 # 连接超时(秒) [sshout.message] max_history = 100 # 消息历史保留数量 context_count = 5 # 上下文消息收集数量 max_reply_length = 200 # 回复消息最大长度
README.md: 项目概述和使用指南FINAL_DELIVERY_REPORT.md: 完整交付报告详细开发历程请参考: DEVELOPMENT_HISTORY.md
本项目严格遵循 Google 的提交信息规范,所有commit message必须使用英文编写。
Rivoreo AutoPilot autopilot@rivoreo.one
<type>(<scope>): <subject> <body> <footer>
feat(sshout): implement @autopilot mention detection with regex patterns Add intelligent @autopilot detection system that supports multiple mention formats including @autopilot, @autopilot, Autopilot:, and autopilot, patterns. The system uses configurable regex patterns from TOML configuration. Features: - Multi-format mention detection - Case-insensitive matching - Chinese punctuation support - Configurable mention patterns via TOML Breaking Change: Old hardcoded mention patterns are replaced with configuration-driven approach. Closes #123 🤖 Generated with Rivoreo AutoPilot Authored-By: Rivoreo AutoPilot <autopilot@rivoreo.one>
注意: 本文档记录了完整的开发需求和实现过程,可作为后续维护和扩展的参考依据。