import type { Database } from "bun:sqlite";
export declare const LOCAL_USAGE_LEDGER_SCHEMA_VERSION = 1;
export interface UsageLedgerQuotaInput {
    max_tasks?: number;
    max_projects?: number;
    max_runs?: number;
    max_commands?: number;
    max_tokens?: number;
    max_cost_usd?: number;
    max_storage_bytes?: number;
}
export interface UsageLedgerOptions {
    project_id?: string;
    agent_id?: string;
    since?: string;
    until?: string;
    generated_at?: string;
    quotas?: UsageLedgerQuotaInput;
}
export interface UsageLedgerQuotaResult {
    name: keyof UsageLedgerQuotaInput;
    limit: number;
    used: number;
    remaining: number;
    exceeded: boolean;
}
export interface UsageLedgerReport {
    schema_version: number;
    local_only: true;
    no_network: true;
    generated_at: string;
    scope: {
        project_id: string | null;
        agent_id: string | null;
        since: string | null;
        until: string | null;
    };
    counts: {
        tasks: number;
        projects: number;
        runs: number;
        commands: number;
        artifacts: number;
        traces: number;
        metadata_records: number;
    };
    durations: {
        completed_run_ms: number;
        open_run_ms: number;
        trace_ms: number;
        total_observed_ms: number;
    };
    usage: {
        task_tokens: number;
        trace_tokens: number;
        metadata_tokens: number;
        total_tokens: number;
        task_cost_usd: number;
        trace_cost_usd: number;
        metadata_cost_usd: number;
        total_cost_usd: number;
    };
    storage: {
        artifact_bytes: number;
        evidence_bytes: number;
    };
    quota: {
        simulated: boolean;
        limits: UsageLedgerQuotaResult[];
        exceeded: string[];
        allowed: boolean;
    };
    redaction: {
        raw_commands_included: false;
        raw_artifact_paths_included: false;
        aggregate_only: true;
    };
    sources: string[];
}
export declare function createLocalUsageLedger(options?: UsageLedgerOptions, db?: Database): UsageLedgerReport;
export declare function renderLocalUsageLedgerMarkdown(report: UsageLedgerReport): string;
//# sourceMappingURL=usage-ledger.d.ts.map