feat: add reusable core store and OpenClaw state-file adapter skeleton / 新增可重用 state store 與 OpenClaw state-file adapter 骨架
This commit is contained in:
39
src/types.ts
Normal file
39
src/types.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
export type ReplyEndChoice = "continue" | "stop"
|
||||
|
||||
export type ReplyEndState = {
|
||||
lastChoice: ReplyEndChoice
|
||||
lastChoiceAt: string
|
||||
sourceMessageId: string
|
||||
sourceCallbackId: string
|
||||
active: boolean
|
||||
}
|
||||
|
||||
export type ReplyEndStateMap = Record<string, ReplyEndState>
|
||||
|
||||
export type NormalizedReplyEndEvent = {
|
||||
choice: ReplyEndChoice
|
||||
conversationId: string
|
||||
sessionKey: string | null
|
||||
sourceMessageId: string
|
||||
sourceCallbackId: string
|
||||
channel: "telegram"
|
||||
timestamp: string
|
||||
}
|
||||
|
||||
export type TelegramInlineButton = {
|
||||
text: string
|
||||
callback_data: string
|
||||
}
|
||||
|
||||
export type TelegramInlineKeyboardMarkup = {
|
||||
inline_keyboard: TelegramInlineButton[][]
|
||||
}
|
||||
|
||||
export type ReplyEndPolicyInput = {
|
||||
state: ReplyEndState | null
|
||||
hasTypedUserFollowup: boolean
|
||||
}
|
||||
|
||||
export type ReplyEndPolicyDecision = {
|
||||
suppressProactiveContinuation: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user