/**
 * Panel query resolution utility.
 *
 * Extracts the query expression and datasource from an existing dashboard
 * panel, so grafana_query / grafana_query_logs can re-run it with different
 * time ranges without the agent navigating panel JSON manually.
 */
import { GrafanaClient } from "../grafana-client.js";
export type ResolvedPanelQuery = {
    expr: string;
    datasourceUid: string;
    datasourceType: string;
    queryTool: "grafana_query" | "grafana_query_logs" | "grafana_query_traces";
    panelTitle: string;
    panelType: string;
    /** Template variable values replaced with .* for broad matching */
    templateVarsReplaced: boolean;
};
export type PanelResolveError = {
    error: string;
};
/**
 * Resolve a dashboard panel's query expression and datasource.
 *
 * Fetches the dashboard, finds the panel by ID, extracts `targets[0].expr`,
 * resolves the datasource UID (handling template variables), and determines
 * which query tool to use based on datasource type.
 */
export declare function resolvePanelQuery(client: GrafanaClient, dashboardUid: string, panelId: number): Promise<ResolvedPanelQuery | PanelResolveError>;
