agent-procs 0.6.3

Concurrent process runner for AI agents
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::protocol::{Request, Response};

pub async fn execute(session: &str, target: &str) -> i32 {
    let req = Request::Restart {
        target: target.into(),
    };
    crate::cli::request_and_handle(session, &req, false, |resp| match resp {
        Response::RunOk { name, id, pid, .. } => {
            println!("restarted {} (id: {}, pid: {})", name, id, pid);
            Some(0)
        }
        _ => None,
    })
    .await
}