import { Agent, AgentToolDefinition, Model, TokenUsage, Tool } from "../types";
/**
 * Extended Model interface with TTFT and additional metrics
 */
export interface ExtendedModel extends Model {
    ttft?: number;
    serverTimePerOutputToken?: number;
    prompt?: string;
    completion?: string;
    duration?: number;
}
/** Canonical Tool shape used by all framework parsers. */
export type CanonicalToolParams = Pick<Tool, 'id' | 'name' | 'spanId' | 'timestamp'> & {
    description?: string;
    input?: any;
    output?: any;
    argument?: any;
    argument_defination?: any;
    duration?: number;
    executionType?: 'actual' | 'decision';
    tokenUsage?: TokenUsage;
    metadata?: Record<string, any>;
};
/** Canonical Agent shape used by all framework parsers. */
export type CanonicalAgentParams = Pick<Agent, 'id' | 'name' | 'type'> & {
    description?: string;
    role?: string;
    goal?: string;
    backstory?: string;
    toolDefinitions?: AgentToolDefinition[];
    metadata?: Record<string, any>;
};
/** Canonical ExtendedModel params; tokenUsage and base fields required. */
export type CanonicalExtendedModelParams = Pick<ExtendedModel, 'id' | 'provider' | 'modelName' | 'spanId' | 'timestamp'> & {
    tokenUsage: TokenUsage;
    temperature?: number;
    cost?: number;
    ttft?: number;
    serverTimePerOutputToken?: number;
    prompt?: string;
    completion?: string;
    duration?: number;
};
/**
 * Build a canonical Tool so all frameworks return the same shape.
 */
export declare function buildCanonicalTool(p: CanonicalToolParams): Tool;
/**
 * Build a canonical Agent so all frameworks return the same shape.
 */
export declare function buildCanonicalAgent(p: CanonicalAgentParams): Agent;
/**
 * Build a canonical ExtendedModel so all frameworks return the same shape.
 */
export declare function buildCanonicalExtendedModel(p: CanonicalExtendedModelParams): ExtendedModel;
/**
 * Utility: Extract attribute with fallback between gen_ai.* and genai.* formats
 */
declare function getAttr(attrs: Record<string, any>, ...keys: string[]): any;
/**
 * Get model attribute (request/response model), treating "unknown" as absent.
 * Use this for model detection and model name extraction so gen_ai.request.model = "unknown" is ignored.
 */
declare function getModelAttr(attrs: Record<string, any>, ...keys: string[]): string | undefined;
/**
 * Prefer genai.response.model (and gen_ai.response.model), and fall back to genai.request.model
 * when the response model is missing or clearly just copied from the request (response === request).
 */
declare function getModelAttrResponseFirst(attrs: Record<string, any>): string | undefined;
/**
 * Utility: Safe parseInt
 */
declare function safeParseInt(value: any): number;
/**
 * Utility: Safe parseFloat
 */
declare function safeParseFloat(value: any): number | undefined;
declare function getCacheTokens(attrs: Record<string, any>): {
    cacheRead?: number;
    cacheWrite?: number;
};
export declare const FrameworkUtils: {
    getAttr: typeof getAttr;
    getModelAttr: typeof getModelAttr;
    getModelAttrResponseFirst: typeof getModelAttrResponseFirst;
    safeParseInt: typeof safeParseInt;
    safeParseFloat: typeof safeParseFloat;
    getCacheTokens: typeof getCacheTokens;
};
export declare const ChartUtils: {
    padHistogramBinsToMin: (points: Array<{
        bin: string;
        count: number;
    }>, opts: {
        minPoints?: number;
        binWidth: number;
        minStart?: number;
        maxPoints?: number;
    }) => Array<{
        bin: string;
        count: number;
    }>;
};
export {};
//# sourceMappingURL=utilts.d.ts.map