import { InspectionExecutionResult } from '../inspector/inspector.types';
import { InspectionTaskEntity } from '../tasks/inspection-task.entity';

export type InspectionExecutorName = 'browser' | 'agent-s';

export interface RoutedExecutionResult extends InspectionExecutionResult {
  routePolicy: 'browser-first' | 'browser-only' | 'agent-only';
}

export interface InspectionExecutor {
  readonly name: InspectionExecutorName;
  executeTask(
    task: Pick<
      InspectionTaskEntity,
      | 'id'
      | 'name'
      | 'siteUrl'
      | 'stepsJson'
      | 'preferredExecutor'
      | 'allowAgentFallback'
    >,
    traceId: string,
  ): Promise<InspectionExecutionResult>;
}
