/**
 * Canonical runtime/backend/format mapping utilities.
 *
 * This is the SINGLE SOURCE OF TRUTH for mapping between:
 * - Pipeline config (runtime: 'node'|'python', backend: 'cpu'|'coreml'|'cuda'|...)
 * - DetectionRuntime ('onnx'|'coreml'|'pytorch'|'openvino'|'tflite')
 * - ModelFormat ('onnx'|'coreml'|'openvino'|'tflite'|'pt')
 *
 * Import from '@camstack/types' — do NOT duplicate these mappings anywhere.
 */
import type { ModelFormat } from '../types/models.js';
import type { DetectionRuntime } from '../types/config.js';
/** Pipeline-level runtime: 'node' (ONNX Runtime in Node.js) or 'python' (Python inference) */
export type PipelineRuntime = 'node' | 'python';
/**
 * Map a backend ID to the model format it requires.
 *
 * Node.js backends (cpu, coreml, cuda, tensorrt) all use ONNX format
 * because onnxruntime-node loads .onnx and uses execution providers internally.
 *
 * Python backends use their native format.
 */
declare const BACKEND_TO_FORMAT: Readonly<Record<string, ModelFormat>>;
/**
 * Map DetectionRuntime to ModelFormat.
 * Used when the addon receives an explicit runtime (not 'auto').
 */
declare const RUNTIME_TO_FORMAT: Readonly<Record<DetectionRuntime, ModelFormat>>;
/**
 * Map a Python backend to the Python inference script name.
 */
declare const PYTHON_SCRIPT: Readonly<Record<string, string>>;
/**
 * Resolve pipeline config (runtime + backend) to a DetectionRuntime.
 *
 * Pipeline config uses two levels:
 *   runtime: 'node' | 'python'
 *   backend: 'cpu' | 'coreml' | 'cuda' | 'openvino' | 'pytorch' | ...
 *
 * Addons expect a DetectionRuntime:
 *   'onnx' | 'coreml' | 'pytorch' | 'openvino' | 'tflite'
 *
 * Mapping rules:
 *   node + any backend   → 'onnx' (onnxruntime-node handles backend via EP)
 *   python + coreml      → 'coreml' (native .mlpackage via coremltools)
 *   python + openvino    → 'openvino'
 *   python + pytorch     → 'pytorch'
 *   python + onnx-py     → 'onnx'
 *   python + <other>     → backend as-is
 */
export declare function resolveDetectionRuntime(pipelineRuntime: PipelineRuntime | string, backend: string): DetectionRuntime;
/**
 * Resolve pipeline config (runtime + backend) to a ModelFormat.
 *
 * Determines which model file format is needed (.onnx, .mlpackage, etc.)
 */
export declare function resolveModelFormat(pipelineRuntime: PipelineRuntime | string, backend: string): ModelFormat;
/**
 * Resolve pipeline runtime string to 'auto' | DetectionRuntime for addon consumption.
 * Used when building addon addonConfig from pipeline step config.
 *
 *   'python' + 'coreml'   → 'coreml'
 *   'node'   + 'coreml'   → 'onnx'
 *   'node'   + 'cpu'      → 'onnx'
 *   'auto'                → 'auto'
 */
export declare function resolveAddonRuntime(pipelineRuntime: string | undefined, backend: string | undefined): DetectionRuntime | 'auto';
/**
 * Get the model format needed for a given backend.
 * Convenience wrapper for backend-only lookup (e.g., UI components).
 */
export declare function formatForBackend(backend: string): ModelFormat;
/**
 * Get the model format for a given DetectionRuntime.
 */
export declare function formatForRuntime(runtime: DetectionRuntime): ModelFormat;
/**
 * Get the Python inference script name for a backend.
 * Returns undefined if no Python script is needed (e.g., 'cpu' uses ONNX).
 */
export declare function pythonScriptForBackend(backend: string): string | undefined;
/**
 * Check if a DetectionRuntime requires a Python binary.
 * 'coreml', 'pytorch', 'openvino' need Python; 'onnx' and 'tflite' don't.
 */
export declare function requiresPython(runtime: DetectionRuntime | string): boolean;
export { BACKEND_TO_FORMAT, RUNTIME_TO_FORMAT, PYTHON_SCRIPT };
//# sourceMappingURL=runtime-mapping.d.ts.map