(&self)
| 460 | } |
| 461 | |
| 462 | pub fn list_agents(&self) -> anyhow::Result<Vec<AgentInfo>> { |
| 463 | let url = format!("{}/agent", self.base_url); |
| 464 | |
| 465 | let response = self.client.get(&url).send()?; |
| 466 | |
| 467 | if !response.status().is_success() { |
| 468 | let status = response.status(); |
| 469 | let text = response.text().unwrap_or_default(); |
| 470 | anyhow::bail!("Failed to list agents: {} - {}", status, text); |
| 471 | } |
| 472 | |
| 473 | let agents: Vec<AgentInfo> = response.json()?; |
| 474 | Ok(agents) |
| 475 | } |
| 476 | |
| 477 | pub fn list_skills(&self) -> anyhow::Result<Vec<String>> { |
| 478 | let url = format!("{}/skill", self.base_url); |
no test coverage detected