Arne Moor
|
a67243dd49
|
fix: session management and Telegram message formatting
- Fix /new command session creation by checking isNewSession flag
- Add timestamp prefix to Telegram messages matching WhatsApp format
- Add reply logging for Telegram matching WhatsApp behavior
- Move think level token extraction before bodyPrefix to avoid false matches
- Update agent specs (claude, gemini, opencode) to send identity on new sessions
- Pass sessionIntro in command context for proper agent initialization
|
2025-12-06 02:27:37 +01:00 |
|
Arne Moor
|
69608fd305
|
feat: add telegram provider with CLI integration
Add Telegram as a third messaging provider alongside web and twilio.
Core Features:
- Interactive login flow with phone/SMS/2FA authentication
- Send text and media messages (images, videos, audio, documents)
- Monitor incoming messages with auto-reply support
- Session management at ~/.clawdis/telegram/session/
- Full CLI integration (login, logout, status, send, relay commands)
Implementation Details:
- Uses telegram npm package for MTProto API access
- Supports both URL and local file media sending
- Cross-platform path handling (Windows/Unix)
- Optional Twilio env vars (supports Telegram-only usage)
- Minimal provider abstraction pattern
- Comprehensive test coverage (440 tests passing)
Changes:
- Add Telegram module (client, login, monitor, inbound, outbound, session)
- Add provider factory and base interfaces
- Wire Telegram functions into CLI deps
- Update env validation to make Twilio fields optional
- Add telegram to all CLI commands (login, logout, status, send, relay)
- Add null checks in Twilio code for optional env fields
- Fix send command to properly load session and connect
- Add local file support with cross-platform path handling
- Update login message to show correct ~/.clawdis path
- Add comprehensive tests and documentation
Basic Usage:
warelay login --provider telegram
warelay send --provider telegram --to "@user" --message "Hi"
warelay send --provider telegram --to "@user" --media "/path/to/file.jpg"
warelay relay --provider telegram
All tests pass (63 files, 440 tests). Zero TypeScript errors.
|
2025-12-05 18:59:38 +01:00 |
|