toJson method
Wire form with stable key order (zap first — the envelope reads
top-down).
Implementation
@override
Map<String, Object?> toJson() => <String, Object?>{
'zap': zapProtocolVersion,
'type': type,
'id': id,
'ts': ts,
'missionId': missionId,
'stepId': stepId,
'phase': phase,
'command': command,
'exit': exit,
'digest': digest,
'at': at,
if (durationMs != null) 'durationMs': durationMs,
if (output != null) 'output': output,
};