|
|
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 |
|
|
|
68b9604598
|
refactor: update bindings to match CF resource names
KV binding: claude_status, Queue binding: claude-status.
Real KV namespace ID configured with remote flag.
|
2026-04-08 23:23:32 +07:00 |
|
|
|
b3d1f5acb4
|
fix: rename KV binding to CLAUDE_STATUS and fix threadId nullish check
- Rename KV binding SUBSCRIBERS → CLAUDE_STATUS for consistent naming
- Fix || null → ?? null to preserve threadId 0 (General topic)
- Update KV namespace creation command in README
|
2026-04-08 23:14:26 +07:00 |
|
|
|
41bdcf36ef
|
refactor: rename queue to claude-status and remove KV key prefix
Namespace provides scoping, prefix on KV key is redundant.
|
2026-04-08 23:09:02 +07:00 |
|
|
|
01320abacd
|
feat: implement Telegram bot for Claude status webhooks
Cloudflare Workers bot that forwards status.claude.com (Atlassian
Statuspage) incident and component updates to subscribed Telegram
users via CF Queues fan-out.
- Hono.js routing with grammY webhook handler
- Bot commands: /start, /stop, /status, /subscribe
- Supergroup topic support (message_thread_id)
- KV store with claude-status: prefix and composite keys
- Queue consumer with batch send, 403 auto-removal, 429 retry
- Timing-safe webhook secret validation
- HTML escaping for Telegram messages
|
2026-04-08 22:59:37 +07:00 |
|