type AnalysisStatus = 'queued' | 'pending' | 'running' | 'completed' | 'failed' | 'error' | 'quota_exceeded' | 'unknown';
export interface EnterpriseLoadTestOptions {
    baseUrl: string;
    tenantId: string;
    workspaceId: string;
    apiKey?: string;
    preflightOnly: boolean;
    confirmRealRun: boolean;
    onlineUsers: number;
    targetRunningRuns: number;
    targetPendingRuns: number;
    maxErrorRate: number;
    durationMs: number;
    pollIntervalMs: number;
    traceIds: string[];
    query: string;
    outputPath: string;
    markdownPath?: string;
}
export interface HttpSample {
    operation: string;
    userId: string;
    status: number;
    ok: boolean;
    durationMs: number;
    timestamp: string;
    traceCount?: number;
    error?: string;
}
export interface RuntimeSample {
    timestamp: string;
    queueLength: number | null;
    workerRssBytes: number | null;
    leaseRssBytes: number | null;
    llmCostUsd: number | null;
    llmCalls: number | null;
}
export interface AnalysisRunRecord {
    userId: string;
    traceId: string;
    sessionId?: string;
    runId?: string;
    startStatus: number;
    startOk: boolean;
    lastStatus: AnalysisStatus;
    error?: string;
}
export interface AnalysisStatusSnapshot {
    timestamp: string;
    counts: Record<AnalysisStatus, number>;
}
export interface LatencySummary {
    count: number;
    p50Ms: number | null;
    p95Ms: number | null;
    maxMs: number | null;
}
export interface EnterpriseLoadTestSummary {
    totalRequests: number;
    failedRequests: number;
    errorRate: number;
    scale: {
        visibleTraceMetadataCount: number | null;
        estimatedDailyLlmCalls: number | null;
    };
    onlineUsers: {
        configured: number;
        observed: number;
    };
    latency: {
        overall: LatencySummary;
        byOperation: Record<string, LatencySummary>;
    };
    analysis: {
        started: number;
        startFailures: number;
        missingStartIdentifiers: number;
        maxRunning: number;
        maxPending: number;
        runningInRangeSnapshots: number;
        pendingSnapshots: number;
        terminal: Record<string, number>;
    };
    runtime: {
        preRunBaselineSampled: boolean;
        maxQueueLength: number | null;
        maxWorkerRssBytes: number | null;
        maxLeaseRssBytes: number | null;
        initialLlmCostUsd: number | null;
        finalLlmCostUsd: number | null;
        llmCostDeltaUsd: number | null;
        initialLlmCalls: number | null;
        finalLlmCalls: number | null;
        llmCallDelta: number | null;
    };
}
export interface EnterpriseLoadTestReport {
    generatedAt: string;
    host: {
        platform: string;
        arch: string;
        node: string;
        cpuCount: number;
    };
    target: {
        baseUrl: string;
        tenantId: string;
        workspaceId: string;
    };
    config: {
        onlineUsers: number;
        targetRunningRuns: number;
        targetPendingRuns: number;
        maxErrorRate: number;
        durationMs: number;
        pollIntervalMs: number;
        traceCount: number;
    };
    summary: EnterpriseLoadTestSummary;
    acceptance: {
        passed: boolean;
        missing: string[];
    };
    runs: AnalysisRunRecord[];
    statusSnapshots: AnalysisStatusSnapshot[];
    runtimeSamples: RuntimeSample[];
    httpSamples: HttpSample[];
}
export interface EnterpriseLoadTestPreflightCheck {
    id: string;
    status: 'passed' | 'blocked';
    message: string;
    evidence: string[];
}
export interface EnterpriseLoadTestTraceListProbe {
    status: number;
    ok: boolean;
    traceIds: string[] | null;
    error?: string;
}
export interface EnterpriseLoadTestPreflightReport {
    generatedAt: string;
    target: {
        baseUrl: string;
        tenantId: string;
        workspaceId: string;
    };
    config: {
        onlineUsers: number;
        targetRunningRuns: number;
        targetPendingRuns: number;
        maxErrorRate: number;
        durationMs: number;
        pollIntervalMs: number;
        traceIds: string[];
    };
    ready: boolean;
    checks: EnterpriseLoadTestPreflightCheck[];
    runtimeSamples: RuntimeSample[];
    httpSamples: HttpSample[];
}
export declare const MIN_ACCEPTANCE_VISIBLE_TRACE_METADATA = 1000;
export declare const MIN_ACCEPTANCE_ESTIMATED_DAILY_LLM_CALLS = 200;
export declare function parseLoadTestArgs(argv: string[], cwd?: string): EnterpriseLoadTestOptions;
export declare function percentile(values: number[], quantile: number): number | null;
export declare function summarizeLoadTest(input: {
    options: EnterpriseLoadTestOptions;
    httpSamples: HttpSample[];
    runs: AnalysisRunRecord[];
    statusSnapshots: AnalysisStatusSnapshot[];
    runtimeSamples: RuntimeSample[];
}): EnterpriseLoadTestSummary;
export declare function evaluateAcceptance(options: EnterpriseLoadTestOptions, summary: EnterpriseLoadTestSummary, runtimeSamples: RuntimeSample[]): EnterpriseLoadTestReport['acceptance'];
export declare function extractTraceIdsFromTraceListBody(body: any): string[] | null;
export declare function buildLoadTestPreflightReport(input: {
    options: EnterpriseLoadTestOptions;
    traceList: EnterpriseLoadTestTraceListProbe;
    runtimeSamples: RuntimeSample[];
    httpSamples: HttpSample[];
}): EnterpriseLoadTestPreflightReport;
export declare function runEnterpriseAcceptanceLoadTestPreflight(options: EnterpriseLoadTestOptions): Promise<EnterpriseLoadTestPreflightReport>;
export declare function buildLoadTestReport(input: {
    options: EnterpriseLoadTestOptions;
    httpSamples: HttpSample[];
    runs: AnalysisRunRecord[];
    statusSnapshots: AnalysisStatusSnapshot[];
    runtimeSamples: RuntimeSample[];
}): EnterpriseLoadTestReport;
export declare function buildMarkdownLoadTestReport(report: EnterpriseLoadTestReport): string;
export declare function buildMarkdownLoadTestPreflightReport(report: EnterpriseLoadTestPreflightReport): string;
export declare function runEnterpriseAcceptanceLoadTest(options: EnterpriseLoadTestOptions): Promise<EnterpriseLoadTestReport>;
export {};
//# sourceMappingURL=enterpriseAcceptanceLoadTest.d.ts.map