import type { Database } from "bun:sqlite";
import type { Task } from "../types/index.js";
export declare const LOCAL_REPORT_SCHEMA_VERSION = 1;
export declare const LOCAL_REPORT_TYPES: readonly ["ready", "blocked", "overdue", "standup", "sprint", "progress", "run_outcomes", "verification_evidence", "agent_summary"];
export type LocalReportType = typeof LOCAL_REPORT_TYPES[number];
export interface LocalReportOptions {
    project_id?: string;
    plan_id?: string;
    agent_id?: string;
    since?: string;
    until?: string;
    generated_at?: string;
    now?: string;
    limit?: number;
}
export interface LocalReportTaskSummary {
    id: string;
    short_id: string | null;
    title: string;
    status: Task["status"];
    priority: Task["priority"];
    project_id: string | null;
    plan_id: string | null;
    assigned_to: string | null;
    due_at: string | null;
    updated_at: string;
}
export interface LocalReportBlockedTask extends LocalReportTaskSummary {
    blocked_by: LocalReportTaskSummary[];
}
export interface LocalReportTaskView<T extends LocalReportTaskSummary = LocalReportTaskSummary> {
    type: "ready" | "blocked" | "overdue";
    total: number;
    items: T[];
}
export interface LocalReportPlanSummary {
    id: string;
    name: string;
    status: string;
    project_id: string | null;
    agent_id: string | null;
    counts: {
        total: number;
        pending: number;
        in_progress: number;
        completed: number;
        failed: number;
        cancelled: number;
        blocked: number;
        overdue: number;
    };
    progress_percent: number;
}
export interface LocalReportRunSummary {
    id: string;
    task_id: string;
    task_title: string;
    agent_id: string | null;
    status: string;
    summary: string | null;
    started_at: string;
    completed_at: string | null;
    command_outcomes: {
        passed: number;
        failed: number;
        unknown: number;
    };
    artifacts: number;
}
export interface LocalReportVerificationSummary {
    id: string;
    task_id: string;
    task_title: string;
    agent_id: string | null;
    status: string;
    command: string;
    output_summary: string | null;
    run_at: string;
}
export interface LocalReportAgentSummary {
    agent_id: string;
    task_counts: {
        total: number;
        pending: number;
        in_progress: number;
        completed: number;
        failed: number;
        cancelled: number;
        blocked: number;
        overdue: number;
    };
    run_outcomes: {
        running: number;
        completed: number;
        failed: number;
        cancelled: number;
    };
    verification_outcomes: {
        passed: number;
        failed: number;
        unknown: number;
    };
}
export interface LocalReport {
    schema_version: 1;
    local_only: true;
    no_network: true;
    generated_at: string;
    scope: {
        project_id: string | null;
        plan_id: string | null;
        agent_id: string | null;
        since: string | null;
        until: string | null;
    };
    report_types: LocalReportType[];
    views: {
        ready: LocalReportTaskView;
        blocked: LocalReportTaskView<LocalReportBlockedTask>;
        overdue: LocalReportTaskView;
    };
    plans: LocalReportPlanSummary[];
    runs: {
        outcomes: {
            running: number;
            completed: number;
            failed: number;
            cancelled: number;
        };
        recent: LocalReportRunSummary[];
    };
    verification: {
        outcomes: {
            passed: number;
            failed: number;
            unknown: number;
        };
        recent: LocalReportVerificationSummary[];
    };
    agents: LocalReportAgentSummary[];
    exports: {
        json_contract: "local_report";
        markdown_supported: true;
    };
}
export declare function listLocalReportTypes(): LocalReportType[];
export declare function createLocalReport(options?: LocalReportOptions, db?: Database): LocalReport;
export declare function renderLocalReportMarkdown(report: LocalReport): string;
//# sourceMappingURL=local-reports.d.ts.map