3 Commits

Author SHA1 Message Date
500c9c83ee feat: add /info command to show chat ID and subscription status 2026-04-09 12:16:45 +07:00
fce23b3c59 refactor: make setup script interactive instead of using env vars 2026-04-09 09:02:54 +07:00
b728ae7d38 refactor: per-subscriber KV keys, HMAC verification, cron trigger
Major refactor addressing scalability, security, and reliability:

- KV schema: single-key → per-subscriber keys (sub:{chatId}:{threadId})
  eliminates read-modify-write race conditions
- Component-specific subscriptions: /subscribe component <name>
- HMAC-SHA256 webhook verification with URL secret fallback
- Cron trigger (every 5 min) polls status.claude.com as safety net
- Shared telegram-api.js module (DRY fix)
- Error logging in all catch blocks
- Migration endpoint for existing subscribers
- Setup moved to standalone script (scripts/setup-bot.js)
- Removed setup HTTP route to reduce attack surface
2026-04-09 00:43:07 +07:00