import type { Database } from "bun:sqlite";
import { getTaskRun } from "../db/task-runs.js";
import type { Task, Plan } from "../types/index.js";
import { type LocalMilestoneConfig, type LocalMilestoneStatus, type LocalReleaseGroupConfig, type LocalRoadmapConfig, type LocalRoadmapStatus } from "./config.js";
export type { LocalMilestoneConfig, LocalMilestoneStatus, LocalReleaseGroupConfig, LocalRoadmapConfig, LocalRoadmapStatus, LocalRoadmapStoreConfig, } from "./config.js";
export declare const LOCAL_ROADMAP_SCHEMA_VERSION = 1;
export interface CreateRoadmapInput {
    name: string;
    description?: string;
    project_id?: string;
    status?: LocalRoadmapStatus;
    owner?: string;
    agent_id?: string;
    release?: string;
}
export interface UpdateRoadmapInput {
    name?: string;
    description?: string | null;
    project_id?: string | null;
    status?: LocalRoadmapStatus;
    owner?: string | null;
    agent_id?: string | null;
    release?: string | null;
}
export interface CreateMilestoneInput {
    roadmap_id: string;
    title: string;
    description?: string;
    due_at?: string;
    status?: LocalMilestoneStatus;
    owner?: string;
    agent_id?: string;
    task_ids?: string[];
    plan_ids?: string[];
    run_ids?: string[];
    release?: string;
    tags?: string[];
}
export interface UpdateMilestoneInput {
    title?: string;
    description?: string | null;
    due_at?: string | null;
    status?: LocalMilestoneStatus;
    owner?: string | null;
    agent_id?: string | null;
    task_ids?: string[];
    plan_ids?: string[];
    run_ids?: string[];
    release?: string | null;
    tags?: string[];
}
export interface UpsertReleaseGroupInput {
    roadmap_id: string;
    name: string;
    version?: string;
    status?: LocalMilestoneStatus;
    milestone_ids?: string[];
    task_ids?: string[];
    plan_ids?: string[];
    run_ids?: string[];
    notes?: string;
}
export interface RoadmapProgressSummary {
    task_count: number;
    completed_count: number;
    in_progress_count: number;
    pending_count: number;
    blocked_count: number;
    plan_count: number;
    run_count: number;
    percent_complete: number;
    readiness: "empty" | "ready" | "blocked" | "in_progress" | "complete";
}
export interface MilestoneSummary extends LocalMilestoneConfig {
    tasks: Task[];
    plans: Plan[];
    runs: Array<NonNullable<ReturnType<typeof getTaskRun>>>;
    blockers: Array<{
        task_id: string;
        blockers: Array<{
            id: string;
            title: string;
            status: string;
        }>;
    }>;
    progress: RoadmapProgressSummary;
}
export interface RoadmapSummary extends LocalRoadmapConfig {
    milestones: MilestoneSummary[];
    releases: LocalReleaseGroupConfig[];
    progress: RoadmapProgressSummary;
}
export interface RoadmapBundle {
    schema_version: typeof LOCAL_ROADMAP_SCHEMA_VERSION;
    kind: "hasna.todos.roadmap-bundle";
    local_only: true;
    exported_at: string;
    roadmap: LocalRoadmapConfig;
    milestones: LocalMilestoneConfig[];
    releases: LocalReleaseGroupConfig[];
}
export interface ImportRoadmapBundleResult {
    applied: boolean;
    roadmap_id: string;
    milestones: number;
    releases: number;
}
export declare function createRoadmap(input: CreateRoadmapInput): LocalRoadmapConfig;
export declare function listRoadmaps(options?: {
    project_id?: string;
    status?: LocalRoadmapStatus;
}): LocalRoadmapConfig[];
export declare function getRoadmap(idOrName: string): LocalRoadmapConfig | null;
export declare function updateRoadmap(idOrName: string, input: UpdateRoadmapInput): LocalRoadmapConfig;
export declare function deleteRoadmap(idOrName: string): boolean;
export declare function createMilestone(input: CreateMilestoneInput): LocalMilestoneConfig;
export declare function listMilestones(options?: {
    roadmap_id?: string;
    release?: string;
    status?: LocalMilestoneStatus;
}): LocalMilestoneConfig[];
export declare function updateMilestone(idOrTitle: string, input: UpdateMilestoneInput): LocalMilestoneConfig;
export declare function deleteMilestone(idOrTitle: string): boolean;
export declare function upsertReleaseGroup(input: UpsertReleaseGroupInput): LocalReleaseGroupConfig;
export declare function listReleaseGroups(roadmapId?: string): LocalReleaseGroupConfig[];
export declare function summarizeMilestone(idOrTitle: string, db?: Database): MilestoneSummary;
export declare function summarizeRoadmap(idOrName: string, db?: Database): RoadmapSummary;
export declare function exportRoadmapBundle(idOrName: string): RoadmapBundle;
export declare function importRoadmapBundle(bundle: RoadmapBundle, options?: {
    apply?: boolean;
}): ImportRoadmapBundleResult;
export declare function renderRoadmapMarkdown(idOrName: string, db?: Database): string;
//# sourceMappingURL=roadmaps.d.ts.map