docs: add plugin core and Telegram/OpenClaw adapter skeleton / 補 reply-end-controls 核心與 Telegram/OpenClaw 設計骨架

This commit is contained in:
Alice (OpenClaw)
2026-05-12 22:04:16 +08:00
parent 10fa17efc6
commit 588c3a446d
6 changed files with 191 additions and 0 deletions

34
adapters/openclaw.md Normal file
View File

@@ -0,0 +1,34 @@
# 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.