import type Database from 'better-sqlite3';
export interface PipelineStep {
    id: string;
    label: string;
    agentId: string | null;
    agentName: string | null;
    type?: 'agent' | 'checkpoint';
}
export interface CreatePipelineTasksParams {
    squadCode: string;
    activityId: string;
    triggeredBy: 'dashboard' | 'chat' | 'schedule' | 'chain';
    steps: PipelineStep[];
}
export interface KanbanTaskRow {
    id: string;
    squad_code: string;
    title: string;
    description: string | null;
    status: string;
    position: number;
    result: string | null;
    started_at: string | null;
    finished_at: string | null;
    step_id: string | null;
    agent_id: string | null;
    agent_name: string | null;
    activity_id: string | null;
    triggered_by: string;
    created_at: string;
    updated_at: string;
}
export declare function createPipelineTasks(db: Database.Database, params: CreatePipelineTasksParams): KanbanTaskRow[];
export declare function markTaskExecuting(db: Database.Database, params: {
    activityId: string;
    stepId: string;
}): void;
export declare function markTaskDone(db: Database.Database, params: {
    activityId: string;
    stepId: string;
    result?: string;
}): void;
export declare function markTaskFailed(db: Database.Database, params: {
    activityId: string;
    stepId: string;
    error?: string;
}): void;
/**
 * Get the active (running) activity ID for a squad.
 */
export declare function getActiveActivityId(db: Database.Database, squadCode: string): string | null;
/**
 * Mark a task as executing by its pipeline position (0-based index).
 */
export declare function markTaskExecutingByPosition(db: Database.Database, params: {
    activityId: string;
    position: number;
}): void;
/**
 * Mark a task as done by its pipeline position (0-based index).
 */
export declare function markTaskDoneByPosition(db: Database.Database, params: {
    activityId: string;
    position: number;
}): void;
export declare function markAllTasksDone(db: Database.Database, params: {
    activityId: string;
    result?: string;
}): void;
export declare function markAllTasksFailed(db: Database.Database, params: {
    activityId: string;
    error?: string;
}): void;
/**
 * Parse squad.yaml and create pipeline tasks for an activity.
 * Returns empty array if no pipeline steps found or yaml is missing.
 */
export declare function createPipelineTasksFromYaml(db: Database.Database, squadsDir: string, squadName: string, activityId: string, triggeredBy: 'dashboard' | 'chat' | 'schedule' | 'chain'): KanbanTaskRow[];
//# sourceMappingURL=pipeline-task-service.d.ts.map