import type { ProjectConfig } from './config.js';
/** Card state names — configurable via YAML, defaults to current values */
export interface CardStates {
    planning: string;
    backlog: string;
    ready: string;
    active: string;
    review: string;
    done: string;
}
/** A single pipeline stage definition */
export interface StageDefinition {
    name: string;
    /** Which card state triggers this stage */
    triggerState: string;
    /** Card state while this stage is active */
    activeState: string;
    /** Agent to use — always 'claude' (kept for backward-compat with YAML) */
    agent: string;
    /** Optional profile to load */
    profile?: string;
    /** Completion strategy: git-evidence, fast-forward-merge, exit-code */
    completion: string;
    /** On complete: which state to move card to */
    onCompleteState: string;
    /** On fail: label to add */
    onFailLabel?: string;
    /** On fail: comment to add */
    onFailComment?: string;
    /** Queue strategy — ignored in single worker model */
    queue?: string;
    /** Timeout override for this stage */
    timeout?: string;
    /** Halt pipeline on failure (default true) */
    halt?: boolean;
}
export interface ProjectPipelineSettings {
    /** Whether git operations (branch, worktree, merge) are enabled. Default true. */
    gitEnabled: boolean;
    states: CardStates;
    stages: StageDefinition[];
    /** All non-Done states to check for pipeline completion */
    activeStates: string[];
    /** Labels to clean when cards re-enter backlog */
    auxiliaryLabels: string[];
}
export declare class ProjectPipelineAdapter {
    readonly settings: ProjectPipelineSettings;
    constructor(config: ProjectConfig, projectDir?: string);
    /** Whether git operations are enabled */
    get gitEnabled(): boolean;
    /** Get card state names */
    get states(): CardStates;
    /** Get all stage definitions */
    get stages(): StageDefinition[];
    /** Find stage by name */
    getStage(name: string): StageDefinition | undefined;
    /** Find stage by trigger state (which PM state activates it) */
    getStageByTrigger(pmState: string): StageDefinition | undefined;
    /** Get the first stage (responsible for prepare: branch + worktree) */
    get firstStage(): StageDefinition;
    /** Get the last stage (responsible for release: worktree cleanup) */
    get lastStage(): StageDefinition;
    /**
     * @deprecated Use firstStage instead. Kept for backward compatibility during migration.
     */
    get developStage(): StageDefinition;
    /**
     * @deprecated Use lastStage or getStage() instead. Kept for backward compatibility during migration.
     */
    get integrateStage(): StageDefinition | undefined;
    /** Find the stage whose activeState matches the given PM state */
    getStageByActiveState(pmState: string): StageDefinition | undefined;
    /** All states where cards are "active" (not done, not backlog) */
    get activeStates(): string[];
    /** Labels to clean when card goes back to backlog */
    get auxiliaryLabels(): string[];
    /** Derive PM state from lease phase */
    derivePmState(leasePhase: string, currentPmState?: string): string;
}
/** Read the active pipeline name */
export declare function getActivePipelineName(projectName: string): string | null;
/** Set the active pipeline name */
export declare function setActivePipeline(projectName: string, name: string): void;
//# sourceMappingURL=projectPipelineAdapter.d.ts.map