import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runtime"; import { getPluginCommandSpecs } from "openclaw/plugin-sdk/plugin-runtime"; // Telegram plugin module implements bot native command deps behavior. import type { ModelsAuthLoginFlowOptions, ModelsAuthLoginFlowResult, } from "openclaw/plugin-sdk/provider-auth-login-flow-runtime"; import { dispatchReplyWithBufferedBlockDispatcher } from "openclaw/plugin-sdk/reply-dispatch-runtime"; import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { listSkillCommandsForAgents } from "openclaw/plugin-sdk/skill-commands-runtime"; import type { TelegramBotDeps } from "./bot-deps.js"; import { syncTelegramMenuCommands } from "./bot-native-command-menu.js"; import { loadTelegramSendModule } from "./send-runtime.js"; export type TelegramNativeCommandDeps = Pick< TelegramBotDeps, | "dispatchReplyWithBufferedBlockDispatcher" | "editMessageTelegram" | "getRuntimeConfig" | "listSkillCommandsForAgents" | "readChannelAllowFromStore" | "syncTelegramMenuCommands" > & { getPluginCommandSpecs?: typeof getPluginCommandSpecs; runModelsAuthLoginFlow?: (opts: ModelsAuthLoginFlowOptions) => Promise; }; export const defaultTelegramNativeCommandDeps: TelegramNativeCommandDeps = { get getRuntimeConfig() { return getRuntimeConfig; }, get readChannelAllowFromStore() { return readChannelAllowFromStore; }, get dispatchReplyWithBufferedBlockDispatcher() { return dispatchReplyWithBufferedBlockDispatcher; }, get listSkillCommandsForAgents() { return listSkillCommandsForAgents; }, get syncTelegramMenuCommands() { return syncTelegramMenuCommands; }, get getPluginCommandSpecs() { return getPluginCommandSpecs; }, async runModelsAuthLoginFlow(opts) { const { runModelsAuthLoginFlow } = await import("openclaw/plugin-sdk/provider-auth-login-flow-runtime"); return await runModelsAuthLoginFlow(opts); }, async editMessageTelegram(...args) { const { editMessageTelegram } = await loadTelegramSendModule(); return await editMessageTelegram(...args); }, };