export interface StrokePoint {
  x: number
  y: number
  pressure: number
  timestamp: number
}

export type Stroke = StrokePoint[]

export interface RecognitionCandidate {
  letter: string
  confidence: number
}

export interface EngineResult {
  engine: 'onnx' | 'tesseract' | 'stroke'
  candidates: RecognitionCandidate[]
}

export interface EnsembleResult {
  candidates: RecognitionCandidate[]
  decision: 'auto-fill' | 'disambiguate' | 'redraw'
}

export interface RecognitionEngine {
  name: string
  init(): Promise<void>
  recognize(strokes: Stroke[]): Promise<RecognitionCandidate[]>
  isReady(): boolean
}
