pub fn attach_extensions(
task: &mut Value,
extensions: &Extensions,
) -> Result<(), HostError>Expand description
Serialize the filtered extensions and attach them to task.
extensions is the capability-filtered view the executor produced for this
plugin, so slot visibility is already correct — an absent slot means the
plugin’s capabilities excluded it, and it stays absent on the wire.
raw_credentials is excluded outright. Its token fields are #[serde(skip)]
so they would serialize empty anyway, but sending a hollow slot invites a
plugin to read it as “no credential present” rather than “not on this
channel”. Omitting it says the latter unambiguously.
Attaching nothing is valid: extensions with no visible slots produce no
field, and the worker passes None to execute_plugin exactly as today.