import type { InlineToolRunnable } from '../tools/types'; export interface InlineAssistantPromptOptions { prompt: string; agentName?: string; agentId?: string; systemPrompt?: string; tools?: InlineToolRunnable[]; onStart?: () => void; onDelta?: (delta: string) => void; onComplete?: (text: string) => void; onError?: (error: Error) => void; } /** Reasoning effort for each model call of an inline assistant. */ export type InlineAssistantReasoningLevel = 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'; /** * How the agent behind an inline assistant runs. It is fixed when the instance is created and * applies to every prompt sent to it. Omitted fields keep the defaults, which suit short content * generation; raise them for agentic work such as multi-step discovery with your own tools. * Grafana Assistant releases that predate this config ignore it and run with the defaults. */ export interface InlineAssistantConfig { /** Most model calls per prompt, an integer from 1 to 76. The agent stops after the last one. Default 5. */ maxSteps?: number; /** Use the smaller, faster model. Default true. */ weak?: boolean; /** Reasoning effort per model call. Default 'none'. */ reasoningLevel?: InlineAssistantReasoningLevel; /** Most output tokens per model call, an integer from 1 to 16000. Default 4096. */ maxTokens?: number; } export interface InlineAssistant { sendPrompt(options: InlineAssistantPromptOptions): Promise; cancel(): void; dispose(): void; } export type InlineAssistantFactory = (origin: string, config?: InlineAssistantConfig) => Promise; export type InlineAssistantInitializer = () => Promise; export declare function setInlineAssistantFactory(fn: InlineAssistantFactory): void; /** * Register a lazy initializer that will be called on first use. * The plugin code should register this to enable lazy loading of the inline assistant. * * This uses global storage (window) so that all plugins share the same initializer, * regardless of which plugin instance or package version loads first. */ export declare function setInlineAssistantInitializer(fn: InlineAssistantInitializer): void; /** * Ensure the inline assistant is initialized. If an initializer is registered, * it will be called on first use. Otherwise, checks if factory is already registered. * * Uses global storage (window) so that initialization is shared across all plugins. */ export declare function ensureInlineAssistantInitialized(): Promise; export declare function getInlineAssistantFactory(): InlineAssistantFactory; //# sourceMappingURL=inlineAssistant.d.ts.map