/**
 * Agent Profiles TypeScript Definitions
 *
 * Comprehensive type definitions for advanced AI Agent management system
 * with real-time monitoring, testing, and analytics capabilities.
 */
export interface AgentProfile {
    id: string;
    name: string;
    description?: string;
    type: AgentType;
    status: AgentStatus;
    health: number;
    conversations: number;
    success_rate: number;
    avg_response_time: number;
    tools: string[];
    capabilities: string[];
    model: string;
    created_at: string;
    updated_at?: string;
    last_active: string;
    configuration: AgentConfiguration;
    metrics?: AgentMetrics;
    deployment?: AgentDeployment;
    tags?: string[];
    version?: string;
    owner?: string;
    team?: string;
}
export type AgentType = 'coding' | 'support' | 'research' | 'content' | 'sales' | 'analytics' | 'moderation' | 'translation' | 'creative' | 'custom';
export type AgentStatus = 'active' | 'paused' | 'failed' | 'deploying' | 'testing' | 'maintenance' | 'archived';
export interface AgentConfiguration {
    model_settings: ModelSettings;
    system_prompt: string;
    temperature: number;
    max_tokens: number;
    top_p?: number;
    top_k?: number;
    frequency_penalty?: number;
    presence_penalty?: number;
    stop_sequences?: string[];
    tools_config: Record<string, any>;
    memory_config?: MemoryConfig;
    security_config?: SecurityConfig;
    rate_limits?: RateLimits;
    escalation_rules?: EscalationRule[];
    fallback_behavior?: FallbackBehavior;
    learning_config?: LearningConfig;
}
export interface ModelSettings {
    provider: string;
    model_name: string;
    version?: string;
    endpoint?: string;
    api_key_ref?: string;
    custom_headers?: Record<string, string>;
    timeout?: number;
    retry_config?: RetryConfig;
}
export interface MemoryConfig {
    enabled: boolean;
    type: 'short_term' | 'long_term' | 'episodic' | 'semantic';
    max_items: number;
    retention_days?: number;
    embedding_model?: string;
    similarity_threshold?: number;
}
export interface SecurityConfig {
    input_validation: boolean;
    output_filtering: boolean;
    pii_detection: boolean;
    content_moderation: boolean;
    allowed_domains?: string[];
    blocked_keywords?: string[];
    max_conversation_length?: number;
}
export interface RateLimits {
    requests_per_minute: number;
    tokens_per_minute?: number;
    concurrent_conversations?: number;
    daily_token_limit?: number;
    burst_allowance?: number;
}
export interface EscalationRule {
    id: string;
    name: string;
    conditions: EscalationCondition[];
    actions: EscalationAction[];
    priority: number;
    enabled: boolean;
}
export interface EscalationCondition {
    type: 'confidence_threshold' | 'keyword_detected' | 'user_request' | 'error_rate' | 'response_time';
    operator: 'lt' | 'gt' | 'eq' | 'contains' | 'not_contains';
    value: any;
}
export interface EscalationAction {
    type: 'notify_human' | 'transfer_to_agent' | 'send_email' | 'webhook' | 'pause_agent';
    target?: string;
    message?: string;
    delay?: number;
}
export interface FallbackBehavior {
    enabled: boolean;
    fallback_message?: string;
    fallback_agent_id?: string;
    human_handoff?: boolean;
    retry_attempts?: number;
    retry_delay?: number;
}
export interface LearningConfig {
    enabled: boolean;
    learning_rate: number;
    feedback_integration: boolean;
    auto_improvement: boolean;
    knowledge_base_updates: boolean;
    pattern_recognition: boolean;
}
export interface AgentMetrics {
    total_conversations: number;
    successful_conversations: number;
    failed_conversations: number;
    avg_satisfaction: number;
    cost_per_conversation: number;
    uptime_percentage: number;
    response_time_p50: number;
    response_time_p95: number;
    response_time_p99: number;
    tokens_consumed: number;
    errors_count: number;
    escalations_count: number;
    user_ratings: UserRating[];
    performance_trends: PerformanceTrend[];
    cost_breakdown: CostBreakdown;
    resource_usage: ResourceUsage;
}
export interface UserRating {
    rating: number;
    feedback?: string;
    timestamp: string;
    conversation_id: string;
    user_id?: string;
}
export interface PerformanceTrend {
    timestamp: string;
    metric: string;
    value: number;
    unit: string;
}
export interface CostBreakdown {
    input_tokens_cost: number;
    output_tokens_cost: number;
    tool_usage_cost: number;
    storage_cost: number;
    compute_cost: number;
    total_cost: number;
    currency: string;
}
export interface ResourceUsage {
    cpu_usage: number;
    memory_usage: number;
    storage_usage: number;
    network_in: number;
    network_out: number;
    gpu_usage?: number;
}
export interface AgentDeployment {
    environment: 'development' | 'staging' | 'production';
    region: string;
    instance_type: string;
    replicas: number;
    auto_scaling: boolean;
    load_balancer: boolean;
    health_check_url: string;
    deployment_id: string;
    deployed_at: string;
    rollout_strategy: 'blue_green' | 'rolling' | 'canary';
}
export interface RetryConfig {
    max_attempts: number;
    initial_delay: number;
    max_delay: number;
    backoff_multiplier: number;
    retry_on_timeout: boolean;
    retry_on_rate_limit: boolean;
}
export interface AgentHealthCheck {
    agent_id: string;
    overall_health: number;
    last_check: string;
    checks: HealthCheckResult[];
    predictions: HealthPrediction[];
    recommendations: string[];
}
export interface HealthCheckResult {
    name: string;
    status: 'healthy' | 'warning' | 'critical';
    value: number;
    threshold: number;
    message?: string;
    last_updated: string;
}
export interface HealthPrediction {
    metric: string;
    trend: 'improving' | 'stable' | 'declining';
    confidence: number;
    estimated_failure_time?: string;
    recommended_actions: string[];
}
export interface AgentConversation {
    id: string;
    agent_id: string;
    user_id: string;
    channel: string;
    started_at: string;
    ended_at?: string;
    status: 'active' | 'completed' | 'escalated' | 'failed';
    messages: ConversationMessage[];
    metadata: ConversationMetadata;
    metrics: ConversationMetrics;
}
export interface ConversationMessage {
    id: string;
    role: 'user' | 'agent' | 'system';
    content: string;
    timestamp: string;
    metadata?: MessageMetadata;
    attachments?: MessageAttachment[];
}
export interface MessageMetadata {
    sentiment?: 'positive' | 'neutral' | 'negative';
    confidence?: number;
    intent?: string;
    entities?: NamedEntity[];
    tokens_used?: number;
    processing_time?: number;
    model_version?: string;
}
export interface NamedEntity {
    text: string;
    label: string;
    confidence: number;
    start: number;
    end: number;
}
export interface MessageAttachment {
    id: string;
    type: 'image' | 'document' | 'audio' | 'video' | 'link';
    url: string;
    filename?: string;
    size?: number;
    processed?: boolean;
}
export interface ConversationMetadata {
    user_agent?: string;
    ip_address?: string;
    location?: string;
    referrer?: string;
    session_id?: string;
    tags?: string[];
    priority?: 'low' | 'normal' | 'high' | 'urgent';
}
export interface ConversationMetrics {
    duration: number;
    message_count: number;
    user_satisfaction?: number;
    resolution_status: 'resolved' | 'unresolved' | 'escalated';
    escalation_reason?: string;
    cost: number;
    tokens_used: number;
    response_times: number[];
}
export interface AgentTemplate {
    id: string;
    name: string;
    description: string;
    category: AgentType;
    configuration: Partial<AgentConfiguration>;
    recommended_tools: string[];
    use_cases: string[];
    complexity: 'beginner' | 'intermediate' | 'advanced';
    estimated_setup_time: number;
    preview_image?: string;
    documentation_url?: string;
}
export interface AgentProfilesProps {
    className?: string;
    showMetrics?: boolean;
    autoRefresh?: boolean;
    realTimeUpdates?: boolean;
    enableBulkOperations?: boolean;
    enableAdvancedFiltering?: boolean;
    enableSemanticSearch?: boolean;
    enableSavedFilters?: boolean;
    showLiveMetrics?: boolean;
    showConversationInsights?: boolean;
    showHealthMonitoring?: boolean;
    enableAgentTesting?: boolean;
    enableConfigValidation?: boolean;
    enableImportExport?: boolean;
    enableCustomLayout?: boolean;
    enableKeyboardShortcuts?: boolean;
    enableMultipleViews?: boolean;
    refreshInterval?: number;
    maxAgentsPerPage?: number;
    onAgentSelect?: (agent: AgentProfile) => void;
    onAgentCreate?: (agent: AgentProfile) => void;
    onAgentUpdate?: (agent: AgentProfile) => void;
    onAgentDelete?: (agentId: string) => void;
}
export interface AgentCardProps {
    agent: AgentProfile;
    selected?: boolean;
    onSelect?: () => void;
    onToggleSelect?: (selected: boolean) => void;
    enableBulkOperations?: boolean;
    showLiveMetrics?: boolean;
    onClick?: () => void;
}
export interface AgentFiltersProps {
    filters: AgentFilters;
    onFiltersChange: (filters: Partial<AgentFilters>) => void;
    enableAdvancedFiltering?: boolean;
    enableSavedFilters?: boolean;
}
export interface AgentFilters {
    status?: AgentStatus[];
    type?: AgentType[];
    model?: string[];
    health_range?: [number, number];
    created_after?: string;
    created_before?: string;
    tags?: string[];
    owner?: string[];
    team?: string[];
    deployment_environment?: string[];
    has_errors?: boolean;
    conversations_range?: [number, number];
    success_rate_range?: [number, number];
}
export type ViewMode = 'cards' | 'list' | 'table';
export type LayoutMode = 'default' | 'compact' | 'detailed' | 'custom';
export interface AgentProfilesContextValue {
    agents: AgentProfile[];
    loading: boolean;
    error: string | null;
    filters: AgentFilters;
    selectedAgents: string[];
    metrics: GlobalAgentMetrics | null;
    fetchAgents: () => Promise<void>;
    createAgent: (data: CreateAgentRequest) => Promise<AgentProfile>;
    updateAgent: (id: string, data: UpdateAgentRequest) => Promise<AgentProfile>;
    deleteAgent: (id: string) => Promise<void>;
    cloneAgent: (id: string, name: string) => Promise<AgentProfile>;
    deployAgent: (id: string, environment: string) => Promise<void>;
    pauseAgent: (id: string) => Promise<void>;
    resumeAgent: (id: string) => Promise<void>;
    testAgent: (id: string, message: string) => Promise<AgentTestResult>;
    bulkPauseAgents: (ids: string[]) => Promise<void>;
    bulkResumeAgents: (ids: string[]) => Promise<void>;
    bulkDeleteAgents: (ids: string[]) => Promise<void>;
    setFilters: (filters: Partial<AgentFilters>) => void;
    setSelectedAgents: (ids: string[]) => void;
    clearError: () => void;
}
export interface GlobalAgentMetrics {
    total_agents: number;
    active_agents: number;
    paused_agents: number;
    failed_agents: number;
    total_conversations: number;
    avg_response_time: number;
    total_cost: number;
    success_rate: number;
    uptime_percentage: number;
    tokens_consumed_today: number;
    cost_today: number;
    top_performing_agents: AgentPerformanceSummary[];
    alerts: AgentAlert[];
}
export interface AgentPerformanceSummary {
    agent_id: string;
    agent_name: string;
    conversations: number;
    success_rate: number;
    avg_satisfaction: number;
    cost_efficiency: number;
}
export interface AgentAlert {
    id: string;
    agent_id: string;
    agent_name: string;
    type: 'performance' | 'cost' | 'error' | 'health';
    severity: 'low' | 'medium' | 'high' | 'critical';
    message: string;
    timestamp: string;
    acknowledged: boolean;
}
export interface CreateAgentRequest {
    name: string;
    description?: string;
    type: AgentType;
    template_id?: string;
    configuration: AgentConfiguration;
    tags?: string[];
    team?: string;
}
export interface UpdateAgentRequest {
    name?: string;
    description?: string;
    configuration?: Partial<AgentConfiguration>;
    tags?: string[];
    status?: AgentStatus;
}
export interface AgentTestResult {
    response: string;
    metrics: {
        response_time: number;
        tokens_used: number;
        confidence: number;
        cost: number;
    };
    metadata: {
        model_version: string;
        timestamp: string;
        conversation_id: string;
    };
}
export interface UseAgentProfilesReturn extends AgentProfilesContextValue {
}
export interface UseAgentHealthReturn {
    health: AgentHealthCheck | null;
    loading: boolean;
    error: string | null;
    fetchHealth: (agentId: string) => Promise<void>;
    subscribeToHealth: (agentId: string) => () => void;
}
export interface UseAgentConversationsReturn {
    conversations: AgentConversation[];
    loading: boolean;
    error: string | null;
    fetchConversations: (agentId: string, filters?: any) => Promise<void>;
    subscribeToConversations: (agentId: string) => () => void;
}
export declare const AGENT_VALIDATION_RULES: {
    readonly name: {
        readonly required: true;
        readonly minLength: 3;
        readonly maxLength: 100;
        readonly pattern: RegExp;
    };
    readonly temperature: {
        readonly min: 0;
        readonly max: 2;
        readonly step: 0.1;
    };
    readonly max_tokens: {
        readonly min: 1;
        readonly max: 32000;
    };
    readonly system_prompt: {
        readonly required: true;
        readonly minLength: 10;
        readonly maxLength: 4000;
    };
};
export declare const AGENT_STATUS_COLORS: Record<AgentStatus, string>;
export declare const AGENT_TYPE_ICONS: Record<AgentType, string>;
//# sourceMappingURL=types.d.ts.map