import type { InteractiveQuestion } from './clarification.js';
import type { ModelName } from './workflow.js';
export type StageName = 'planner' | 'reviewer' | 'executor' | 'validator' | 'merger' | 'releaser';
export type ControlMode = 'full-auto' | 'interactive' | 'preview';
export type ModelStrategy = 'cost-optimal' | 'balanced' | 'quality-optimal';
export type StageStatus = 'pending' | 'in-progress' | 'completed' | 'failed';
export type GateAction = 'proceed' | 'pause' | 'exit';
export interface TeammateInfo {
    specId: string;
    model: ModelName;
    worktree: string;
    status: 'pending' | 'running' | 'completed' | 'failed' | 'rolled-back';
}
export interface StageRecord {
    name: StageName;
    status: StageStatus;
    startedAt?: string;
    completedAt?: string;
    inputs: unknown;
    outputs: unknown;
    teammates?: TeammateInfo[];
}
export interface SddFlowState {
    runId: string;
    startedAt: string;
    projectPath: string;
    controlMode: ControlMode;
    specIds: string[];
    stages: StageRecord[];
    currentStage: number;
    pendingQuestions?: InteractiveQuestion[];
}
export interface WaveTeammate {
    specId: string;
    model: ModelName;
}
export interface Wave {
    index: number;
    specIds: string[];
    teammates: WaveTeammate[];
}
export interface WavePlan {
    waves: Wave[];
    totalTeammates: number;
    estimatedCost: number;
}
export interface ModelRouting {
    planner: ModelName;
    reviewer: ModelName;
    executor: ModelName;
    validator: ModelName;
    merger: ModelName;
    releaser: ModelName;
}
export interface GateDecision {
    action: GateAction;
    questions?: InteractiveQuestion[];
    reason?: string;
    /** SPEC-587: Plan mode hint forwarded to MCP response layer for Claude Code hosts. */
    modeHint?: 'plan';
}
export interface PlannerOutput {
    wavePlan: WavePlan;
    modelRouting: ModelRouting;
    perTeammateModels: Record<string, ModelName>;
}
export interface ValidatorOutput {
    passed: string[];
    failed: string[];
    rolledBack: string[];
}
export interface SddFlowInput {
    specIds?: string[];
    projectPath?: string;
    controlMode?: ControlMode;
    maxTeammates?: number;
    modelStrategy?: ModelStrategy;
    qualityGates?: string[];
    resumeFrom?: string;
}
export interface SddFlowResult {
    runId: string;
    status: 'completed' | 'paused' | 'preview' | 'failed';
    currentStage?: StageName;
    interactiveQuestions?: InteractiveQuestion[];
    wavePlan?: WavePlan;
    summary?: string;
    merged?: string[];
    released?: boolean;
}
export interface SafetyWave {
    specIds: string[];
}
export interface PipelineInput {
    state: SddFlowState;
    perTeammateOverrides?: Record<string, ModelName>;
    maxTeammates?: number;
    parallelSafetyResult?: {
        waves: SafetyWave[];
    };
}
export interface PipelineOutput {
    state: SddFlowState;
    interactiveQuestions?: InteractiveQuestion[];
    status: 'completed' | 'paused' | 'preview' | 'failed';
    wavePlan?: WavePlan;
    merged?: string[];
    released?: boolean;
}
export interface GateContext {
    stage: StageName;
    controlMode: ControlMode;
    wavePlan?: WavePlan;
    modelRouting?: ModelRouting;
    specIds?: string[];
    teammates?: TeammateInfo[];
    validationFailed?: string[];
}
export { type InteractiveQuestion };
//# sourceMappingURL=sdd-flow.d.ts.map