import { GenerateContentResponse, Content } from '@google/genai'; import { Tool } from './Tool.js'; /** @deprecated Use buildSystemPrompt({ coding: true }) from agent/instructions.ts */ export declare const CODING_AGENT_SYSTEM_PROMPT: string; /** @deprecated Use buildSystemPrompt({ jobs: true }) from agent/instructions.ts */ export declare const JOBS_SYSTEM_PROMPT: string; export interface QueryEngineOptions { model?: string; systemInstruction?: string; tools?: Tool[]; apiKey?: string; /** GCP project ID for Vertex AI mode (uses gcloud ADC, no API key needed). */ project?: string; /** GCP region for Vertex AI. Default: us-central1 */ location?: string; /** Max thinking tokens for Gemini 2.5+. Set to 0 to disable. Default: 8192 */ thinkingBudget?: number; /** Show raw thinking text in onThinking hook. Default: false */ includeThoughts?: boolean; /** Auto-compact history when it exceeds this many turns. Default: 40 */ maxHistoryLength?: number; } export interface IterationHook { onStart?: () => void; /** Called after each Gemini API round-trip (streaming or non-streaming). May be async. */ onResponse?: (response?: GenerateContentResponse) => void | Promise; onToolCall?: (toolName: string, args: any) => Promise; onToolResult?: (toolName: string, result: any) => void; onError?: (error: Error) => void; /** Fired for each text chunk in streaming mode */ onChunk?: (text: string) => void; /** Fired when thinking tokens arrive (if includeThoughts is enabled) */ onThinking?: (thought: string) => void; /** Fired when the context is being compacted */ onCompacting?: () => void; } /** * The unified QueryEngine executing an autonomous REPL-like agentic loop * using @google/genai. Supports streaming, thinking mode, automatic context * compaction, and exponential-backoff retry. */ export declare class QueryEngine { private ai; private history; private model; private systemInstruction; private tools; private toolMap; private thinkingBudget; private includeThoughts; private maxHistoryLength; constructor(options?: QueryEngineOptions); getHistory(): Content[]; setHistory(history: Content[]): void; /** Add API keys / tools after construction */ addTools(tools: Tool[]): void; private buildGenerateConfig; private maybeCompact; private executeToolCalls; runLoop(prompt: string, hooks?: IterationHook): Promise; /** * Like runLoop() but streams text chunks via hooks.onChunk(). * Tool-call iterations are still non-streaming (we need the full response * to extract functionCalls reliably). */ runLoopStreaming(prompt: string, hooks?: IterationHook): Promise; } //# sourceMappingURL=QueryEngine.d.ts.map