/** * ThinkHive SDK v4.1.0 * * Run-centric AI agent observability platform with: * - Facts vs Inferences (claims API) * - Deterministic ticket linking (7 methods) * - Customer context snapshots (time-series) * - Calibrated predictions (Brier scores) * - Configurable ROI calculation engine * * @version 4.1.0 * @license MIT */ import { isInitialized, SDK_VERSION, DEFAULT_ENDPOINT } from './core/config'; import { ThinkHiveError, ThinkHiveApiError, ThinkHiveValidationError, PermissionDeniedError, AgentScopeError, RateLimitError, IpWhitelistError } from './core/client'; import { runs, createRunWithContext, toOpenAIMessages, fromOpenAIMessages } from './api/runs'; import { claims, isFact, isInference, isComputed, getHighConfidenceClaims, groupClaimsByType, groupClaimsByCategory } from './api/claims'; import { calibration, calculateBrierScore, calculateECE, isWellCalibrated, getCalibrationQuality } from './api/calibration'; import { humanReview } from './api/human-review'; import { nondeterminism, calculatePassAtK, calculatePassToK, requiredPassRateForPassAtK, isReliableEvaluation, getReliabilityRecommendation } from './api/nondeterminism'; import { evalHealth, hasHealthIssue, getSeverityLevel as getHealthSeverityLevel, isSaturated, getSaturationRecommendation } from './api/eval-health'; import { deterministicGraders, createRegexRule, createContainsRule, createLengthRule, createJsonSchemaRule, allRulesPassed, getFailedRules, calculateAverageScore } from './api/deterministic-graders'; import { conversationEval, aggregateWorst, aggregateAverage, aggregateWeighted, aggregateFinalTurn, aggregateMajority, getAggregator, getProblematicTurns, analyzeConversationTrend } from './api/conversation-eval'; import { transcriptPatterns, isHighRisk, getMatchesByCategory, getCriticalInsights, hasPiiExposure, hasFrustrationSignals, hasEscalationRequest, getCategoryDistribution, getRecommendations, needsAttention, sortMatchesBySeverity } from './api/transcript-patterns'; import { agents } from './api/agents'; import { evalRuns } from './api/eval-runs'; import { signals } from './api/signals'; import { notifications } from './api/notifications'; import { documents } from './api/documents'; import { shadowTests } from './api/shadow-tests'; import { sessions } from './api/sessions'; import { drift, hasDrift, getDriftSeverity } from './api/drift'; import { llmCosts, formatCost as formatLLMCost } from './api/llm-costs'; import { guardrails } from './guardrails'; import { apiKeys, hasPermission, isExpired as isApiKeyExpired, isValid as isApiKeyValid, getTimeUntilExpiry, canAccessAgent } from './api/apiKeys'; import { roiAnalytics, calculateRevenueAtRisk, calculateAutomationSavings, formatCurrency, getROIQuality } from './api/roi-analytics'; import { businessMetrics, isMetricReady, needsMoreTraces, awaitingExternalData, isMetricStale, getStatusMessage, getTraceProgress, formatMetricValue, getTrendEmoji } from './api/business-metrics'; import { qualityMetrics, passesQualityThreshold, isHallucinationRiskAcceptable, getQualityRecommendations, formatQualityScore, getGradeColor } from './api/quality-metrics'; import { linking, generateZendeskMarker, parseZendeskMarker, hasZendeskMarker, removeZendeskMarker, linkRunToTicket, linkRunToZendeskTicket, getBestLinkMethod, LINK_METHOD_CONFIDENCE } from './integrations/ticket-linking'; import { customerContext, captureCustomerContext, getContextAsOf, toContextSnapshot, calculateArrChange, calculateHealthTrend } from './integrations/customer-context'; export type { InitOptions, Framework, RunOptions, RunOutcome, ConversationMessage, CustomerContextSnapshot, TicketLinkingOptions, LinkMethod, TraceOptions, TraceCustomFlag, SpanData, BusinessContext, Claim, ClaimType, ClaimCategory, ConfidenceCalibration, EvidenceReference, AnalysisResult, CalibrationStatus, CalibrationBucket, PredictionType, RoiConfig, RoiSummary, ExplainabilityResult, ApiResponse, PaginatedResponse, RunResponse, } from './core/types'; export type { HumanReviewStatus, HumanReviewType, HumanReviewQueueItem, CalibrationSet, ReviewerCalibration, QueueStats, } from './api/human-review'; export type { NondeterminismRunType, NondeterminismRunStatus, NondeterminismRun, NondeterminismSample, TraceAnalysis, CriterionAnalysis, RunSummary, } from './api/nondeterminism'; export type { SaturationType, HealthStatus, RegressionSeverity, EvalHealthSnapshot, EvalRegression, HealthReport, } from './api/eval-health'; export type { RuleType, DeterministicEvalResult, RuleResult, RuleTypeInfo, RuleTemplate, } from './api/deterministic-graders'; export type { AggregateMethod, SessionTrace, TurnEvaluation, ConversationEvalResult, AggregationMethodInfo, } from './api/conversation-eval'; export type { PatternCategory, PatternOutcome, PatternSeverity, PatternMatch, PatternInsight, AnalysisResult as PatternAnalysisResult, PatternCategoryInfo, BuiltInPattern, } from './api/transcript-patterns'; export type { ApiKeyPermissions, ScopeType, Environment, CreateApiKeyOptions, ApiKey, CreateApiKeyResult, } from './api/apiKeys'; export type { IndustryConfig, CustomIndustryConfig, ROIMetrics, BusinessImpact, ROISummary, TrendDataPoint, Correlation, PatternCluster, CorrelationAnalysis, } from './api/roi-analytics'; export type { RetrievedContext, GroundTruthContext, GroundedSpan, UngroundedSpan, CitationMap, RAGEvaluation, RAGEvidence, HallucinationInstance, HallucinationReport, GroundednessResult, BatchEvaluationResult, BatchEvaluationSummary, } from './api/quality-metrics'; export type { MetricTrend, MetricStatus, CurrentMetricResponse, MetricHistoryPoint, MetricHistorySummary, MetricHistoryResponse, RecordMetricOptions, RecordMetricResponse, } from './api/business-metrics'; export type { Agent, CreateAgentOptions, UpdateAgentOptions, AgentConfig, UpdateAgentConfigOptions, DeleteAgentOptions, CascadeImpact, } from './api/agents'; export type { CreateEvalRunOptions, GetEvalRunResultsOptions, ListEvalRunsOptions, EstimateCostOptions, GetTraceResultsOptions, EvalRun, EvalResult, EvalCostEstimate, } from './api/eval-runs'; export type { DetectionConfig, CreateSignalOptions, UpdateSignalOptions, ListSignalsOptions, SignalStatsOptions, SignalTrendsOptions, SignalTracesOptions, SignalEventsOptions, Signal, SignalStats, SignalTrendPoint, SignalEvent, } from './api/signals'; export type { NotificationRule, CreateNotificationRuleData, UpdateNotificationRuleData, Notification, } from './api/notifications'; export type { Document, DocumentUploadResponse, } from './api/documents'; export type { CreateShadowTestData, UpdateShadowTestData, ShadowTest, } from './api/shadow-tests'; export type { ListSessionsOptions, Session, SessionTrace as SessionTraceRecord, } from './api/sessions'; export type { DetectDriftOptions, DriftReport, DriftDimension, DetectAllResult, } from './api/drift'; export type { CostQueryOptions, CostSummary, CostBreakdownItem, AgentCostBreakdown, CostSavings, OptimizationEntry, OptimizationStats, OptimizationRecommendation, } from './api/llm-costs'; /** * Initialize ThinkHive SDK v3 * * @example * ```typescript * import { init } from '@thinkhive/sdk'; * * init({ * apiKey: 'th_your_api_key', * serviceName: 'my-ai-agent', * autoInstrument: true, * frameworks: ['langchain', 'openai'], * }); * ``` */ export declare function init(options?: import('./core/types').InitOptions): void; /** * Get the global tracer */ export declare function getTracer(): import("@opentelemetry/api").Tracer; /** * Shutdown the SDK and flush pending spans */ export declare function shutdown(): Promise; /** * Trace an LLM call */ export declare function traceLLM(options: { name: string; modelName?: string; provider?: string; input?: unknown; }, fn: () => Promise): Promise; /** * Trace a retrieval operation */ export declare function traceRetrieval(options: { name: string; query?: string; topK?: number; }, fn: () => Promise): Promise; /** * Trace a tool call */ export declare function traceTool(options: { name: string; toolName?: string; parameters?: Record; }, fn: () => Promise): Promise; /** * Trace a chain/workflow */ export declare function traceChain(options: { name: string; input?: unknown; }, fn: () => Promise): Promise; /** * Issues API client * This is the recommended API for managing clustered failure patterns * * @since 3.1.0 */ export declare const issues: { /** * List issues for an agent */ list(agentId: string, options?: { status?: string; startDate?: Date; endDate?: Date; limit?: number; offset?: number; }): Promise; /** * Get a single issue by ID */ get(id: string): Promise; /** * Create a new issue */ create(data: { agentId: string; title: string; description?: string; type: string; severity?: string; pattern?: string; exampleTraceIds?: string[]; }): Promise; /** * Update an issue */ update(id: string, data: { title?: string; description?: string; status?: string; severity?: string; assignedTo?: string; resolutionNotes?: string; }): Promise; /** * Get fixes for an issue */ getFixes(issueId: string): Promise; }; /** * Analyzer API client * User-selected trace analysis with cost estimation and smart sampling * * Key improvements over v1 Explainer: * - User-selected trace analysis (not automatic) * - Cost estimation before execution * - Smart sampling strategies * - Root cause analysis by layer * - Pattern aggregation across traces * * @since 3.1.0 */ export declare const analyzer: { /** * Analyze specific traces (user-selected) */ analyze(options: { traceIds: string[]; tier?: "fast" | "standard" | "deep"; includeRootCause?: boolean; includeLayers?: boolean; }): Promise; /** * Analyze traces by time window */ analyzeWindow(options: { agentId: string; startDate: Date; endDate: Date; filters?: { outcomes?: ("failure" | "error" | "success")[]; minSeverity?: "low" | "medium" | "high" | "critical"; }; sampling?: { strategy: "all" | "failures_only" | "smart" | "random"; samplePercent?: number; }; }): Promise; /** * Estimate cost before running analysis */ estimateCost(options: { traceIds?: string[]; agentId?: string; startDate?: Date; endDate?: Date; tier: "fast" | "standard" | "deep"; }): Promise<{ estimatedTraces: number; estimatedTokens: number; estimatedCost: number; estimatedCredits: number; tier: string; note: string; }>; /** * Get analysis results for a specific trace */ get(traceId: string): Promise; /** * Aggregate insights across multiple analyzed traces */ summarize(options: { analysisIds?: string[]; agentId?: string; startDate?: Date; endDate?: Date; }): Promise; }; export { isInitialized, SDK_VERSION, DEFAULT_ENDPOINT }; export { runs, claims, calibration, linking, customerContext, humanReview, nondeterminism, evalHealth, deterministicGraders, conversationEval, transcriptPatterns, apiKeys, agents, roiAnalytics, qualityMetrics, businessMetrics, evalRuns, signals, notifications, documents, shadowTests, sessions, drift, llmCosts, guardrails, }; export { createRunWithContext, toOpenAIMessages, fromOpenAIMessages, isFact, isInference, isComputed, getHighConfidenceClaims, groupClaimsByType, groupClaimsByCategory, calculateBrierScore, calculateECE, isWellCalibrated, getCalibrationQuality, generateZendeskMarker, parseZendeskMarker, hasZendeskMarker, removeZendeskMarker, linkRunToTicket, linkRunToZendeskTicket, getBestLinkMethod, LINK_METHOD_CONFIDENCE, captureCustomerContext, getContextAsOf, toContextSnapshot, calculateArrChange, calculateHealthTrend, calculatePassAtK, calculatePassToK, requiredPassRateForPassAtK, isReliableEvaluation, getReliabilityRecommendation, hasHealthIssue, getHealthSeverityLevel, isSaturated, getSaturationRecommendation, createRegexRule, createContainsRule, createLengthRule, createJsonSchemaRule, allRulesPassed, getFailedRules, calculateAverageScore, aggregateWorst, aggregateAverage, aggregateWeighted, aggregateFinalTurn, aggregateMajority, getAggregator, getProblematicTurns, analyzeConversationTrend, isHighRisk, getMatchesByCategory, getCriticalInsights, hasPiiExposure, hasFrustrationSignals, hasEscalationRequest, getCategoryDistribution, getRecommendations, needsAttention, sortMatchesBySeverity, hasPermission, isApiKeyExpired, isApiKeyValid, getTimeUntilExpiry, canAccessAgent, calculateRevenueAtRisk, calculateAutomationSavings, formatCurrency, getROIQuality, passesQualityThreshold, isHallucinationRiskAcceptable, getQualityRecommendations, formatQualityScore, getGradeColor, isMetricReady, needsMoreTraces, awaitingExternalData, isMetricStale, getStatusMessage, getTraceProgress, formatMetricValue, getTrendEmoji, hasDrift, getDriftSeverity, formatLLMCost, }; export { type ScanRequest, type ScanResponse, type Finding, type ScannerResult } from './guardrails'; export { ThinkHiveError, ThinkHiveApiError, ThinkHiveValidationError, PermissionDeniedError, AgentScopeError, RateLimitError, IpWhitelistError, }; declare const _default: { init: typeof init; getTracer: typeof getTracer; shutdown: typeof shutdown; isInitialized: typeof isInitialized; traceLLM: typeof traceLLM; traceRetrieval: typeof traceRetrieval; traceTool: typeof traceTool; traceChain: typeof traceChain; runs: { create(options: import("./core/types").RunOptions): Promise; get(runId: string): Promise; list(options?: import("./api/runs").ListRunsOptions): Promise<{ items: import("./core/types").RunResponse[]; limit: number; offset: number; hasMore: boolean; }>; update(runId: string, updates: Partial>): Promise; delete(runId: string): Promise; batch(runsData: import("./core/types").RunOptions[]): Promise<{ created: import("./core/types").RunResponse[]; failed: Array<{ index: number; error: string; }>; }>; stats(agentId: string, options?: { from?: string | Date; to?: string | Date; }): Promise; getTraces(runId: string): Promise; addTrace(runId: string, traceData: { spans?: unknown[]; timestamp?: string; metadata?: Record; }): Promise<{ traceId: string; }>; }; claims: { createAnalysis(options: import("./api/claims").CreateAnalysisOptions): Promise; getAnalysis(analysisId: string): Promise; getRunAnalysis(runId: string): Promise; getAnalysisHistory(runId: string): Promise<{ runId: string; analyses: Array<{ id: string; analysisVersion: string; modelUsed: string; outcomeVerdict: string; isCurrent: boolean; supersededBy?: string; supersessionReason?: string; analyzedAt: string; }>; }>; supersedeAnalysis(analysisId: string, options: { reason: string; newAnalysis: Omit; }): Promise<{ supersededAnalysisId: string; newAnalysis: import("./core/types").AnalysisResult; }>; list(options?: import("./api/claims").ListClaimsOptions): Promise<{ claims: import("./core/types").Claim[]; limit: number; offset: number; hasMore: boolean; }>; get(claimId: string): Promise; verify(claimId: string, options: { verdict: "confirmed" | "rejected" | "modified"; notes?: string; modifiedText?: string; }): Promise<{ claimId: string; verdict: string; message: string; }>; summary(options?: { runId?: string; analysisIds?: string[]; }): Promise; }; calibration: { status(agentId: string, predictionType: import("./core/types").PredictionType): Promise; allMetrics(agentId: string): Promise; retrain(agentId: string, options?: { predictionTypes?: import("./core/types").PredictionType[]; minSamples?: number; }): Promise<{ success: boolean; retrainedTypes: import("./core/types").PredictionType[]; skippedTypes: Array<{ type: import("./core/types").PredictionType; reason: string; }>; newMetrics: import("./api/calibration").CalibrationMetrics[]; }>; }; linking: { create(input: import("./integrations/ticket-linking").CreateLinkInput): Promise; getForRun(runId: string): Promise; getForTicket(ticketId: string): Promise; verify(linkId: string, options: { verified: boolean; notes?: string; }): Promise; delete(linkId: string): Promise; autoLink(runId: string): Promise; stats(): Promise<{ totalLinks: number; byMethod: Record; avgConfidence: number; verifiedCount: number; unverifiedCount: number; }>; generateMarker(options: { traceId: string; runId?: string; format?: "html_comment" | "base64" | "custom"; customTemplate?: string; }): Promise<{ marker: string; format: string; traceId: string; runId: string | null; instructions: string; }>; }; customerContext: { createAccount(input: { name: string; externalId?: string; externalSource?: import("./integrations/customer-context").CustomerAccount["externalSource"]; domain?: string; segment?: string; industry?: string; employeeCount?: number; }): Promise; getAccount(customerId: string): Promise; getAccountByExternalId(externalId: string, source: import("./integrations/customer-context").CustomerAccount["externalSource"]): Promise; captureSnapshot(customerId: string, metrics: { arr?: number; healthScore?: number; nps?: number; segment?: string; churnRisk?: "low" | "medium" | "high"; source?: string; }): Promise; getSnapshots(customerId: string, options?: { from?: string; to?: string; limit?: number; }): Promise; getLatestSnapshot(customerId: string): Promise; getSnapshotAsOf(customerId: string, timestamp: string | Date): Promise; capture(customerId: string, metrics: Record): Promise; }; humanReview: { getQueue(options?: import("./api/human-review").ListQueueOptions): Promise; addToQueue(options: import("./api/human-review").AddToQueueOptions): Promise; getItem(itemId: string): Promise; claim(itemId: string): Promise; release(itemId: string): Promise; skip(itemId: string): Promise; submit(itemId: string, review: import("./api/human-review").SubmitReviewOptions): Promise; getStats(agentId?: string): Promise; getNextItem(agentId?: string): Promise; getReviewTypes(): Promise>; getCalibrationSets(agentId?: string): Promise; createCalibrationSet(options: import("./api/human-review").CreateCalibrationSetOptions): Promise; getCalibrationSet(setId: string): Promise; getCertifiedReviewers(calibrationSetId: string): Promise; getReviewerCalibrations(userId: string): Promise; }; nondeterminism: { createRun(options: import("./api/nondeterminism").CreateRunOptions): Promise; getRuns(options?: import("./api/nondeterminism").ListRunsOptions): Promise; getRun(runId: string): Promise; startRun(runId: string): Promise; completeRun(runId: string): Promise; recordSample(options: import("./api/nondeterminism").RecordSampleOptions): Promise; getSamples(runId: string): Promise; getRunSummary(runId: string): Promise; analyzeRun(runId: string): Promise; getInfo(): Promise; }; evalHealth: { getReport(agentId: string): Promise; getSnapshots(options: import("./api/eval-health").GetSnapshotsOptions): Promise; getLatestSnapshot(agentId: string, criterionId?: string): Promise; recordSnapshot(options: import("./api/eval-health").CreateSnapshotOptions): Promise; getRegressions(agentId: string): Promise; recordRegression(options: import("./api/eval-health").CreateRegressionOptions): Promise; resolveRegression(regressionId: string, options: import("./api/eval-health").ResolveRegressionOptions): Promise; acknowledgeRegression(regressionId: string): Promise; }; deterministicGraders: { evaluate(options: import("./api/deterministic-graders").EvaluateOptions): Promise; bulkEvaluate(options: import("./api/deterministic-graders").BulkEvaluateOptions): Promise; getRuleTypes(): Promise; getTemplates(): Promise; }; conversationEval: { getSessionTraces(sessionId: string): Promise; evaluate(options: import("./api/conversation-eval").EvaluateConversationOptions): Promise; getAggregationMethods(): Promise; }; transcriptPatterns: { analyze(traceId: string): Promise; bulkAnalyze(traceIds: string[]): Promise; getCategories(): Promise; getBuiltInPatterns(): Promise; }; apiKeys: { create: typeof import("./api/apiKeys").create; list: typeof import("./api/apiKeys").list; revoke: typeof import("./api/apiKeys").revoke; rotate: typeof import("./api/apiKeys").rotate; test: typeof import("./api/apiKeys").test; hasPermission: typeof hasPermission; isExpired: typeof isApiKeyExpired; isValid: typeof isApiKeyValid; getTimeUntilExpiry: typeof getTimeUntilExpiry; canAccessAgent: typeof canAccessAgent; }; agents: { list(options?: { companyId?: string; departmentId?: string; }): Promise; get(id: string): Promise; create(options: import("./api/agents").CreateAgentOptions): Promise; update(id: string, options: import("./api/agents").UpdateAgentOptions): Promise; delete(id: string, options?: import("./api/agents").DeleteAgentOptions): Promise; getConfig(agentId: string): Promise; updateConfig(agentId: string, config: import("./api/agents").UpdateAgentConfigOptions): Promise; }; issues: { /** * List issues for an agent */ list(agentId: string, options?: { status?: string; startDate?: Date; endDate?: Date; limit?: number; offset?: number; }): Promise; /** * Get a single issue by ID */ get(id: string): Promise; /** * Create a new issue */ create(data: { agentId: string; title: string; description?: string; type: string; severity?: string; pattern?: string; exampleTraceIds?: string[]; }): Promise; /** * Update an issue */ update(id: string, data: { title?: string; description?: string; status?: string; severity?: string; assignedTo?: string; resolutionNotes?: string; }): Promise; /** * Get fixes for an issue */ getFixes(issueId: string): Promise; }; analyzer: { /** * Analyze specific traces (user-selected) */ analyze(options: { traceIds: string[]; tier?: "fast" | "standard" | "deep"; includeRootCause?: boolean; includeLayers?: boolean; }): Promise; /** * Analyze traces by time window */ analyzeWindow(options: { agentId: string; startDate: Date; endDate: Date; filters?: { outcomes?: ("failure" | "error" | "success")[]; minSeverity?: "low" | "medium" | "high" | "critical"; }; sampling?: { strategy: "all" | "failures_only" | "smart" | "random"; samplePercent?: number; }; }): Promise; /** * Estimate cost before running analysis */ estimateCost(options: { traceIds?: string[]; agentId?: string; startDate?: Date; endDate?: Date; tier: "fast" | "standard" | "deep"; }): Promise<{ estimatedTraces: number; estimatedTokens: number; estimatedCost: number; estimatedCredits: number; tier: string; note: string; }>; /** * Get analysis results for a specific trace */ get(traceId: string): Promise; /** * Aggregate insights across multiple analyzed traces */ summarize(options: { analysisIds?: string[]; agentId?: string; startDate?: Date; endDate?: Date; }): Promise; }; roiAnalytics: { summary(options?: { startDate?: string | Date; endDate?: string | Date; agentId?: string; }): Promise; byAgent(agentId: string, options?: { startDate?: string | Date; endDate?: string | Date; }): Promise<{ agent: { id: string; name: string; industry: string; }; industryConfig: Partial; roi: import("./api/roi-analytics").ROIMetrics; recentImpacts: Array<{ impactScore: number; revenueRisk: number; roiCategory: string; totalFinancialImpact: number; }>; }>; trends(options?: { startDate?: string | Date; endDate?: string | Date; agentId?: string; }): Promise; calculate(options: { traceId?: string; userMessage?: string; agentResponse?: string; industryConfig?: import("./api/roi-analytics").CustomIndustryConfig; }): Promise; industries(): Promise; correlations(options?: { startDate?: string | Date; endDate?: string | Date; agentId?: string; }): Promise; getConfig(): Promise<{ id: string; companyId: string; version: number; isActive: boolean; costConfig: Record; deflectionConfig: Record; resolutionConfig: Record; attributionConfig: Record; slaConfig: Record; displayConfig: Record; createdAt: string; updatedAt: string; }>; createConfig(data: { costConfig?: Record; deflectionConfig?: Record; resolutionConfig?: Record; attributionConfig?: Record; slaConfig?: Record; displayConfig?: Record; }): Promise<{ id: string; companyId: string; version: number; isActive: boolean; costConfig: Record; deflectionConfig: Record; resolutionConfig: Record; attributionConfig: Record; slaConfig: Record; displayConfig: Record; createdAt: string; updatedAt: string; }>; updateConfig(data: { costConfig?: Record; deflectionConfig?: Record; resolutionConfig?: Record; attributionConfig?: Record; slaConfig?: Record; displayConfig?: Record; }): Promise<{ id: string; companyId: string; version: number; isActive: boolean; costConfig: Record; deflectionConfig: Record; resolutionConfig: Record; attributionConfig: Record; slaConfig: Record; displayConfig: Record; createdAt: string; updatedAt: string; }>; configVersions(options?: { limit?: number; offset?: number; }): Promise<{ data: Record[]; pagination: { limit: number; offset: number; hasMore: boolean; }; }>; calculateV3(options: { agentId /** * Trace an LLM call */ ?: string; startDate: string | Date; endDate: string | Date; configurationVersion?: number; includeBreakdown?: boolean; includeConfidenceIntervals?: boolean; }): Promise>; trendV3(options: { agentId?: string; granularity: "day" | "week" | "month"; startDate: string | Date; endDate: string | Date; }): Promise>; }; qualityMetrics: { getRagScores(traceId: string): Promise<{ traceId: string; evaluation: import("./api/quality-metrics").RAGEvaluation; evidence: import("./api/quality-metrics").RAGEvidence; }>; getHallucinationReport(traceId: string): Promise<{ traceId: string; report: import("./api/quality-metrics").HallucinationReport; }>; evaluateRag(input: { query: string; response: string; retrievedContexts: import("./api/quality-metrics").RetrievedContext[]; groundTruthContexts?: import("./api/quality-metrics").GroundTruthContext[]; citations?: string[]; }): Promise<{ evaluation: import("./api/quality-metrics").RAGEvaluation; evidence: import("./api/quality-metrics").RAGEvidence; }>; detectHallucinations(input: { response: string; contexts: Array<{ content: string; metadata?: Record; }>; query?: string; previousResponses?: string[]; }): Promise<{ report: import("./api/quality-metrics").HallucinationReport; }>; getGroundedness(traceId: string): Promise<{ traceId: string; groundedness: import("./api/quality-metrics").GroundednessResult; spans: { grounded: Array<{ text: string; confidence: number; sourceIndex: number; }>; ungrounded: Array<{ text: string; confidence: number; }>; }; summary: { totalSpans: number; groundedSpans: number; ungroundedSpans: number; groundednessRatio: number; }; }>; evaluateBatch(options: { traceIds: string[]; includeDetails?: boolean; }): Promise<{ summary: import("./api/quality-metrics").BatchEvaluationSummary; results: import("./api/quality-metrics").BatchEvaluationResult[]; }>; evaluate(input: { query: string; response: string; retrievedContexts: import("./api/quality-metrics").RetrievedContext[]; groundTruthContexts?: import("./api/quality-metrics").GroundTruthContext[]; citations?: string[]; }): Promise<{ evaluation: import("./api/quality-metrics").RAGEvaluation; evidence: import("./api/quality-metrics").RAGEvidence; }>; }; businessMetrics: { current(agentId: string, metricName?: string): Promise; history(agentId: string, metricName: string, options?: { startDate?: string | Date; endDate?: string | Date; granularity?: "hourly" | "daily" | "weekly" | "monthly"; }): Promise; record(agentId: string, options: import("./api/business-metrics").RecordMetricOptions): Promise; recordBatch(agentId: string, metrics: import("./api/business-metrics").RecordMetricOptions[]): Promise; }; evalRuns: { create(agentId: string, opts?: import("./api/eval-runs").CreateEvalRunOptions): Promise; get(runId: string): Promise; getResults(runId: string, opts?: import("./api/eval-runs").GetEvalRunResultsOptions): Promise<{ results: import("./api/eval-runs").EvalResult[]; limit: number; offset: number; hasMore: boolean; }>; list(opts?: import("./api/eval-runs").ListEvalRunsOptions): Promise; estimateCost(agentId: string, opts?: import("./api/eval-runs").EstimateCostOptions): Promise; getTraceResults(traceId: string, opts?: import("./api/eval-runs").GetTraceResultsOptions): Promise; remove(runId: string): Promise; }; signals: { list(opts?: import("./api/signals").ListSignalsOptions): Promise; create(name: string, group: string, detectionConfig: import("./api/signals").DetectionConfig, opts?: import("./api/signals").CreateSignalOptions): Promise; update(id: string, opts: import("./api/signals").UpdateSignalOptions): Promise; remove(id: string): Promise; delete(id: string): Promise; seedDefaults(): Promise; getStats(opts?: import("./api/signals").SignalStatsOptions): Promise; getTrends(opts?: import("./api/signals").SignalTrendsOptions): Promise; getTraces(id: string, opts?: import("./api/signals").SignalTracesOptions): Promise<{ traces: any[]; limit: number; offset: number; hasMore: boolean; }>; getEvents(id: string, opts?: import("./api/signals").SignalEventsOptions): Promise<{ events: import("./api/signals").SignalEvent[]; limit: number; offset: number; hasMore: boolean; }>; }; notifications: { listRules(agentId: string): Promise; getRule(id: string, agentId?: string): Promise; createRule(data: import("./api/notifications").CreateNotificationRuleData): Promise; updateRule(id: string, data: import("./api/notifications").UpdateNotificationRuleData): Promise; deleteRule(id: string): Promise; listNotifications(agentId: string, unreadOnly?: boolean): Promise; markAsRead(id: string): Promise; list(agentId: string, unreadOnly?: boolean): Promise; }; documents: { list(agentId: string): Promise; upload(agentId: string, fileName: string, fileType: string, fileSize: number): Promise; remove(agentId: string, docId: string): Promise; }; shadowTests: { list(agentId: string): Promise; get(id: string): Promise; getByFix(fixId: string): Promise; create(data: import("./api/shadow-tests").CreateShadowTestData): Promise; update(id: string, data: import("./api/shadow-tests").UpdateShadowTestData): Promise; }; sessions: { list(agentId: string, opts?: import("./api/sessions").ListSessionsOptions): Promise<{ sessions: import("./api/sessions").Session[]; limit: number; offset: number; hasMore: boolean; }>; getTraces(sessionId: string, agentId: string): Promise; }; drift: { detect(agentId: string, opts?: import("./api/drift").DetectDriftOptions): Promise; detectAll(): Promise; }; llmCosts: { getSummary(opts?: import("./api/llm-costs").CostQueryOptions): Promise; getBreakdown(agentId: string, opts?: import("./api/llm-costs").CostQueryOptions): Promise; getSavings(): Promise; getOptimizationStats(): Promise; summary(opts?: import("./api/llm-costs").CostQueryOptions): Promise; }; guardrails: { scan(request: import("./guardrails").ScanRequest): Promise; listScanners(): Promise>; evaluate(request: import("./guardrails").ScanRequest): Promise; }; generateZendeskMarker: typeof generateZendeskMarker; parseZendeskMarker: typeof parseZendeskMarker; linkRunToTicket: typeof linkRunToTicket; createRunWithContext: typeof createRunWithContext; isFact: typeof isFact; isInference: typeof isInference; calculateBrierScore: typeof calculateBrierScore; isWellCalibrated: typeof isWellCalibrated; calculatePassAtK: typeof calculatePassAtK; isReliableEvaluation: typeof isReliableEvaluation; isHighRisk: typeof isHighRisk; needsAttention: typeof needsAttention; calculateRevenueAtRisk: typeof calculateRevenueAtRisk; formatCurrency: typeof formatCurrency; passesQualityThreshold: typeof passesQualityThreshold; isHallucinationRiskAcceptable: typeof isHallucinationRiskAcceptable; isMetricReady: typeof isMetricReady; needsMoreTraces: typeof needsMoreTraces; getStatusMessage: typeof getStatusMessage; hasDrift: typeof hasDrift; getDriftSeverity: typeof getDriftSeverity; formatLLMCost: typeof formatLLMCost; }; export default _default;