import { negotiateCapabilities } from './negotiate-capabilities.js'; import type { NormalizedRuntimeRequest, RuntimeError } from '../domain/execution.js'; import type { CliExecutionAdapterPort, CliOneshotRequestPort, CliSessionRequestPort, CliSpawnDescriptorPort, RuntimeInfrastructurePorts, RuntimePluginLookupPort } from '../ports/index.js'; export interface PreparedCliExecution { readonly adapter: CliExecutionAdapterPort; readonly request: ReturnType; readonly spec: TSpec; readonly descriptor: CliSpawnDescriptorPort; } export declare class RuntimeExecutionFacade { #private; private readonly registry; readonly ports: RuntimeInfrastructurePorts; constructor(registry: RuntimePluginLookupPort, ports: RuntimeInfrastructurePorts); prepareOneshot(runtimeId: string, spec: CliOneshotRequestPort, adapter?: CliExecutionAdapterPort): PreparedCliExecution; prepareSession(runtimeId: string, mode: 'persistent' | 'resume' | 'control', spec: CliSessionRequestPort, sessionId?: string, adapter?: CliExecutionAdapterPort): PreparedCliExecution; complete(runtimeId: string, request: NormalizedRuntimeRequest): Promise; normalizeError(pluginId: string, cause: unknown): RuntimeError; shouldRetry(error: RuntimeError, attempt: number): boolean; }