docs: add plugin core and Telegram/OpenClaw adapter skeleton / 補 reply-end-controls 核心與 Telegram/OpenClaw 設計骨架
This commit is contained in:
37
core/callback-contract.md
Normal file
37
core/callback-contract.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Callback Contract
|
||||
|
||||
## Goal
|
||||
|
||||
Define a stable callback payload contract between channel-specific button handlers and the reusable reply-end-controls core.
|
||||
|
||||
## Telegram V1 callback values
|
||||
|
||||
- `rec:continue`
|
||||
- `rec:stop`
|
||||
|
||||
## Optional message-scoped extension
|
||||
|
||||
If V1 needs tighter message binding later, extend to:
|
||||
|
||||
- `rec:continue:<messageId>`
|
||||
- `rec:stop:<messageId>`
|
||||
|
||||
## Normalized internal event
|
||||
|
||||
Suggested normalized structure after channel parsing:
|
||||
|
||||
```json
|
||||
{
|
||||
"choice": "continue | stop",
|
||||
"conversationId": "string",
|
||||
"sessionKey": "string | null",
|
||||
"sourceMessageId": "string",
|
||||
"sourceCallbackId": "string",
|
||||
"channel": "telegram",
|
||||
"timestamp": "ISO timestamp"
|
||||
}
|
||||
```
|
||||
|
||||
## Why normalize
|
||||
|
||||
The Telegram parser should convert platform-specific callback payloads into one internal structure, so the reusable policy/state layer does not need to know Telegram details.
|
||||
Reference in New Issue
Block a user