"""Public contract for preparing Agent inputs from a fixed video clip.""" from __future__ import annotations from dataclasses import dataclass from pathlib import Path from typing import Any, Mapping, Protocol from bench_builder.video_plugin_options import PluginOptionSpec from bench_builder.video_source_plugins import VideoClipArtifact class VideoReferenceProcessorError(RuntimeError): """Raised when a clip cannot be converted into reference artifacts.""" @dataclass(frozen=True) class VideoReferenceProcessorDescriptor: plugin_id: str display_name: str sampling_strategies: tuple[str, ...] options: tuple[PluginOptionSpec, ...] = () @dataclass(frozen=True) class VideoReferenceArtifacts: processor_id: str frame_dir: Path timeline_path: Path reference_manifest_path: Path design_path: Path design_still_path: Path gameplay_path: Path settings_path: Path frame_count: int class VideoReferenceProcessor(Protocol): descriptor: VideoReferenceProcessorDescriptor def validate_options( self, options: Mapping[str, Any] | None ) -> dict[str, Any]: ... def prepare( self, clip: VideoClipArtifact, destination: Path, options: Mapping[str, Any], ) -> VideoReferenceArtifacts: ... __all__ = [ "VideoReferenceArtifacts", "VideoReferenceProcessor", "VideoReferenceProcessorDescriptor", "VideoReferenceProcessorError", ]