export declare const MAX_AI_CONTENT_BYTES: number; export declare const MAX_AI_SPANS_PER_RUN = 100; export interface AiErrorDetail { message: string; terminal_code?: string; terminal_state?: string; retryable?: boolean; cause?: string; } export declare function resolveAiError(isError: boolean, error: AiErrorDetail | undefined, failure?: string): AiErrorDetail | undefined; export declare function boundAiContent(value: unknown): { value: unknown; truncated: boolean; }; export declare function toPostHogMessages(value: unknown): unknown; export interface AiTraceEventInput { runId: string; threadId: string | null; userId: string | null; spanName: string; model: string; provider: string; durationMs: number; isError: boolean; error?: AiErrorDetail; errorType?: string; inputTokens?: number; outputTokens?: number; costUsd?: number; createdAt: number; browserSessionId?: string; extraProperties?: Record; } export declare function emitAiTraceEvent(input: AiTraceEventInput): void; export interface AiSpanEventInput { runId: string; threadId: string | null; userId: string | null; spanId: string; parentId?: string; spanName: string; latencySeconds: number; isError: boolean; error?: AiErrorDetail; errorType?: string; createdAt: number; browserSessionId?: string; inputState?: unknown; outputState?: unknown; extraProperties?: Record; } export declare function emitAiSpanEvent(input: AiSpanEventInput): void; export interface AiFeedbackSurveyInput { runId: string | null; threadId: string | null; userId: string | null; feedbackType: "thumbs_up" | "thumbs_down" | "category" | "text"; value: string; submissionId: string; model?: string; browserSessionId?: string; } export declare function emitAiFeedbackSurveyEvent(input: AiFeedbackSurveyInput): boolean; export declare function toAiErrorDetail(errorMessage: string | null | undefined, terminalOutcome?: { state?: string; code?: string; retryable?: boolean; }): AiErrorDetail | undefined;