import { BaseRun, KVMap } from "./schemas.js";
import { Client } from "./client.js";
export declare function convertToDottedOrderFormat(epoch: number, runId: string): string;
export interface RunTreeConfig {
    name: string;
    run_type?: string;
    id?: string;
    project_name?: string;
    parent_run?: RunTree;
    parent_run_id?: string;
    child_runs?: RunTree[];
    start_time?: number;
    end_time?: number;
    extra?: KVMap;
    tags?: string[];
    error?: string;
    serialized?: object;
    inputs?: KVMap;
    outputs?: KVMap;
    reference_example_id?: string;
    client?: Client;
}
export interface RunnableConfigLike {
    /**
     * Tags for this call and any sub-calls (eg. a Chain calling an LLM).
     * You can use these to filter calls.
     */
    tags?: string[];
    /**
     * Metadata for this call and any sub-calls (eg. a Chain calling an LLM).
     * Keys should be strings, values should be JSON-serializable.
     */
    metadata?: Record<string, unknown>;
    /**
     * Callbacks for this call and any sub-calls (eg. a Chain calling an LLM).
     * Tags are passed to all callbacks, metadata is passed to handle*Start callbacks.
     */
    callbacks?: any;
}
export declare class RunTree implements BaseRun {
    id: string;
    name: RunTreeConfig["name"];
    run_type: string;
    project_name: string;
    parent_run?: BaseRun;
    child_runs: RunTree[];
    start_time: number;
    end_time?: number;
    extra: KVMap;
    tags?: string[];
    error?: string;
    serialized: object;
    inputs: KVMap;
    outputs?: KVMap;
    reference_example_id?: string;
    client: Client;
    events?: KVMap[] | undefined;
    trace_id: string;
    dotted_order: string;
    constructor(config: RunTreeConfig);
    static fromRunnableConfig(config: RunnableConfigLike, props: {
        name: string;
        tags?: string[];
        metadata?: KVMap;
    }): RunTree;
    private static getDefaultConfig;
    createChild(config: RunTreeConfig): Promise<RunTree>;
    end(outputs?: KVMap, error?: string, endTime?: number): Promise<void>;
    private _convertToCreate;
    postRun(excludeChildRuns?: boolean): Promise<void>;
    patchRun(): Promise<void>;
}
export declare function isRunTree(x?: unknown): x is RunTree;
export declare function isRunnableConfigLike(x?: unknown): x is RunnableConfigLike;
