/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 * @plan PLAN-20250909-TOKTRACK.P08
 */
import { GenerateContentResponseUsageMetadata } from '@google/genai';
import { Config } from '../config/config.js';
import { type CompletedToolCall } from '../core/coreToolScheduler.js';
import { ToolConfirmationOutcome } from '../tools/tools.js';
import type { IContent } from '../services/history/IContent.js';
import type { ProviderCapabilities, ProviderContext, ToolCall, ProviderPerformanceMetrics } from '../providers/types.js';
export declare enum ToolCallDecision {
    ACCEPT = "accept",
    REJECT = "reject",
    MODIFY = "modify",
    AUTO_ACCEPT = "auto_accept"
}
export declare function getDecisionFromOutcome(outcome: ToolConfirmationOutcome): ToolCallDecision;
export declare class StartSessionEvent {
    'event.name': 'cli_config';
    'event.timestamp': string;
    model: string;
    embedding_model: string | undefined;
    sandbox_enabled: boolean;
    core_tools_enabled: string;
    approval_mode: string;
    api_key_enabled: boolean;
    vertex_ai_enabled: boolean;
    debug_enabled: boolean;
    mcp_servers: string;
    telemetry_enabled: boolean;
    telemetry_log_user_prompts_enabled: boolean;
    file_filtering_respect_git_ignore: boolean;
    constructor(config: Config);
}
export declare class EndSessionEvent {
    'event.name': 'end_session';
    'event.timestamp': string;
    session_id?: string;
    constructor(config?: Config);
}
export declare class UserPromptEvent {
    'event.name': 'user_prompt';
    'event.timestamp': string;
    prompt_length: number;
    prompt_id: string;
    auth_type?: string;
    prompt?: string;
    constructor(prompt_length: number, prompt_Id: string, auth_type?: string, prompt?: string);
}
export declare class ToolCallEvent {
    'event.name': 'tool_call';
    'event.timestamp': string;
    function_name: string;
    function_args: Record<string, unknown>;
    duration_ms: number;
    success: boolean;
    decision?: ToolCallDecision;
    error?: string;
    error_type?: string;
    prompt_id: string;
    tool_type: 'native' | 'mcp';
    metadata?: Record<string, unknown>;
    agent_id: string;
    constructor(call: CompletedToolCall);
}
export declare class ApiRequestEvent {
    'event.name': 'api_request';
    'event.timestamp': string;
    model: string;
    prompt_id: string;
    request_text?: string;
    constructor(model: string, prompt_id: string, request_text?: string);
}
export declare class ApiErrorEvent {
    'event.name': 'api_error';
    'event.timestamp': string;
    model: string;
    error: string;
    error_type?: string;
    status_code?: number | string;
    duration_ms: number;
    prompt_id: string;
    auth_type?: string;
    constructor(model: string, error: string, duration_ms: number, prompt_id: string, auth_type?: string, error_type?: string, status_code?: number | string);
}
export declare class ApiResponseEvent {
    'event.name': 'api_response';
    'event.timestamp': string;
    model: string;
    status_code?: number | string;
    duration_ms: number;
    error?: string;
    input_token_count: number;
    output_token_count: number;
    cached_content_token_count: number;
    thoughts_token_count: number;
    tool_token_count: number;
    total_token_count: number;
    response_text?: string;
    prompt_id: string;
    auth_type?: string;
    constructor(model: string, duration_ms: number, prompt_id: string, auth_type?: string, usage_data?: GenerateContentResponseUsageMetadata, response_text?: string, error?: string);
}
export declare enum LoopType {
    CONSECUTIVE_IDENTICAL_TOOL_CALLS = "consecutive_identical_tool_calls",
    CHANTING_IDENTICAL_SENTENCES = "chanting_identical_sentences",
    MAX_TURNS_EXCEEDED = "max_turns_exceeded"
}
export declare class LoopDetectedEvent {
    'event.name': 'loop_detected';
    'event.timestamp': string;
    loop_type: LoopType;
    prompt_id: string;
    constructor(loop_type: LoopType, prompt_id: string);
}
export declare class NextSpeakerCheckEvent {
    'event.name': 'next_speaker_check';
    'event.timestamp': string;
    prompt_id: string;
    finish_reason: string;
    result: string;
    constructor(prompt_id: string, finish_reason: string, result: string);
}
export declare class SlashCommandEvent {
    'event.name': 'slash_command';
    'event.timestamp': string;
    command: string;
    subcommand?: string;
    constructor(command: string, subcommand?: string);
}
export declare class MalformedJsonResponseEvent {
    'event.name': 'malformed_json_response';
    'event.timestamp': string;
    model: string;
    constructor(model: string);
}
export declare class ConversationRequestEvent {
    'event.name': 'conversation_request';
    'event.timestamp': string;
    provider_name: string;
    conversation_id: string;
    turn_number: number;
    prompt_id: string;
    redacted_messages: IContent[];
    redacted_tools?: Array<{
        functionDeclarations: Array<{
            name: string;
            description?: string;
            parameters?: unknown;
        }>;
    }>;
    tool_format?: string;
    provider_switched?: boolean;
    constructor(provider_name: string, conversation_id: string, turn_number: number, prompt_id: string, redacted_messages: IContent[], redacted_tools?: Array<{
        functionDeclarations: Array<{
            name: string;
            description?: string;
            parameters?: unknown;
        }>;
    }>, tool_format?: string, provider_switched?: boolean);
}
export declare class ConversationResponseEvent {
    'event.name': 'conversation_response';
    'event.timestamp': string;
    provider_name: string;
    conversation_id: string;
    turn_number: number;
    prompt_id: string;
    redacted_content: string;
    duration_ms: number;
    success: boolean;
    error?: string;
    tool_calls?: unknown[];
    constructor(provider_name: string, conversation_id: string, turn_number: number, prompt_id: string, redacted_content: string, duration_ms: number, success: boolean, error?: string, tool_calls?: unknown[]);
}
export declare class ProviderSwitchEvent {
    'event.name': 'provider_switch';
    'event.timestamp': string;
    from_provider: string;
    to_provider: string;
    conversation_id: string;
    context_preserved: boolean;
    constructor(from_provider: string, to_provider: string, conversation_id: string, context_preserved: boolean);
}
/**
 * @plan PLAN-20250909-TOKTRACK.P10
 */
