import type { CliToolRegistry } from '../workflow-tools';
import type { BaseWorkflowInput } from '../workflows';
import type { CodeWorkflowInput } from '../workflows/code.workflow';
import type { CommitWorkflowInput } from '../workflows/commit.workflow';
import type { FixWorkflowInput } from '../workflows/fix.workflow';
import type { PlanWorkflowInput } from '../workflows/plan.workflow';
import type { ReviewWorkflowInput } from '../workflows/review.workflow';
import type { CliWorkflowContext, ToolRegistry, WorkflowExecutionResult } from './types';
/**
 * Adapts existing workflow outputs to WorkflowExecutionResult format
 *
 * This layer bridges the gap between existing workflows (which have varying
 * return types) and the unified WorkflowExecutionResult format expected by
 * the agent orchestrator.
 */
/**
 * Adapt code workflow result
 */
export declare function adaptCodeWorkflow(input: CodeWorkflowInput & BaseWorkflowInput, context: CliWorkflowContext<CliToolRegistry>): Promise<WorkflowExecutionResult>;
/**
 * Adapt fix workflow result
 */
export declare function adaptFixWorkflow(input: FixWorkflowInput & BaseWorkflowInput, context: CliWorkflowContext<CliToolRegistry>): Promise<WorkflowExecutionResult>;
/**
 * Adapt plan workflow result
 */
export declare function adaptPlanWorkflow(input: PlanWorkflowInput & BaseWorkflowInput, context: CliWorkflowContext<CliToolRegistry>): Promise<WorkflowExecutionResult>;
/**
 * Adapt review workflow result
 */
export declare function adaptReviewWorkflow(input: ReviewWorkflowInput & BaseWorkflowInput, context: CliWorkflowContext<CliToolRegistry>): Promise<WorkflowExecutionResult>;
/**
 * Adapt commit workflow result
 */
export declare function adaptCommitWorkflow(input: CommitWorkflowInput & BaseWorkflowInput, context: CliWorkflowContext<CliToolRegistry>): Promise<WorkflowExecutionResult>;
/**
 * Generic workflow invoker
 * Routes to the appropriate adapter based on workflow name
 *
 * @param workflowName - The name of the workflow to invoke
 * @param input - Input data for the workflow
 * @param context - Workflow context (logger, tools, etc.)
 * @param signal - Optional AbortSignal for cancellation
 */
export declare function invokeWorkflow<TTools extends ToolRegistry = CliToolRegistry>(workflowName: string, input: unknown, context: CliWorkflowContext<TTools>, signal?: AbortSignal): Promise<WorkflowExecutionResult>;
/**
 * Execute workflow with timeout
 * Wraps workflow execution with timeout protection
 */
export declare function invokeWorkflowWithTimeout<TTools extends ToolRegistry = CliToolRegistry>(workflowName: string, input: unknown, context: CliWorkflowContext<TTools>, timeoutMs: number): Promise<WorkflowExecutionResult>;
/**
 * @deprecated Use invokeWorkflow instead
 */
export declare const WorkflowAdapter: {
    adaptCodeWorkflow: typeof adaptCodeWorkflow;
    adaptFixWorkflow: typeof adaptFixWorkflow;
    adaptPlanWorkflow: typeof adaptPlanWorkflow;
    adaptReviewWorkflow: typeof adaptReviewWorkflow;
    adaptCommitWorkflow: typeof adaptCommitWorkflow;
    invokeWorkflow: typeof invokeWorkflow;
    invokeWorkflowWithTimeout: typeof invokeWorkflowWithTimeout;
};
//# sourceMappingURL=workflow-adapter.d.ts.map