import type { Provider, ThinkingLevel } from "@kenkaiiii/gg-ai"; export interface ServeModeOptions { provider: Provider; model: string; cwd: string; version: string; thinkingLevel?: ThinkingLevel; telegram: { botToken: string; userId: number; }; /** * Embedded mode (desktop app): skip the terminal banner/console output and * don't register process signal handlers — the host process owns those. The * bot polls in the background and the caller stops it via the returned * controller. Defaults to false (the CLI's blocking, banner-printing flow). */ embedded?: boolean; } /** Handle for an embedded serve session: stop polling + dispose all sessions. */ export interface ServeController { stop: () => Promise; } /** * Serve mode: run ggcoder controlled via Telegram. * * - DMs to bot → default project (CWD where serve was started) * - Groups → linked projects via /link * - Each chat gets its own AgentSession, tools, context */ /** * Build a serve session: wire the Telegram bot to per-chat AgentSessions and * start long-polling in the background. Returns a controller to stop it. * * Shared by the CLI (`ggcoder serve`, via {@link runServeMode}) and the desktop * app sidecar. In `embedded` mode it stays silent and leaves process-signal * handling to the host. */ export declare function startServeMode(options: ServeModeOptions): Promise; /** * CLI serve flow (`ggcoder serve`): prints the banner, starts the bot, wires * SIGINT/SIGTERM/SIGHUP to a deadline-bounded shutdown, then blocks until the * process exits. */ export declare function runServeMode(options: ServeModeOptions): Promise; //# sourceMappingURL=serve-mode.d.ts.map