Commit Graph

8 Commits

Author SHA1 Message Date
JessyTsui b14f95d821
Telegram&Line support (#17)
* feat: Add LINE and Telegram messaging support

This major enhancement extends Claude Code Remote with multi-platform messaging support:

## 🚀 New Features

### LINE Messaging Support
- LINE Bot API integration with token-based commands
- Secure webhook handler with signature verification
- Session management with 24-hour expiration
- Support for both individual and group chats
- User/Group ID whitelist security

### Telegram Bot Support
- Telegram Bot API with interactive buttons
- Slash command support (/cmd TOKEN command)
- Callback query handling for better UX
- Group and private chat support
- Chat ID-based authorization

### Multi-Platform Architecture
- Unified notification system supporting all platforms
- Platform-agnostic session management
- Configurable channel enabling/disabling
- Parallel webhook server support

## 🛠️ Technical Implementation

### Core Components
- `src/channels/line/` - LINE messaging implementation
- `src/channels/telegram/` - Telegram bot implementation
- `src/utils/controller-injector.js` - Command injection utility
- Multi-platform webhook servers with Express.js

### Configuration & Documentation
- Updated `.env.example` with all platform options
- Comprehensive setup guides for each platform
- Testing guide with ngrok instructions
- Updated README with multi-platform support

### Developer Experience
- npm scripts for easy platform startup
- Unified webhook launcher (`start-all-webhooks.js`)
- Individual platform launchers
- Enhanced error handling and logging

## 🔧 Usage Examples

**Telegram:** `/cmd ABC12345 analyze this code`
**LINE:** `Token ABC12345 analyze this code`
**Email:** Reply to notification emails

## 📋 Backward Compatibility
- All existing email functionality preserved
- Configuration migration path provided
- No breaking changes to existing hooks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Complete Telegram Remote Control System with Direct Chat Mode

### 🚀 Major Features Added
- **Direct Chat Mode**: Users can chat with Claude naturally without /cmd tokens
- **Smart Monitoring**: Intelligent response detection with historical processing
- **One-Click Startup**: Complete system management via startup script
- **Auto-Notification**: Real-time Claude response detection and Telegram delivery

### 📱 Telegram Integration
- `telegram-direct-mode.js`: Direct conversation interface
- `telegram-polling.js`: Command polling with token validation
- Enhanced notification system with markdown formatting

### 🧠 Smart Monitoring System
- `smart-monitor.js`: Advanced response detection with history awareness
- `simple-monitor.js`: Lightweight monitoring alternative
- `auto-notification-daemon.js`: Background notification service

### 🛠️ System Management
- `start-telegram-claude.sh`: Complete service management script
- Environment validation and dependency checking
- Color-coded status reporting and log management
- Process lifecycle management (start/stop/restart/status)

### 📖 Documentation & Testing
- `TELEGRAM_CLAUDE_GUIDE.md`: Comprehensive user guide
- Complete test suite for all components
- Usage examples and troubleshooting guide

### 🔧 Core Improvements
- Enhanced `controller-injector.js` with proper Enter key handling
- Updated `tmux-monitor.js` with real-time output monitoring
- Improved error handling and logging throughout
- Session management with automatic cleanup

### 🎯 Key Capabilities
- **Seamless Communication**: Direct Telegram ⟷ Claude integration
- **Full Automation**: No manual intervention required
- **Robust Monitoring**: Never miss Claude responses
- **Easy Deployment**: Single script startup and management
- **Multi-Modal Support**: Ready for LINE integration expansion

### 📊 System Architecture
```
User → Telegram Bot → Direct Injection → Claude Session → Smart Monitor → Auto Notification → User
```

This completes the transformation from email-based to messaging-app-based remote Claude control,
providing a modern, efficient, and user-friendly interface for remote AI interaction.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: Enhance documentation and smart monitoring system

- Add comprehensive CLAUDE.md for Claude Code development guidance
- Update README.md with multi-platform focus and improved instructions
- Enhance smart-monitor.js with auto-approval for tool permissions
- Improve start-telegram-claude.sh with better tmux session management
- Add auto-approver.js for automated tool permission handling

Key improvements:
- Multi-platform documentation (Telegram, LINE, Email, Local)
- Enhanced troubleshooting and command reference sections
- Smart monitoring with historical response detection
- Automated tool permission approval workflow
- Better tmux integration and session management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: Add CLAUDE.md to .gitignore and remove from tracking

- Add CLAUDE.md to .gitignore under "Claude Code development files" section
- Remove CLAUDE.md from git tracking while preserving local file
- CLAUDE.md should remain as local development documentation only

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Complete Telegram integration with multi-channel notifications

-  Enhanced Telegram bot with smart buttons for personal/group chats
-  Multi-channel notification system (Desktop, Telegram, Email, LINE)
-  Smart sound alerts with customizable audio feedback
-  Real-time command injection with tmux session management
-  Intelligent session detection and conversation content extraction
-  Unified README documentation with complete setup guides
- 🧹 Clean up legacy files and consolidate documentation
- 📱 Add setup scripts for easy Telegram configuration
- 🔧 Enhance webhook system with improved error handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update processed messages

---------

Co-authored-by: laihenyi <henyi@henyi.org>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: laihenyi <laihenyi@users.noreply.github.com>
2025-08-02 04:21:26 +08:00
panda 5ddda6217e Complete rebrand from TaskPing to Claude-Code-Remote
- Update project name and metadata in package.json and package-lock.json
- Rename all CLI classes and main entry points
- Fix email notification sender from "TaskPing Notification System" to "Claude-Code-Remote Notification System"
- Update email subject headers from [TaskPing #token] to [Claude-Code-Remote #token]
- Rebrand daemon service and all console output messages
- Update configuration managers and installation scripts
- Modify notification channels and test templates
- Update GitHub repository URLs and author information
- Fix all remaining TaskPing references in codebase

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 02:21:38 +08:00
panda d5c7da85b5 Major improvements and bug fixes
- Fix package.json scripts to resolve npm install issues
- Comprehensive README update with detailed setup instructions
- Support for three running modes (desktop, email, full remote control)
- Complete usage workflow and troubleshooting guide
- Fix multiline email content parsing (preserve line breaks)
- Update session mapping path configuration
- Enhanced email command injection with multiline support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 22:28:44 +08:00
panda 5d7601f593 Convert entire project to English version
- Translated all Chinese comments and documentation to professional English
- Converted all console messages and user interface text to English
- Updated README.md with comprehensive English documentation
- Translated configuration files and templates to English
- Converted error messages and status indicators to English
- Maintained all functionality while improving international accessibility
- Used consistent technical terminology throughout the codebase

Major changes:
- README.md: Complete English rewrite with detailed usage instructions
- All .js files: Chinese comments → English technical documentation
- Configuration files: Chinese labels → English descriptions
- User messages: Chinese prompts → English user interface
- Error handling: Chinese errors → English error messages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 17:17:15 +08:00
panda 9d180fca79 修正邮件架构:服务端统一使用飞书邮箱,用户邮箱可配置
正确的邮件流程:
- 服务端:noreply@pandalla.ai (发送+接收)
- 用户端:jiaxicui446@gmail.com (接收通知)
- 回复路径:任意邮箱 → noreply@pandalla.ai → 系统处理

优势:
- 服务端邮箱统一管理
- 用户可用任意邮箱接收通知
- 支持多邮箱品牌回复命令
- 配置简单,维护容易

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 03:09:38 +08:00
panda be9eb49734 配置邮件账号并添加测试工具
- 配置飞书邮箱发件 (noreply@pandalla.ai)
- 配置 Gmail 收件 (jiaxicui446@gmail.com)
- 添加邮件配置更新脚本
- 添加邮件发送测试工具
- 创建快速配置指南
- 更新 npm 脚本命令

现在可以:
1. 通过飞书邮箱发送通知
2. 在 Gmail 接收通知
3. 回复邮件控制 Claude Code

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 02:49:07 +08:00
panda ba4a6343aa 实现邮件回复到 Claude Code CLI 的 PTY 模式
- 基于 relay-injection.md 方案一实现
- 使用 node-pty 管理 Claude Code 进程
- 支持从邮件回复中提取命令并注入到 CLI
- 添加完整的测试工具和使用文档
- 支持多种邮件格式和命令输入方式

功能特性:
- 邮件监听和命令提取
- PTY 进程管理和命令注入
- 会话管理和过期控制
- 安全验证(发件人白名单)
- 详细的日志和错误处理

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 02:34:32 +08:00
panda 45576e5a3e Add TaskPing project files
- Initial project structure with documentation
- Email automation and notification system
- Claude command integration
- Configuration management system
- Daemon process for task monitoring
- Multi-channel notification support (email, desktop)
- Session data storage
- Development and deployment scripts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 02:22:12 +08:00