| commit | 7cfd7b709747b3a5c67cbc80627beaf269bddfcf | [log] [download] |
|---|---|---|
| author | Rivoreo AutoPilot <autopilot@rivoreo.one> | Sat Oct 04 14:50:04 2025 +0800 |
| committer | Rivoreo AutoPilot <autopilot@rivoreo.one> | Sat Oct 04 14:50:04 2025 +0800 |
| tree | 32c517049d8b12123330b92315a046377412d118 | |
| parent | 40432c9cb04942456bf786486a635bbd6c6da2a4 [diff] |
docs: reorganize project documentation and update to v2.3.0 status Comprehensive documentation restructuring for October 4th, 2025 release: ## Documentation Organization: - Move all markdown files from root to docs/ directory (except CLAUDE.md) - Create categorized directory structure: * user-guides/ - End-user guides and tutorials * technical/ - Technical implementation docs * reports/ - Project reports and test results * development/ - Development process docs - Add docs/README.md as navigation index ## Content Updates: - Update project name to "Rivoreo Agent - 智能AI聊天助手" - Refresh all version references to v2.3.0 - Update test statistics to 461/461 tests passing (100%) - Update code coverage to 89% overall - Set completion date to 2025-10-04 ## Major Documentation Changes: - Consolidate README.md as main project documentation - Merge duplicate Telegram documentation - Update FINAL_DELIVERY_REPORT.md with latest achievements - Reorganize 15 documentation files into logical categories ## Test Structure Improvements: - Reorganize test directory structure (tests/unit/test_* -> tests/unit/*) - Add new test files for core functionality and webhook integration - Remove redundant test files - Add coverage testing script The project is now production-ready with comprehensive documentation suitable for Rivoreo community deployment.
基于Claude Code SDK的智能AI聊天助手系统,专为Rivoreo社区设计,支持CLI交互、Telegram Bot、SSHOUT聊天室集成和多种AI交互模式。
rivoreo-agent/ ├── src/claude_agent/ # 核心源代码 │ ├── core/ # AI Agent核心逻辑 │ ├── telegram/ # Telegram Bot模块 (完整功能) │ ├── cli/ # 命令行界面 │ ├── sshout/ # SSHOUT聊天室集成 │ ├── mcp/ # MCP工具框架 │ ├── webhook/ # Webhook API系统 │ ├── storage/ # 持久化存储 │ └── utils/ # 通用工具模块 ├── tests/ # 461个测试用例 (100%通过) ├── scripts/ # 启动脚本和工具 ├── configs/ # 配置文件模板 ├── docs/ # 完整项目文档 ├── data/ # 运行时数据存储 └── run/ # 专用运行环境
# 激活虚拟环境 source venv/bin/activate # 验证依赖安装 pip install -r requirements.txt
# 配置Bot Token (configs/local.toml) [telegram] bot_token = "YOUR_BOT_TOKEN" allowed_users = [YOUR_USER_ID] # 启动Telegram Bot cd run/telegrambot ./start_telegrambot.sh
# 基础CLI python scripts/main.py # 增强CLI (支持历史翻查和补全) python scripts/main_enhanced.py
# 配置SSH连接 (configs/default.toml) [sshout] mention_patterns = ["@Claude", "@claude"] # 启动SSHOUT集成 python scripts/main_enhanced.py --sshout
| 模块 | 测试数量 | 通过率 | 覆盖率 |
|---|---|---|---|
| Telegram | 150+ | 100% | 74% |
| Core Agent | 90+ | 100% | 83% |
| Storage | 80+ | 100% | 84% |
| Utils/CLI | 70+ | 100% | 76% |
| SSHOUT/MCP | 60+ | 100% | 70% |
[telegram] bot_token = "BOT_TOKEN" # Telegram Bot Token allowed_users = [123456] # 允许的用户ID列表 allowed_groups = [-1001234567] # 允许的群组ID列表 [telegram.message] stream_update_interval = 1.0 # 流式消息更新间隔 max_message_length = 4096 # 最大消息长度 context_history_limit = 50 # 上下文历史保留数量 [telegram.files] max_file_size_mb = 20 # 最大文件大小 temp_dir = "temp/telegram" # 临时文件目录
[sshout] mention_patterns = ["@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" timeout = 10 # 连接超时
# 1. 环境配置 export CLAUDE_CONFIG=production export ANTHROPIC_API_KEY="your_api_key" # 2. 配置生产配置文件 cp configs/default.toml configs/production.toml # 编辑 configs/production.toml # 3. 启动服务 python scripts/start_telegram_bot.py
# 构建镜像 docker build -t claude-agent . # 运行容器 docker run -d --name claude-bot \ -e ANTHROPIC_API_KEY=your_key \ -v ./configs:/app/configs \ -v ./data:/app/data \ claude-agent
Bot Token无效
❌ 请配置有效的Telegram Bot Token
解决: 检查 configs/local.toml 中的 bot_token 配置
权限被拒绝
❌ 用户无权限访问
解决: 将用户/群组ID添加到白名单
SSH连接失败
❌ SSHOUT连接失败
解决: 检查SSH密钥权限和网络连通性
消息格式错误
❌ Markdown解析错误
解决: 已修复Markdown清理机制,自动处理格式问题
# 查看Telegram Bot日志 tail -f logs/telegram_bot.log # 查看系统资源使用 htop | grep python # 检查存储使用情况 du -sh data/storage/
# 1. Fork项目并创建功能分支 git checkout -b feature/new-feature # 2. 开发和测试 python -m pytest tests/ -v # 3. 代码检查 python -m pytest tests/ --cov=src/claude_agent --cov-report=term # 4. 提交Pull Request git commit -m "feat: add new feature" git push origin feature/new-feature
MIT License - 详见 LICENSE 文件
⚠️ 重要提醒: 请勿将包含真实Bot Token和API密钥的配置文件提交到版本控制系统。
🎉 项目成就: Rivoreo Agent已成功演进为功能完整、测试完备、生产就绪的企业级智能AI聊天助手系统!