import type { RawHandoff } from '../../../local/request-normalizer.js';
import type { LocalPreflightResult } from './local-workflow-flow.js';
export type SpecIntakeSource = 'spec-file' | 'editor' | 'goal' | 'workflow-artifact';
export interface CapturedWorkflowSpec {
    source: SpecIntakeSource;
    workflowName: string;
    spec: string;
    specPath?: string;
    artifactPath?: string;
    generatedFromGoal?: {
        goal: string;
        clarifications: string[];
        approved: boolean;
    };
}
export interface SpecIntakePrompts {
    selectSpecSource(input: {
        suggestions: string[];
    }): Promise<SpecIntakeSource>;
    inputSpecFilePath(input: {
        suggestions: string[];
        defaultPath?: string;
    }): Promise<string>;
    editSpec(input: {
        initialValue?: string;
        message: string;
    }): Promise<string>;
    inputWorkflowName(input: {
        defaultName: string;
    }): Promise<string>;
    inputGoal(): Promise<string>;
    inputGoalClarification?(input: {
        goal: string;
        question: string;
    }): Promise<string>;
    approveGeneratedSpec(input: {
        spec: string;
        goal: string;
    }): Promise<'approve' | 'edit'>;
    inputWorkflowArtifactPath(input: {
        suggestions: string[];
    }): Promise<string>;
}
export interface SpecIntakeFlowDeps {
    prompts: SpecIntakePrompts;
    cwd: string;
    preflight?: LocalPreflightResult;
    readFileText?: (path: string) => Promise<string>;
}
export declare function runSpecIntakeFlow(deps: SpecIntakeFlowDeps): Promise<CapturedWorkflowSpec>;
export declare function specCaptureToHandoff(capture: CapturedWorkflowSpec, invocationRoot: string, options?: {
    stageMode?: 'generate' | 'run' | 'generate-and-run';
    outputPath?: string;
}): RawHandoff;
export declare function defaultArtifactPathForWorkflowName(workflowName: string): string;
export declare function defaultWorkflowNameFromPath(path: string): string;
export declare function sanitizeWorkflowName(value: string): string;
export declare function buildSpecFromGoal(goal: string, clarifications?: string[]): string;