export declare class EnhancedConversationResponseEvent extends ConversationResponseEvent {
    provider_context: ProviderContext;
    performance_metrics: ProviderPerformanceMetrics;
    tool_calls_detailed: ToolCall[];
    constructor(provider_name: string, conversation_id: string, turn_number: number, prompt_id: string, redacted_content: string, duration_ms: number, success: boolean, error?: string, tool_calls?: ToolCall[], performance_metrics?: ProviderPerformanceMetrics, provider_context?: ProviderContext);
    private createDefaultMetrics;
    private createDefaultContext;
}
export declare class ProviderCapabilityEvent {
    'event.name': 'provider_capability';
    'event.timestamp': string;
    provider_name: string;
    capabilities: ProviderCapabilities;
    context: ProviderContext;
    constructor(provider_name: string, capabilities: ProviderCapabilities, context: ProviderContext);
}
export declare class KittySequenceOverflowEvent {
    'event.name': 'kitty_sequence_overflow';
    'event.timestamp': string;
    sequence_length: number;
    sequence: string;
    constructor(sequence_length: number, sequence: string);
}
export declare class TokenUsageEvent {
    'event.name': 'token_usage';
    'event.timestamp': string;
    provider: string;
    conversationId: string;
    input: number;
    output: number;
    cache: number;
    tool: number;
    thought: number;
    total: number;
    constructor(provider: string, conversationId: string, input: number, output: number, cache: number, tool: number, thought: number, total: number);
}
export declare class PerformanceMetricsEvent {
    'event.name': 'performance_metrics';
    'event.timestamp': string;
    provider: string;
    tokensPerMinute: number;
    throttleWaitTimeMs: number;
    totalRequests: number;
    errorRate: number;
    constructor(provider: string, tokensPerMinute: number, throttleWaitTimeMs: number, totalRequests: number, errorRate: number);
}
export declare enum IdeConnectionType {
    EXTENSION = "extension",
    CLI = "cli",
    WEB = "web"
}
export declare class IdeConnectionEvent {
    'event.name': 'ide_connection';
    'event.timestamp': string;
    connectionType: IdeConnectionType;
    version?: string;
    constructor(connectionType: IdeConnectionType, version?: string);
}
export declare enum FileOperation {
    CREATE = "create",
    READ = "read",
    UPDATE = "update"
}
export declare class ToolOutputTruncatedEvent {
    eventName: 'tool_output_truncated';
    prompt_id: string;
    tool_name: string;
    original_content_length: number;
    truncated_content_length: number;
    threshold: number;
    lines?: number;
    constructor(promptId: string, params: {
        toolName: string;
        originalContentLength: number;
        truncatedContentLength: number;
        threshold: number;
        lines?: number;
    });
}
export declare class FileOperationEvent {
    tool_name: string;
    operation: FileOperation | string;
    lines?: number;
    mimetype?: string;
    extension?: string;
    programming_language?: string;
    constructor(toolName: string, operation: FileOperation | string, lines?: number, mimetype?: string, extension?: string, programmingLanguage?: string);
}
export declare class ModelRoutingEvent {
    model: string;
    source: string;
    contextLimit: number;
    reason?: string;
    fallback: boolean;
    error?: unknown;
    constructor(model: string, source: string, contextLimit: number, reason?: string, fallback?: boolean, error?: unknown);
}
export declare class ExtensionInstallEvent {
    extension_name: string;
    extension_version: string;
    extension_source: string;
    status: string;
    constructor(name: string, version: string, source: string, status: string);
}
export declare class ExtensionUninstallEvent {
    extension_name: string;
    status: string;
    constructor(name: string, status: string);
}
export declare class ExtensionEnableEvent {
    extension_name: string;
    setting_scope: string;
    constructor(name: string, scope: string);
}
export declare class ExtensionDisableEvent {
    extension_name: string;
    setting_scope: string;
    constructor(name: string, scope: string);
}
export type TelemetryEvent = StartSessionEvent | EndSessionEvent | UserPromptEvent | ToolCallEvent | ApiRequestEvent | ApiErrorEvent | ApiResponseEvent | LoopDetectedEvent | NextSpeakerCheckEvent | SlashCommandEvent | MalformedJsonResponseEvent | ConversationRequestEvent | ConversationResponseEvent | EnhancedConversationResponseEvent | ProviderSwitchEvent | ProviderCapabilityEvent | KittySequenceOverflowEvent | TokenUsageEvent | PerformanceMetricsEvent;
