fn leaf_terminal_state(success: bool, cancelled: bool) -> u32Expand description
Map a completed leaf call to its RTDL state. Cancellation wins over the provider result: a command terminated by cancel_plan normally returns success=false, but that is an expected CANCELED outcome, not a FAILED tool.