ctb 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/docs/plans/2026-02-01-performance-reliability-improvements.md +1038 -0
- package/package.json +1 -1
- package/src/__tests__/errors.test.ts +60 -0
- package/src/__tests__/events.test.ts +43 -0
- package/src/__tests__/session.test.ts +73 -0
- package/src/__tests__/telegram-api.test.ts +80 -0
- package/src/errors.ts +58 -0
- package/src/events.ts +57 -0
- package/src/handlers/streaming.ts +23 -27
- package/src/handlers/text.ts +2 -1
- package/src/index.ts +34 -16
- package/src/session.ts +67 -1
- package/src/telegram-api.ts +195 -0
- package/src/types.ts +34 -33
- package/src/utils.ts +4 -21
package/README.md
CHANGED
|
@@ -262,6 +262,14 @@ Multiple layers protect against misuse:
|
|
|
262
262
|
5. **Rate limiting** - Prevents runaway usage
|
|
263
263
|
6. **Audit logging** - All interactions logged to `/tmp/claude-telegram-audit.log`
|
|
264
264
|
|
|
265
|
+
## Reliability Features
|
|
266
|
+
|
|
267
|
+
- **Debounced session persistence** - Reduces disk I/O by batching session saves
|
|
268
|
+
- **Automatic retry** - Transient Telegram API errors are retried with exponential backoff
|
|
269
|
+
- **Graceful shutdown** - Clean shutdown with timeout ensures session data is saved
|
|
270
|
+
- **Session versioning** - Prevents loading incompatible session data after updates
|
|
271
|
+
- **Friendly errors** - Technical errors are translated to helpful user messages
|
|
272
|
+
|
|
265
273
|
## Troubleshooting
|
|
266
274
|
|
|
267
275
|
**Bot doesn't respond**
|