import type { ToolCallEvent } from "../toolCallEvents.js";
export type SequenceDebugResultType = "tool_calls" | "final_text";
type SequenceDebugToolCall = {
    toolCallId: string;
    toolName: string;
    input: string;
    output: string | null;
    error: string | null;
};
export type SequenceDebug = {
    sequenceId: number;
    startedAt: string;
    prompt: string;
    promptTokens: number;
    reasoning: string;
    reasoningTokens: number;
    text: string;
    textTokens: number;
    uncachedInputTokens: number;
    cachedInputTokens: number;
    outputTokens: number;
    cachedTokens: number;
    responseId: string | null;
    toolCalls: SequenceDebugToolCall[];
    endedAt: string;
    resultType: SequenceDebugResultType;
};
type SequenceDebugModelCall = {
    promptTokens: number;
    reasoning: string;
    reasoningTokens: number;
    text: string;
    textTokens: number;
    uncachedInputTokens: number;
    cachedInputTokens: number;
    outputTokens: number;
    cachedTokens: number;
    responseId: string | null;
    resultType: SequenceDebugResultType;
};
export type SequenceDebugModelCallSink = {
    handleModelCallStart: (prompt: string) => void;
    handleModelCallComplete: (params: SequenceDebugModelCall) => void;
};
export type SequenceDebugCollector = SequenceDebugModelCallSink & {
    handleToolCallEvent: (event: ToolCallEvent) => void;
    flush: () => void;
    getHistory: () => SequenceDebug[];
};
export declare function createSequenceDebugCollector(): SequenceDebugCollector;
export declare function createSequenceDebugMiddleware(sink: SequenceDebugModelCallSink): import("langchain").AgentMiddleware<undefined, undefined, unknown, readonly (import("@langchain/core/tools").ClientTool | import("@langchain/core/tools").ServerTool)[]>;
export {};
