toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'cron': cron,
'prompt': prompt,
'createdAt': createdAt,
if (lastFiredAt != null) 'lastFiredAt': lastFiredAt,
if (recurring) 'recurring': true,
if (permanent) 'permanent': true,
// durable and agentId are runtime-only, not persisted.
};