/**
 * ToolWasteView — fraction of tool calls whose results weren't used
 * downstream. Without a "used" signal we fall back to structural
 * proxies: error calls, duplicate calls, and tool calls followed by
 * zero subsequent LLM spans are all considered waste.
 *
 * Consumers can pass a `usageOracle` that inspects a tool span and
 * returns true iff the tool's result appears in a later LLM message,
 * artifact, or state mutation — that's the canonical definition; the
 * default heuristic is a reasonable fallback.
 */
import { computeToolUseMetrics } from '../tool-use-metrics';
import { llmSpans } from '../trace/query';
import type { ToolSpan } from '../trace/schema';
import type { TraceStore } from '../trace/store';
export interface ToolWasteFinding {
    runId: string;
    wastedCalls: number;
    totalCalls: number;
    wasteRate: number;
}
export interface ToolWasteReport {
    byRun: ToolWasteFinding[];
    overallWasteRate: number;
}
export interface ToolWasteOptions {
    runId?: string;
    usageOracle?: (tool: ToolSpan, later: {
        llm: Awaited<ReturnType<typeof llmSpans>>;
    }) => boolean;
}
export declare function toolWasteView(store: TraceStore, options?: ToolWasteOptions): Promise<ToolWasteReport>;
export { computeToolUseMetrics };
//# sourceMappingURL=tool-waste.d.ts.map