import type { Database } from "bun:sqlite";
import { type LocalCapacityProfileConfig } from "./config.js";
export type { LocalCapacityProfileConfig, LocalCapacityStoreConfig, } from "./config.js";
export declare const LOCAL_CAPACITY_SCHEMA_VERSION = 1;
export type ForecastRiskFlag = "missing_estimates" | "no_capacity" | "forecast_past_due" | "over_budget" | "open_tasks_overdue";
export interface UpsertCapacityProfileInput {
    agent_id: string;
    project_id?: string | null;
    minutes_per_day: number;
    working_days?: number[];
    effective_from?: string | null;
}
export interface CapacityProfileQuery {
    agent_id?: string;
    project_id?: string;
}
export interface PlanningForecastInput {
    project_id?: string;
    plan_id?: string;
    agent_id?: string;
    start_date?: string;
}
export interface PlanningForecastTask {
    task_id: string;
    title: string;
    status: string;
    project_id: string | null;
    plan_id: string | null;
    assigned_to: string | null;
    agent_id: string | null;
    due_at: string | null;
    estimated_minutes: number | null;
    actual_minutes: number | null;
    remaining_estimated_minutes: number;
    missing_estimate: boolean;
    overdue: boolean;
}
export interface PlanningForecast {
    schema_version: typeof LOCAL_CAPACITY_SCHEMA_VERSION;
    local_only: true;
    generated_at: string;
    filters: {
        project_id: string | null;
        plan_id: string | null;
        agent_id: string | null;
        start_date: string;
    };
    capacity_profiles: LocalCapacityProfileConfig[];
    capacity_minutes_per_day: number;
    task_count: number;
    open_task_count: number;
    completed_task_count: number;
    estimated_minutes: number;
    remaining_estimated_minutes: number;
    actual_minutes: number;
    logged_minutes: number;
    missing_estimate_count: number;
    overdue_open_task_count: number;
    forecast_work_days: number | null;
    forecast_completion_date: string | null;
    earliest_due_at: string | null;
    risk_flags: ForecastRiskFlag[];
    tasks: PlanningForecastTask[];
}
export declare function upsertCapacityProfile(input: UpsertCapacityProfileInput): LocalCapacityProfileConfig;
export declare function listCapacityProfiles(query?: CapacityProfileQuery): LocalCapacityProfileConfig[];
export declare function removeCapacityProfile(idOrAgent: string, projectId?: string | null): boolean;
export declare function getPlanningForecast(input?: PlanningForecastInput, db?: Database): PlanningForecast;
export declare function renderPlanningForecastMarkdown(forecast: PlanningForecast): string;
//# sourceMappingURL=capacity-forecasts.d.ts.map