ai-agent 0.88.0

Idiomatic agent sdk inspired by the claude code source leak
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde_json::Value;

pub fn normalize_control_message_keys(obj: &mut Value) {
    if let Value::Object(map) = obj {
        if let Some(request_id) = map.remove("requestId") {
            if !map.contains_key("request_id") {
                map.insert("request_id".to_string(), request_id);
            }
        }
        if let Some(response) = map.get_mut("response") {
            normalize_control_message_keys(response);
        }
    }
}