Files
openclaw/extensions
sxxtony cb93c0f8f5 fix(telegram): factor offset rotation handling into typed surfaces
Builds on the prior commit by introducing the typed surfaces the rest of
the plugin (and `openclaw doctor`-style consumers) can reuse:

- `inspectTelegramUpdateOffset` returns a discriminated union
  (`absent | valid | rotated`) so callers can act on the rotation event
  without re-implementing the bot-id / fingerprint comparison.
  `readTelegramUpdateOffset` is now a thin adapter over it.
- `TelegramOffsetRotationReason` is exported as a named type alias so
  downstream code can switch over it exhaustively.
- New `TelegramOffsetRotationHandler` class encapsulates the
  "log warning + delete stale file" side effect that the monitor needs at
  startup, plus a `createTelegramOffsetRotationHandler` factory and a
  pure `formatTelegramOffsetRotationMessage` helper used to keep the
  wording consistent.
- `monitor.ts` now constructs the handler once per polling startup
  instead of inlining the closure, and the new surfaces are re-exported
  through `monitor-polling.runtime.ts`.

Unit coverage:
  pnpm test extensions/telegram/src/update-offset-store.test.ts \
            extensions/telegram/src/offset-rotation-handler.test.ts \
            extensions/telegram/src/monitor.test.ts
2026-05-13 10:12:31 +05:30
..
2026-05-12 07:10:13 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 12:45:31 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-13 04:14:38 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 21:42:48 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 07:10:13 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 21:32:50 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 07:10:13 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 21:52:38 +01:00
2026-05-12 21:50:13 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 07:10:13 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 06:33:41 +01:00
2026-05-12 07:10:13 +01:00
2026-05-12 07:10:13 +01:00
2026-05-12 19:09:31 +01:00