import { type LangfuseObservation, type LangfuseObservationType } from "@langfuse/tracing";
import type { DeploymentMode, ExecutionLangfuseLink, ExecutionObservabilityContext } from "@rudderhq/shared";
export interface LangfuseRuntimeConfig {
    enabled: boolean;
    baseUrl: string;
    publicKey?: string;
    secretKey?: string;
    environment?: string;
    instanceId: string;
    deploymentMode: DeploymentMode;
    localEnv?: string | null;
    release: string;
}
export interface LangfuseScoreInput {
    id?: string;
    rootExecutionId: string;
    name: string;
    value: boolean | number | string;
    comment?: string;
    metadata?: Record<string, unknown>;
}
type ActiveObservationType = Exclude<LangfuseObservationType, "event">;
type TraceIoAttributes = {
    input?: unknown;
    output?: unknown;
};
type OpenAiUsageLike = {
    promptTokens?: number;
    completionTokens?: number;
    totalTokens?: number;
};
type ExecutionObservationAttributes = {
    level?: "DEBUG" | "DEFAULT" | "WARNING" | "ERROR";
    input?: unknown;
    output?: unknown;
    metadata?: Record<string, unknown>;
    statusMessage?: string;
    completionStartTime?: Date;
    model?: string;
    modelParameters?: {
        [key: string]: string | number;
    };
    usageDetails?: {
        [key: string]: number;
    } | OpenAiUsageLike;
    costDetails?: {
        [key: string]: number;
    };
};
export declare function createStableUuid(seed: string): string;
export declare function createExecutionScoreId(rootExecutionId: string, scoreName: string): string;
export declare function redactLangfuseValue(value: unknown): unknown;
export declare function resolveLangfuseTraceIdentity(context?: Pick<ExecutionObservabilityContext, "environment" | "instanceId" | "release">, config?: Pick<LangfuseRuntimeConfig, "environment" | "instanceId" | "release"> | null): {
    environment: string | null;
    instanceId: string | null;
    release: string | null;
};
export declare function getExecutionTraceId(rootExecutionId: string): Promise<string>;
export declare function isLangfuseEnabled(): boolean;
export declare function initializeLangfuse(config: LangfuseRuntimeConfig): void;
export declare function shutdownLangfuse(): Promise<void>;
export declare function withExecutionObservation<T>(context: ExecutionObservabilityContext, input: {
    name: string;
    asType?: ActiveObservationType;
    input?: unknown;
    metadata?: Record<string, unknown>;
}, fn: (observation: LangfuseObservation | null) => Promise<T>): Promise<T>;
export declare function observeExecutionEvent(context: ExecutionObservabilityContext, input: {
    name: string;
    asType?: LangfuseObservationType;
    level?: "DEBUG" | "DEFAULT" | "WARNING" | "ERROR";
    input?: unknown;
    output?: unknown;
    metadata?: Record<string, unknown>;
    statusMessage?: string;
}): Promise<ExecutionLangfuseLink | null>;
export declare function startExecutionChildObservation(parentObservation: LangfuseObservation | null, context: ExecutionObservabilityContext, input: {
    name: string;
    asType?: LangfuseObservationType;
    startTime?: Date;
} & ExecutionObservationAttributes): LangfuseObservation | null;
export declare function updateExecutionObservation(observation: LangfuseObservation | null, context: ExecutionObservabilityContext, attributes: ExecutionObservationAttributes): void;
export declare function updateExecutionTraceIO(observation: LangfuseObservation | null, attributes: TraceIoAttributes): void;
export declare function updateExecutionTraceSession(observation: LangfuseObservation | null, sessionId: string | null | undefined): void;
export declare function updateExecutionTraceName(observation: LangfuseObservation | null, traceName: string | null | undefined): void;
export declare function getExecutionLangfuseLink(rootExecutionId: string): Promise<ExecutionLangfuseLink | null>;
export declare function normalizeLangfuseScoreValue(value: boolean | number | string): {
    value: number | string;
    dataType?: "BOOLEAN" | "NUMERIC" | "CATEGORICAL";
};
export declare function createExecutionScores(context: ExecutionObservabilityContext, scores: LangfuseScoreInput[]): Promise<void>;
export {};
//# sourceMappingURL=langfuse.d.ts.map