import type { Database } from "bun:sqlite";
import type { Task, TaskStatus } from "../types/index.js";
import type { WorkflowStateConfig } from "./config.js";
export interface WorkflowState extends Omit<WorkflowStateConfig, "aliases" | "transitions" | "terminal"> {
    aliases: string[];
    transitions: string[] | null;
    terminal: boolean;
}
export interface WorkflowStateResolution {
    input: string;
    state: WorkflowState;
    matched_by: "name" | "alias" | "canonical_status";
}
export interface SetTaskWorkflowStateOptions {
    actor?: string;
    project_path?: string;
    force?: boolean;
}
export interface TaskWorkflowStateResult {
    task: Task;
    workflow_state: WorkflowState;
    previous_workflow_state: WorkflowState;
    changed: boolean;
    canonical_status_changed: boolean;
    local_only: true;
}
export interface WorkflowStateQuery {
    state: string;
    project_id?: string;
    task_list_id?: string;
    project_path?: string;
    limit?: number;
}
export interface WorkflowStateQueryResult {
    state: WorkflowState;
    tasks: Task[];
    count: number;
    local_only: true;
}
export interface WorkflowStateMigrationOptions {
    apply?: boolean;
    project_id?: string;
    task_list_id?: string;
    project_path?: string;
    limit?: number;
}
export interface WorkflowStateMigrationItem {
    task_id: string;
    short_id: string | null;
    title: string;
    canonical_status: TaskStatus;
    workflow_state: string;
    changed: boolean;
}
export interface WorkflowStateMigrationReport {
    applied: boolean;
    migrated_count: number;
    pending_count: number;
    skipped_count: number;
    items: WorkflowStateMigrationItem[];
    local_only: true;
}
export declare function listWorkflowStates(projectPath?: string | null): WorkflowState[];
export declare function resolveWorkflowState(input: string, projectPath?: string | null): WorkflowStateResolution;
export declare function getTaskWorkflowState(taskId: string, db?: Database, projectPath?: string | null): WorkflowState;
export declare function setTaskWorkflowState(taskId: string, stateInput: string, options?: SetTaskWorkflowStateOptions, db?: Database): TaskWorkflowStateResult;
export declare function queryTasksByWorkflowState(query: WorkflowStateQuery, db?: Database): WorkflowStateQueryResult;
export declare function migrateWorkflowStates(options?: WorkflowStateMigrationOptions, db?: Database): WorkflowStateMigrationReport;
export declare function renderWorkflowStatesMarkdown(states?: WorkflowState[]): string;
//# sourceMappingURL=workflow-states.d.ts.map