/**
 * `dql agent` — block-first answer loop on the command line.
 *
 *   dql agent ask "what was revenue last week?"
 *     [--provider claude|openai|gemini|ollama]
 *     [--user alice@acme.com]   (filters Skills + records feedback as this user)
 *     [--domain growth]         (scopes KG search)
 *     [--format json]           (emits structured JSON instead of prose)
 *
 *   dql agent reindex
 *     Rebuilds .dql/cache/agent-kg.sqlite and metadata.sqlite from the
 *     project's manifest + Skills folder. Equivalent to `dql app reindex`.
 *
 *   dql agent feedback <up|down> --block <id> --question "..."
 *     Records feedback into the KG. Used by clients without MCP access.
 */
import { answer, type AgentAnswer, type AgentFollowUpContext } from '@duckcodeailabs/dql-agent';
import type { CLIFlags } from '../args.js';
export declare function runAgent(sub: string | null, rest: string[], flags: CLIFlags): Promise<void>;
interface AgentEvalCase {
    name?: string;
    question: string;
    domain?: string;
    followUp?: AgentFollowUpContext;
    selectedContext?: unknown;
    expected?: {
        sourceTier?: 'certified_artifact' | 'business_context' | 'semantic_layer' | 'dbt_manifest' | 'no_answer';
        certification?: 'certified' | 'ai_generated' | 'analyst_review_required';
        kind?: 'certified' | 'uncertified' | 'no_answer';
        sqlContains?: string | string[];
        sqlNotContains?: string | string[];
        citationKind?: string;
        noHallucinatedColumns?: string[];
        route?: 'certified' | 'generated_sql' | 'research' | 'clarify';
        intent?: string;
        reviewStatus?: 'none' | 'draft_ready' | 'analyst_review_required' | 'certified';
        missingContextKind?: string;
        allowedRelationsOnly?: boolean;
        allowedColumnsOnly?: boolean;
        draftSaved?: boolean;
        rows?: unknown[];
    };
}
interface AgentEvalResult {
    name: string;
    passed: boolean;
    failures: string[];
    durationMs: number;
    executionMs?: number;
    kind: AgentAnswer['kind'];
    route?: string;
    intent?: string;
    reviewStatus?: string;
    contextObjects: number;
    followUp: boolean;
    draftSaved: boolean;
    expected?: AgentEvalCase['expected'];
    validationCode?: string;
}
declare function evaluateCase(testCase: AgentEvalCase, result: Awaited<ReturnType<typeof answer>>): {
    failures: string[];
    validationCode?: string;
};
declare function computeEvalMetrics(results: AgentEvalResult[]): {
    certified_hit_rate: number | null;
    generated_followup_pass_rate: number | null;
    safe_refusal_rate: number | null;
    wrong_certified_count: number;
    outside_context_rejection_count: number;
    draft_saved_count: number;
    avg_context_objects: number;
    avg_execution_ms: number | null;
};
export declare const __test__: {
    computeEvalMetrics: typeof computeEvalMetrics;
    evaluateCase: typeof evaluateCase;
};
export {};
//# sourceMappingURL=agent.d.ts.map