import type { LocalEntrypointOptions, LocalResponse } from '../../../local/entrypoint.js';
import { runLocal } from '../../../local/entrypoint.js';
import { type WorkflowSummary } from './workflow-summary.js';
import { type CapturedWorkflowSpec, type SpecIntakePrompts } from './spec-intake-flow.js';
import { type LocalRunMonitorState } from './local-run-monitor.js';
export interface LocalPreflightCheck {
    id: string;
    label: string;
    status: 'found' | 'missing' | 'unknown';
    path?: string;
    detail?: string;
    blocker?: boolean;
    recovery?: string;
}
export interface LocalSpecLocation {
    path: string;
    kind: 'file' | 'directory';
}
export interface LocalPreflightResult {
    cwd: string;
    repoRoot: string;
    packageManager: 'npm' | 'pnpm' | 'yarn' | 'bun' | 'unknown';
    checks: LocalPreflightCheck[];
    specLocations: LocalSpecLocation[];
    workflowArtifacts: string[];
    blockers: string[];
}
export type LocalRunConfirmation = 'background' | 'foreground' | 'not-now' | 'edit-first';
export interface LocalWorkflowPrompts extends SpecIntakePrompts {
    confirmRun(input: {
        summary: WorkflowSummary;
    }): Promise<LocalRunConfirmation>;
}
export interface LocalWorkflowPromptRuntime {
    input?: NodeJS.ReadableStream;
    output?: NodeJS.WritableStream;
    signal?: AbortSignal;
}
export interface LocalWorkflowFlowDeps {
    cwd?: string;
    prompts: LocalWorkflowPrompts;
    runLocalFn?: typeof runLocal;
    localOptions?: LocalEntrypointOptions;
    outputPath?: string;
    autoFixAttempts?: number;
    onMonitorStarted?: (state: LocalRunMonitorState) => void | Promise<void>;
}
export declare function createInquirerLocalWorkflowPrompts(runtime?: LocalWorkflowPromptRuntime): LocalWorkflowPrompts;
export interface LocalWorkflowFlowResult {
    preflight: LocalPreflightResult;
    capture: CapturedWorkflowSpec;
    generation?: LocalResponse;
    summary: WorkflowSummary;
    confirmation?: LocalRunConfirmation;
    run?: LocalResponse;
    monitoredRun?: LocalRunMonitorState;
    runSummary?: LocalWorkflowRunSummary;
    command: string;
}
export interface LocalWorkflowRunSummary {
    outcome: string;
    changedFiles: string[];
    evidencePath?: string;
    nextCommand: string;
}
export declare function runLocalPreflight(cwd?: string): Promise<LocalPreflightResult>;
export declare function runLocalWorkflowFlow(deps: LocalWorkflowFlowDeps): Promise<LocalWorkflowFlowResult>;
export declare function buildLocalWorkflowRunSummary(monitoredRun: LocalRunMonitorState | undefined, run: LocalResponse | undefined, command: string): LocalWorkflowRunSummary;
export declare function localPreflightDigest(preflight: LocalPreflightResult): string[];
