/** * start_session tool handler extracted from index.ts. * * Creates or resumes a Telegram forum topic for the current MCP session, * bootstraps memory, auto-schedules DMN reflection, and returns the * session greeting with reminders. */ import { type initMemoryDb } from "../data/memory/index.js"; import type { TelegramClient } from "../services/telegram.js"; import type { AppConfig, ToolResult } from "../lib/types.js"; import type { ThreadLifecycleService } from "../services/thread-lifecycle.service.js"; export interface StartSessionContext { /** Mutable per-session state — the handler writes directly into this. */ session: { currentThreadId: number | undefined; sessionStartedAt: number; /** True once the full bootstrap (memory briefing, schedule setup, etc.) has run in THIS process. */ sessionFullyInitialized: boolean; waitCallCount: number; lastToolCallAt: number; toolCallsSinceLastDelivery: number; previewedUpdateIds: Set; lastOperatorMessageAt: number; lastOperatorMessageText: string; lastConsolidationAt: number; }; telegram: TelegramClient; telegramChatId: string; config: AppConfig; getMemoryDb: () => ReturnType; threadLifecycle: ThreadLifecycleService; getReminders: (threadId: number | undefined, sessionStartedAt: number, autonomousMode: boolean) => string; /** MCP session ID for this connection (from transport). */ getMcpSessionId?: () => string | undefined; /** Close the transport — used for session registration. */ closeTransport?: () => void; } export declare function handleStartSession(args: Record, ctx: StartSessionContext): Promise; //# sourceMappingURL=start-session-tool.d.ts.map