/**
 * SpecVerse Orchestrator
 * Central coordinator for AI-powered specification workflows
 */
type UserRequirements = any;
type CostEstimate = any;
type AIOperation = any;
export interface OrchestrationContext {
    input?: string;
    inputType?: 'specification' | 'code' | 'requirements' | 'manifest';
    inputPath?: string;
    outputPath?: string;
    outputFormat?: 'yaml' | 'json' | 'specly';
    operation: 'analyse' | 'create' | 'infer' | 'materialise' | 'realize';
    framework?: string;
    scale?: 'personal' | 'business' | 'enterprise';
    temperature?: number;
    maxTokens?: number;
    streaming?: boolean;
    interactive?: boolean;
    sessionId?: string;
}
export interface WorkflowStep {
    operation: 'analyse' | 'create' | 'infer' | 'materialise' | 'realize';
    name: string;
    description?: string;
    inputSource?: 'initial' | 'previous' | 'file';
    inputPath?: string;
    outputPath?: string;
    outputFormat?: 'yaml' | 'json' | 'specly';
    framework?: string;
    scale?: 'personal' | 'business' | 'enterprise';
    temperature?: number;
    maxTokens?: number;
    interactive?: boolean;
    condition?: {
        onSuccess?: boolean;
        onFailure?: boolean;
        ifOutputContains?: string;
    };
}
export interface WorkflowDefinition {
    name: string;
    version: string;
    description: string;
    initialInput?: string;
    initialInputPath?: string;
    initialInputType?: 'specification' | 'code' | 'requirements' | 'manifest';
    steps: WorkflowStep[];
    globals?: {
        framework?: string;
        scale?: 'personal' | 'business' | 'enterprise';
        interactive?: boolean;
        outputDirectory?: string;
    };
    onError?: 'stop' | 'continue' | 'retry';
    maxRetries?: number;
}
export interface WorkflowExecutionResult {
    workflowName: string;
    startTime: number;
    endTime: number;
    totalTime: number;
    steps: Array<{
        stepName: string;
        operation: string;
        status: 'success' | 'failed' | 'skipped';
        result?: OrchestrationResult;
        error?: string;
        executionTime: number;
    }>;
    finalOutput?: string;
    finalOutputPath?: string;
    metadata: {
        totalOperations: number;
        successfulOperations: number;
        failedOperations: number;
        skippedOperations: number;
    };
}
export interface OrchestrationResult {
    content: string;
    operation: string;
    provider: string;
    usage?: {
        prompt_tokens: number;
        completion_tokens: number;
        total_tokens: number;
    };
    sessionId?: string;
    metadata?: {
        framework?: string;
        scale?: string;
        inferenceRules?: number;
        processingTime?: number;
        error?: boolean;
    };
}
export declare class SpecVerseOrchestrator {
    private config;
    private configLoader;
    private providers;
    private defaultProvider?;
    constructor();
    /**
     * Initialize orchestrator with configuration
     */
    initialize(configPath?: string): Promise<void>;
    /**
     * Execute AI-powered workflow operation
     */
    execute(context: OrchestrationContext): Promise<OrchestrationResult>;
    /**
     * Analyze existing codebase and extract specifications
     */
    analyse(codePath: string, options?: Partial<OrchestrationContext>): Promise<OrchestrationResult>;
    /**
     * Create specifications from natural language requirements
     */
    create(requirements: string, options?: Partial<OrchestrationContext>): Promise<OrchestrationResult>;
    /**
     * Infer expanded specifications using AI rules
     */
    infer(specificationPath: string, options?: Partial<OrchestrationContext>): Promise<OrchestrationResult>;
    /**
     * Materialize clean implementations from specifications
     */
    materialise(specificationPath: string, framework: string, options?: Partial<OrchestrationContext>): Promise<OrchestrationResult>;
    /**
     * Realize complete applications from specifications
     */
    realize(specificationPath: string, framework: string, options?: Partial<OrchestrationContext>): Promise<OrchestrationResult>;
    /**
     * Get available providers
     */
    getAvailableProviders(): Array<{
        name: string;
        type: string;
        enabled: boolean;
    }>;
    /**
     * Switch to different provider
     */
    switchProvider(providerName: string): Promise<void>;
    /**
     * Execute a workflow with multiple steps
     */
    executeWorkflow(workflow: WorkflowDefinition): Promise<WorkflowExecutionResult>;
    /**
     * Load workflow definition from file
     */
    loadWorkflow(workflowPath: string): Promise<WorkflowDefinition>;
    /**
     * Get orchestrator status
     */
    getStatus(): {
        initialized: boolean;
        configPath: string;
        defaultProvider: string;
        availableProviders: {
            name: string;
            type: string;
            enabled: boolean;
        }[];
        features: {
            inference?: boolean;
            streaming?: boolean;
            caching?: boolean;
        };
        promptsLoaded: number;
    };
    /**
     * Extract YAML blocks from AI response content
     */
    private extractYamlBlocks;
    private shouldSkipStep;
    private resolveOutputPath;
    private detectInputType;
    private setupProviders;
    private getProvider;
    private getProviderName;
    private getDefaultProviderName;
    private validateApiKeyForNonInteractive;
    private validateContext;
    /**
     * Enhance prompt using AI commands API
     */
    private enhancePromptWithAPI;
    private buildUserPrompt;
    private executeInteractive;
    private postProcessResult;
    private postProcessAnalysis;
    private postProcessCreation;
    private postProcessInference;
    private postProcessMaterialization;
    private postProcessRealization;
    private saveOutput;
    /**
     * Execute single-step operation using AI commands
     */
    executeSingle(operation: AIOperation, requirements: UserRequirements, providerName?: string): Promise<OrchestrationResult>;
    /**
     * Estimate cost for single or multi-step operations
     */
    estimateCost(operation: AIOperation | WorkflowDefinition, requirements?: UserRequirements, providerName?: string): Promise<CostEstimate>;
    /**
     * Estimate cost for workflow execution
     */
    private estimateWorkflowCost;
    /**
     * Execute workflow with library-aware prompts
     */
    executeEnhancedWorkflow(workflow: WorkflowDefinition): Promise<WorkflowExecutionResult>;
}
export declare const specverseOrchestrator: SpecVerseOrchestrator;
export {};
//# sourceMappingURL=specverse-orchestrator.d.ts.map