Function parse_native_tool_carrier
pub fn parse_native_tool_carrier(content: &str) -> Option<CarrierParts>Expand description
Parse a native (role = "tool") carrier envelope.
Returns None when the content is not a JSON object with a string
content field — those are raw-text tool results with no fixed position
and are treated as legacy by callers. A present attachments key that is
not an array is not a declaration: this runtime always writes an array,
so a non-array value can only be a malformed envelope, and the
conservative reading is legacy — zero attachments, untrusted body —
agreeing with native_attachments. Array items that do not
deserialize are skipped rather than failing the whole carrier.