import type { NativeAgent } from '../../backends/index.js'; export function isAllowedChat(chatId: number, allowedIds: number[]): boolean { return allowedIds.includes(chatId); } export function createMessageHandler(agent: NativeAgent): (text: string) => Promise { return async (text: string): Promise => { return agent.process(text); }; } export function createResetHandler(agent: NativeAgent): () => void { return (): void => { agent.reset(); }; }