/** * Capture Agent — Capture Strategy * * Abstraction over the supported media modes: screenshot and clip. * The opcode runner is identical for both — only the capture opcodes dispatch * to different strategies. */ import type { ArtifactSpec, ArtifactResult, RuntimeAdapter, MediaMode } from './execution-types.js'; export interface CaptureStrategy { readonly mediaMode: MediaMode; /** Prepare the adapter for capture (e.g. lock viewport, inject cursor overlay) */ prepare(adapter: RuntimeAdapter, spec: ArtifactSpec): Promise; /** Perform the capture and return the raw artifact */ capture(adapter: RuntimeAdapter, spec: ArtifactSpec): Promise; /** Post-process the artifact (mockup frame, status bar, format conversion) */ postProcess(artifact: ArtifactResult, spec: ArtifactSpec): Promise; } export declare class ScreenshotStrategy implements CaptureStrategy { readonly mediaMode: "screenshot"; prepare(_adapter: RuntimeAdapter, _spec: ArtifactSpec): Promise; capture(adapter: RuntimeAdapter, _spec: ArtifactSpec): Promise; postProcess(artifact: ArtifactResult, spec: ArtifactSpec): Promise; } export declare class ClipStrategy implements CaptureStrategy { readonly mediaMode: "clip"; prepare(adapter: RuntimeAdapter, _spec: ArtifactSpec): Promise; capture(adapter: RuntimeAdapter, _spec: ArtifactSpec): Promise; postProcess(artifact: ArtifactResult, spec: ArtifactSpec): Promise; } /** * Long-form MP4 capture for `mediaMode='video'`. Shares the clip pipeline * (frame loop + ffmpeg assembly) but pins capture resolution to the delivery * frame (1920×1080 by default) at 30fps and removes the clip duration cap. * The bifurcation actually lives in * `WebPlaywrightLocal.beginRecording()` — this strategy is the typed surface * the orphan capture-strategy factory exposes. */ export declare class VideoStrategy implements CaptureStrategy { readonly mediaMode: "video"; prepare(_adapter: RuntimeAdapter, _spec: ArtifactSpec): Promise; capture(adapter: RuntimeAdapter, _spec: ArtifactSpec): Promise; postProcess(artifact: ArtifactResult, _spec: ArtifactSpec): Promise; } export declare function createCaptureStrategy(mediaMode: MediaMode): CaptureStrategy;