Serializes the run result into a persistence-friendly map.
Map<String, dynamic> toMap() => { 'run': run.toMap(), 'output': output, };