import { getBundledChannelContractSurfaceModule } from "../channels/plugins/contract-surfaces.js"; type TelegramCommandUiContract = { buildCommandsPaginationKeyboard: ( currentPage: number, totalPages: number, agentId?: string, ) => Array>; }; function loadTelegramCommandUiContract(): TelegramCommandUiContract { const contract = getBundledChannelContractSurfaceModule({ pluginId: "telegram", preferredBasename: "contract-api.ts", }); if (!contract) { throw new Error("telegram command ui contract surface is unavailable"); } return contract; } export function buildCommandsPaginationKeyboard( currentPage: number, totalPages: number, agentId?: string, ): Array> { return loadTelegramCommandUiContract().buildCommandsPaginationKeyboard( currentPage, totalPages, agentId, ); }