/**
 * Observability adapters — bidirectional parity with production backends.
 *
 * `LangfuseAdapter` maps a Run's spans into Langfuse generation/score
 * records (schema-compatible; we don't depend on the SDK — consumers
 * POST the returned JSON to their Langfuse collector).
 *
 * `PrometheusEmitter` converts a TraceStore into a Prometheus text-
 * exposition-format string (counters + gauges for runs, tool calls,
 * errors, cost). Drop into a `/metrics` handler; no SDK needed.
 *
 * `replayTraceThroughJudge` is the canonical "re-score with a new
 * judge" path — takes an existing run, runs a judge function over
 * each LLM span, emits JudgeVerdict spans back into the store.
 */
import type { LlmSpan } from './trace/schema';
import type { TraceStore } from './trace/store';
export interface LangfuseGeneration {
    id: string;
    traceId: string;
    name: string;
    model: string;
    input: unknown;
    output: unknown;
    startTime: string;
    endTime: string;
    usage: {
        input: number;
        output: number;
        total: number;
        totalCost: number;
    };
    metadata: Record<string, unknown>;
}
export interface LangfuseScore {
    id: string;
    traceId: string;
    observationId: string;
    name: string;
    value: number;
    comment?: string;
}
export interface LangfuseEnvelope {
    traceId: string;
    generations: LangfuseGeneration[];
    scores: LangfuseScore[];
}
export declare function toLangfuseEnvelope(store: TraceStore, runId: string): Promise<LangfuseEnvelope>;
export declare function toPrometheusText(store: TraceStore): Promise<string>;
export interface JudgeReplayResult {
    spanId: string;
    targetSpanId: string;
    dimension: string;
    score: number;
    rationale?: string;
}
/**
 * Apply a judge function to every LLM span in a run and record the
 * results as JudgeVerdict spans. This is the canonical "no re-execution"
 * re-scoring path — you supply a pure judge `(llmSpan) → verdict`.
 */
export declare function replayTraceThroughJudge(store: TraceStore, runId: string, judge: {
    id: string;
    dimension: string;
    score: (span: LlmSpan) => Promise<{
        score: number;
        rationale?: string;
        evidence?: string;
    }>;
}): Promise<JudgeReplayResult[]>;
//# sourceMappingURL=observability.d.ts.map