import type ddTrace from "dd-trace";
/** Span handle provided by DataDog's tracer implementation. */
export type LLMObsSpan = ddTrace.Span;
export type LLMObsMessage = ddTrace.llmobs.Message & {
    toolId?: string;
};
/** Span context metadata for propagation across async boundaries. */
export type LLMObsSpanContext = ddTrace.SpanContext;
/** Exported span payload used for manual submission to DataDog. */
export type ExportedLLMObsSpan = ddTrace.llmobs.ExportedLLMObsSpan;
/** Span type: 'llm', 'workflow', 'task', 'tool', 'agent'. */
export type LLMObsSpanKind = ddTrace.llmobs.spanKind;
/** Evaluation payload for quality scores and user feedback. */
export type LLMObsEvaluationOptions = ddTrace.llmobs.EvaluationOptions;
/** Annotation payload for tagging spans with metadata, errors, and extra data. */
export type LLMObsAnnotationOptions = Omit<ddTrace.llmobs.AnnotationOptions, "metrics"> & {
    model?: {
        name: string;
        provider: string;
    };
    metrics?: LLMObsMetrics;
    error?: unknown;
};
export type LLMObsMetrics = {
    inputTokens?: number;
    outputTokens?: number;
    totalTokens?: number;
    reasoningTokens?: number;
    cacheReadTokens?: number;
    cacheWriteTokens?: number;
    toolCallCount?: number;
    staticToolCallCount?: number;
    dynamicToolCallCount?: number;
    filesGeneratedCount?: number;
    stepCount?: number;
    /** Datadog requires this to be in seconds */
    timeToFirstToken?: number;
};
/** Controls whether the span may start a new trace when no parent exists. */
export type LLMObsRootPolicy = "allow" | "drop-if-no-parent";
/** Base configuration for creating an LLMObs span. */
export interface LLMObsSpanOptions {
    kind: LLMObsSpanKind;
    modelName?: string;
    modelProvider?: string;
    sessionId?: string;
    tags?: {
        [key: string]: any;
    };
    /** If not specified, the tracer's default root policy is used. */
    rootPolicy?: LLMObsRootPolicy;
}
/** Span options that require an explicit name. */
export interface LLMObsNamedSpanOptions extends LLMObsSpanOptions {
    name: string;
    inputData?: string;
}
/** Span options where the name can default to function or kind. */
export interface LLMObsNamelessSpanOptions extends LLMObsSpanOptions {
    name?: string;
}
/** Options for manually managed spans, including activation scope. */
export interface LLMObsManualSpanOptions extends LLMObsNamedSpanOptions {
    activation?: LLMObsActivationScope;
}
/** Activation scope controls how long a span remains active. */
export type LLMObsActivationScope = "local" | "global";
//# sourceMappingURL=types.d.ts.map