fn task_to_json(task: &Task) -> Value
Readable JSON for one task (the tool-output shape the LLM sees). Absent optional fields are omitted rather than sent as null.