Re-runs `install()` + `post_install()` for each tracked agent id, returning only the ids that resolve to a real integration paired with their install result. An id that does NOT resolve to an integration (a later release renamed or removed it, or a typo landed in `installed_agents`) is SKIPPED, not failed: it is logged as a warning and left out of the returned results entirely. Gating version-mar
(
agent_ids: &[String],
home: &Path,
tracedecay_bin: &str,
)
| 455 | /// genuine `install()` failures are reported as `Err` so they still gate |
| 456 | /// markers. |
| 457 | pub(crate) async fn reinstall_agent_integrations( |
| 458 | agent_ids: &[String], |
| 459 | home: &Path, |
| 460 | tracedecay_bin: &str, |
| 461 | ) -> Vec<(String, tracedecay::errors::Result<()>)> { |
| 462 | let project_path = std::env::current_dir().ok(); |
| 463 | let mut results = Vec::new(); |
| 464 | for id in agent_ids { |
| 465 | let ag = match tracedecay::agents::get_integration(id) { |
| 466 | Ok(ag) => ag, |
| 467 | Err(_) => { |
| 468 | eprintln!( |
| 469 | " \x1b[33mwarning:\x1b[0m skipping unknown tracked agent id \"{id}\" \ |
| 470 | (no such integration); it will not gate the version-marker refresh." |
| 471 | ); |
| 472 | continue; |
| 473 | } |
| 474 | }; |
| 475 | let ctx = tracedecay::agents::InstallContext { |
| 476 | home: home.to_path_buf(), |
| 477 | tracedecay_bin: tracedecay_bin.to_string(), |
| 478 | tool_permissions: tracedecay::agents::expected_tool_perms(), |
| 479 | profile: None, |
| 480 | project_root: None, |
| 481 | dashboard: true, |
| 482 | }; |
| 483 | let result = match ag.install(&ctx) { |
| 484 | Ok(()) => { |
| 485 | ag.post_install(project_path.as_deref()).await; |
| 486 | Ok(()) |
| 487 | } |
| 488 | Err(e) => Err(e), |
| 489 | }; |
| 490 | results.push((id.clone(), result)); |
| 491 | } |
| 492 | results |
| 493 | } |
| 494 | |
| 495 | pub(crate) async fn handle_uninstall_command( |
| 496 | agent: Option<String>, |
no test coverage detected