import { type ProviderOptions } from '@polka-codes/cli-shared';
import { type Logger, type ToolProvider, type ToolRegistry, UsageMeter, type WorkflowFn } from '@polka-codes/core';
import { type CliOptions } from './options';
import type { BaseWorkflowInput } from './workflows';
/**
 * Execution context for running workflows.
 * This replaces the Commander.js Command object, making the code
 * usable both from CLI and as a scripting API.
 */
export interface ExecutionContext extends CliOptions {
}
type RunWorkflowOptions = {
    commandName: string;
    context: ExecutionContext;
    logger: Logger;
    interactive?: boolean;
    getProvider?: (args: ProviderOptions) => ToolProvider;
    onUsageMeterCreated?: (meter: UsageMeter) => void;
    /** Optional provider/model override for this workflow execution */
    providerOverride?: {
        provider?: string;
        model?: string;
        parameters?: Record<string, unknown>;
    };
};
export declare function runWorkflow<TInput, TOutput, TTools extends ToolRegistry>(workflow: WorkflowFn<TInput & BaseWorkflowInput, TOutput, TTools>, workflowInput: TInput, options: RunWorkflowOptions): Promise<TOutput | undefined>;
export {};
//# sourceMappingURL=runWorkflow.d.ts.map