Skip to content

OpenClaw: add idempotent Telegram controller bootstrap utility #13

Description

@mfethe1

Parent

#10

Type

AFK - code and tests can be implemented in an isolated Sandcastle branch.

What to build

Add an idempotent Telegram bootstrap utility that configures the controller messaging database with the built-in Telegram adapter, fleet room mapping, route policy, and trusted operator identity links. This removes the need for manual production SQLite edits.

Acceptance criteria

  • scripts/bootstrap_openclaw_telegram.py exists and exposes a reusable bootstrap_telegram(...) function.
  • The script registers default adapters and enables Telegram command promotion.
  • The script creates or reuses a fleet room for the Telegram operator group.
  • The script maps the Telegram chat ID to the fleet room with route policy allowing assign_task commands targeting tasks.
  • The route policy records allowed host aliases lenny and rosie.
  • The script links a Telegram platform user to a verified OpenClaw identity with message:write and command:write scopes.
  • Running the script twice is idempotent and does not duplicate rooms, mappings, or identity links.
  • tests/openclaw_messaging/test_telegram_bootstrap.py covers idempotency, command promotion, room mapping metadata, and identity scopes.
  • Focused tests pass: python -m pytest tests\openclaw_messaging\test_telegram_bootstrap.py tests\openclaw_messaging\test_telegram_adapter.py tests\openclaw_controller\test_api.py -q.
  • No Telegram tokens, webhook secrets, chat IDs, or user IDs are committed.

Blocked by

None - can start immediately.

Sandcastle notes

Recommended AFK branch: agent/openclaw-telegram-bootstrap.

.\scripts\sandcastle.ps1 -Mode implement -Agent codex -TaskFile .sandcastle\tasks\openclaw-telegram-bootstrap.md -Branch agent/openclaw-telegram-bootstrap

Create .sandcastle/tasks/openclaw-telegram-bootstrap.md from this issue body before launching the Sandcastle run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageMaintainer needs to evaluate this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions