Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(tinyflows): nest caps host announcement guard

Steven Enamakel1a60c30ee750
diff --git a/crates/openhuman-core/src/modules/tinyflows.rs b/crates/openhuman-core/src/modules/tinyflows.rs
index 50c20de3fb..1e6bfb7338 100644
--- a/crates/openhuman-core/src/modules/tinyflows.rs
+++ b/crates/openhuman-core/src/modules/tinyflows.rs
@@ -285,12 +285,13 @@ mod imp {
.serve_at(object_path.clone(), object)
.await
.map_err(|error| error.to_string())?;
- if announces_caps_host
- && let Err(error) =
+ if announces_caps_host {
+ if let Err(error) =
super::caps_manifest::announce_caps_host_v2(&connection).await
- {
- let _ = connection.unserve(&object_path).await;
- return Err(error);
+ {
+ let _ = connection.unserve(&object_path).await;
+ return Err(error);
+ }
}
Ok(ServedObjectRegistration(path))
})