#!/usr/bin/env node
/**
 * Memento Telemetry CLI (specs/007-telemetry-cli-mcp)
 * HTTP 서버 없이 텔레메트리 지표를 터미널에서 확인합니다.
 * Usage: npm run telemetry [-- [options]]
 */
export interface SearchQualityResult {
    period: string;
    owner_id: string | null;
    search_count: number | null;
    avg_latency_ms: number | null;
    p95_latency_ms: number | null;
    empty_retrieval_rate: number | null;
    avg_candidate_count: number | null;
    top_k_selected_rate: number | null;
    timestamp: string;
}
export interface MemoryQualityResult {
    owner_id: string | null;
    total_memories: number | null;
    type_distribution: Record<string, number> | null;
    duplicate_write_rate_24h: number | null;
    relation_coverage_ratio: number | null;
    orphan_memory_ratio: number | null;
    timestamp: string;
}
interface ToolMetricBucket {
    request_count: number | null;
    success_count: number | null;
    error_count: number | null;
    error_rate: number | null;
    avg_latency_ms: number | null;
    p95_latency_ms: number | null;
}
export interface SystemMetricsResult {
    period: string;
    tools: {
        recall: ToolMetricBucket;
        remember: ToolMetricBucket;
        feedback: ToolMetricBucket;
    };
    background_jobs: Record<string, unknown>;
    timestamp: string;
}
export type TelemetryPeriod = '24h' | '7d' | '30d';
export type TelemetryType = 'search-quality' | 'memory-quality' | 'system' | 'all';
export interface CliOptions {
    period: TelemetryPeriod;
    type: TelemetryType;
}
/**
 * argv 배열에서 --period, --type, --help 옵션을 파싱합니다.
 * @throws Error - 잘못된 옵션 값
 */
export declare function parseCliOptions(argv: string[]): CliOptions;
export interface TelemetryRunner {
    getSearchQuality(period: TelemetryPeriod, ownerId: string | null): SearchQualityResult;
    getMemoryQuality(ownerId: string | null): MemoryQualityResult;
    getSystemMetrics(period: TelemetryPeriod, ownerId: string | null): SystemMetricsResult;
}
export interface TelemetryRunResult {
    stdout: string;
    stderr: string;
    exitCode: number;
}
/**
 * 텔레메트리 데이터를 조회하고 포맷된 출력을 반환합니다.
 * main()에서 분리되어 단위 테스트가 가능합니다.
 */
export declare function executeTelemetry(runner: TelemetryRunner, options: CliOptions): TelemetryRunResult;
/**
 * SearchQualityResult를 포맷된 텍스트로 변환합니다.
 */
export declare function formatSearchQuality(data: SearchQualityResult): string;
/**
 * MemoryQualityResult를 포맷된 텍스트로 변환합니다.
 */
export declare function formatMemoryQuality(data: MemoryQualityResult): string;
/**
 * SystemMetricsResult를 포맷된 텍스트로 변환합니다.
 */
export declare function formatSystemMetrics(data: SystemMetricsResult): string;
export {};
//# sourceMappingURL=telemetry-cli.d.ts.map