/**
 * Agent Executor Interface
 *
 * Output port for executing AI agent operations (prompts, streaming).
 * Infrastructure layer provides concrete implementations for each agent type.
 *
 * Following Clean Architecture:
 * - Domain and Application layers depend on this interface
 * - Infrastructure layer provides concrete implementations
 *
 * @example
 * ```typescript
 * // Resolve an executor from the factory and run a prompt
 * const executor = factory.createExecutor(AgentType.ClaudeCode, agentConfig);
 * const result = await executor.execute('Analyze this codebase');
 *
 * // Stream results for real-time output
 * for await (const event of executor.executeStream('Implement feature X')) {
 *   console.log(event.content);
 * }
 * ```
 */
import type { AgentType, AgentFeature } from '../../../../domain/generated/output.js';
/**
 * Result returned after an agent execution completes.
 */
export interface AgentExecutionResult {
    /** The agent's output text */
    result: string;
    /** Session ID for resuming conversations */
    sessionId?: string;
    /** Token usage statistics */
    usage?: {
        inputTokens: number;
        outputTokens: number;
    };
    /** Additional metadata from the agent */
    metadata?: Record<string, unknown>;
}
/**
 * Event emitted during streamed agent execution.
 */
export interface AgentExecutionStreamEvent {
    /** Event type: progress updates, final result, or error */
    type: 'progress' | 'result' | 'error';
    /** Event content text */
    content: string;
    /** When the event was emitted */
    timestamp: Date;
}
/**
 * Options for controlling agent execution behavior.
 */
export interface AgentExecutionOptions {
    /** Working directory for the agent */
    cwd?: string;
    /** Tools the agent is allowed to use */
    allowedTools?: string[];
    /** Session ID to resume a previous conversation */
    resumeSession?: string;
    /** Maximum number of agent turns */
    maxTurns?: number;
    /** Model to use for execution */
    model?: string;
    /** System prompt to prepend */
    systemPrompt?: string;
    /** JSON schema for structured output */
    outputSchema?: object;
    /** Execution timeout in milliseconds */
    timeout?: number;
    /** Suppress executor debug logging (e.g. for quick foreground calls) */
    silent?: boolean;
}
/**
 * Port interface for executing prompts against an AI agent.
 *
 * Implementations must:
 * - Execute prompts and return structured results
 * - Support streaming execution via async iterables
 * - Report which agent features are supported
 *
 * @example
 * ```typescript
 * const executor: IAgentExecutor = container.resolve('IAgentExecutor');
 * if (executor.supportsFeature(AgentFeature.Streaming)) {
 *   for await (const event of executor.executeStream('Plan this feature')) {
 *     process.stdout.write(event.content);
 *   }
 * }
 * ```
 */
export interface IAgentExecutor {
    /** The type of agent this executor handles */
    readonly agentType: AgentType;
    /**
     * Execute a prompt and return the complete result.
     *
     * @param prompt - The prompt to send to the agent
     * @param options - Optional execution configuration
     * @returns The agent's execution result
     */
    execute(prompt: string, options?: AgentExecutionOptions): Promise<AgentExecutionResult>;
    /**
     * Execute a prompt and stream events as they arrive.
     *
     * @param prompt - The prompt to send to the agent
     * @param options - Optional execution configuration
     * @returns An async iterable of stream events
     */
    executeStream(prompt: string, options?: AgentExecutionOptions): AsyncIterable<AgentExecutionStreamEvent>;
    /**
     * Check if this executor supports a specific agent feature.
     *
     * @param feature - The feature to check
     * @returns true if the feature is supported
     */
    supportsFeature(feature: AgentFeature): boolean;
}
//# sourceMappingURL=agent-executor.interface.d.ts.map