docs: add plugin core and Telegram/OpenClaw adapter skeleton / 補 reply-end-controls 核心與 Telegram/OpenClaw 設計骨架
This commit is contained in:
20
telegram/callback-handler.md
Normal file
20
telegram/callback-handler.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Telegram Callback Handler
|
||||
|
||||
## Responsibility
|
||||
|
||||
Receive Telegram callback queries, parse reply-end button clicks, normalize them, and hand them off to the reusable state/policy layer.
|
||||
|
||||
## V1 actions
|
||||
|
||||
- parse `rec:continue`
|
||||
- parse `rec:stop`
|
||||
- map into normalized callback event
|
||||
- write updated state
|
||||
- update original message buttons to show resolved choice
|
||||
|
||||
## V1 UI behavior after click
|
||||
|
||||
Suggested resolved button state:
|
||||
|
||||
- selected option gains a clear marker
|
||||
- the message should not remain indefinitely clickable as if no decision happened
|
||||
22
telegram/reply-decorator.md
Normal file
22
telegram/reply-decorator.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Telegram Reply Decorator
|
||||
|
||||
## Responsibility
|
||||
|
||||
Append inline keyboard controls to every assistant reply sent to Telegram.
|
||||
|
||||
## Required controls
|
||||
|
||||
- `A. 繼續`
|
||||
- `B. 就這樣吧,不需要額外處理`
|
||||
|
||||
## Output shape
|
||||
|
||||
The Telegram outbound payload should include:
|
||||
|
||||
- normal reply text
|
||||
- inline keyboard markup
|
||||
|
||||
## V1 behavior
|
||||
|
||||
- every assistant reply gets the two buttons
|
||||
- no conditional rendering in V1
|
||||
Reference in New Issue
Block a user