Files
reply-end-controls/adapters/openclaw.md

1006 B

OpenClaw Adapter Design

Goal

Describe how reply-end-controls should connect to OpenClaw without baking all logic directly into Telegram-specific code.

Adapter responsibilities

Outbound integration

  • detect final assistant reply payloads
  • append Telegram buttons

Callback integration

  • receive Telegram callback query events from OpenClaw's Telegram plugin layer
  • normalize callback payload
  • pass normalized event to reply-end-controls core

State integration

  • store reply-end state in OpenClaw conversation/session state
  • expose the state to later assistant turns

Policy integration

  • before later assistant output generation, expose lastChoice
  • if stop, suppress proactive continuation behavior

V1 expectation

The OpenClaw adapter is the first concrete runtime adapter for the project.

Even though Telegram is the only supported channel, the logic should still be split so the reusable core is not trapped inside one Telegram-only handler implementation.