import { type BaseLlm } from '@google/adk'; import type { ChatHandler } from '../collector/chat.js'; import type { StorageAdapter } from '../collector/types.js'; import type { QueryOptions } from '../debug/queries.js'; import type { SpecialistSpec } from './specialists.js'; import { type Env } from './model.js'; export interface ChatHandlerOptions { /** How many cut-short conversations are remembered (and their history kept) before the oldest is dropped. Default 1000. */ maxCutSessions?: number; storage: StorageAdapter; env?: Env; queryOptions?: QueryOptions; /** An investigation that takes longer ends with an error event. Default 240 s: room for one model call to hang (90 s) and be repeated. */ timeoutMs?: number; /** Overrides the model chosen from env (tests, custom providers). */ model?: BaseLlm | string; /** Default: the built-in specialists; the CLI merges in the project's observe.agents file. */ specialists?: SpecialistSpec[]; /** * How long one model call may take before it is started again (once). Default: OBSERVE_MODEL_TIMEOUT_MS, else 90 s. * Separate from `timeoutMs`, which limits the whole investigation. */ modelCallTimeoutMs?: number; /** Where "the model did not answer, trying again" goes. Default: the observer's terminal. */ log?: (line: string) => void; } export declare function createChatHandler(options: ChatHandlerOptions): Promise<{ mode: 'mock' | 'real'; handle: ChatHandler; }>;