/**
 * Request adapters for normalizing input from different sources
 *
 * Each adapter transforms source-specific input into a unified WorkflowRequest.
 */
import type { WorkflowRequest, ExecutionContext, ValidationResult, CliInput, HttpInput, Environment } from '../types.js';
/**
 * Request adapter interface
 */
export interface RequestAdapter<TInput> {
    /**
     * Parse source input into a unified WorkflowRequest
     */
    parseRequest(input: TInput): WorkflowRequest;
    /**
     * Validate the parsed request
     */
    validate(request: WorkflowRequest): ValidationResult;
}
/**
 * Base adapter with shared validation logic
 */
declare abstract class BaseRequestAdapter<TInput> implements RequestAdapter<TInput> {
    abstract parseRequest(input: TInput): WorkflowRequest;
    validate(request: WorkflowRequest): ValidationResult;
    /**
     * Create a default execution context
     */
    protected createContext(source: WorkflowRequest['context']['source'], options?: {
        requestId?: string;
        includeTrace?: boolean;
        timeout?: number;
        environment?: Environment;
    }): ExecutionContext;
    /**
     * Detect runtime environment
     */
    protected detectEnvironment(): Environment;
}
/**
 * CLI request adapter
 *
 * Parses CLI command input into a WorkflowRequest
 */
export declare class CliRequestAdapter extends BaseRequestAdapter<CliInput> {
    parseRequest(input: CliInput): WorkflowRequest;
    /**
     * Extract workflow ID from file path (uses filename without extension)
     */
    private extractWorkflowId;
}
/**
 * HTTP request adapter (for Fastify/Express-like servers)
 *
 * Parses HTTP request into a WorkflowRequest
 */
export declare class HttpRequestAdapter extends BaseRequestAdapter<HttpInput> {
    parseRequest(input: HttpInput): WorkflowRequest;
}
/**
 * Create the appropriate adapter for a given source
 */
export declare function createAdapter(source: 'cli'): CliRequestAdapter;
export declare function createAdapter(source: 'http'): HttpRequestAdapter;
export {};
//# sourceMappingURL=adapters.d.ts.map