mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 11:07:40 +01:00
* feat(notify): every person chooses what reaches their own Telegram Loki is multi-tenant, but Telegram was one hard-wired chat (the operator's) on a bot whose incoming messages belong to OpenClaw. Now each account sets it up in Settings → Notifications → Telegram: - Connect Telegram opens Loki's notification bot with a one-time code; pressing Start links that chat (POST /api/telegram/webhook, verified by Telegram's secret-token header). No chat ids, nothing to type. /stop or blocking the bot unlinks. The webhook registers itself on first use. - Six kinds of message (config/notify-categories.ts), each on/off per person; "servers" is shown to the operator only. - Every app sender now goes through the gateway as that person (lib/notify/person.ts → deliverNotice): approvals, feedback, fixes, runs, studio, build requests, sign-ups, autopilot, site live, gateway down. The gateway applies the person's choices, sends to their own linked chat, and falls back to the operator's old chat for the operator only. scripts/test/one-telegram-door.ts fails the build on a direct send. - Buttons Loki composes from its own records (a customer's own site) are trusted; links from outside still meet the host allowlist. - Migration 0132 adds the link and choices to notification_preferences. - New env: TELEGRAM_NOTIFY_BOT_TOKEN, TELEGRAM_NOTIFY_BOT_USERNAME (checked as a pair at boot). Until set, Settings says Telegram is not set up and the operator's existing chat keeps working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN * fix(openclaw): the heartbeat follows the same one-tap contract The box audit (openclaw-day-plan run 3) found the sender of "Gateway was not running. Restarted automatically. All good now.": the OpenClaw workspace's tools/health-guardian.sh, not in any repo, whose status lines the agent relays. The contract now goes on HEARTBEAT.md too (between markers, backed up, idempotent), and the installer prints how health-guardian is started and its speaking lines, numbers and secrets redacted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN * style(drizzle): format the generated 0132 snapshot and journal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN --------- Co-authored-by: Claude <noreply@anthropic.com>