Skip to content

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

feat(profiles): add host profile support

Steven Enamakel553cba68e123
diff --git a/crates/openhuman-core/src/profiles/host.rs b/crates/openhuman-core/src/profiles/host.rs
index e24f80b1bb..8989401409 100644
--- a/crates/openhuman-core/src/profiles/host.rs
+++ b/crates/openhuman-core/src/profiles/host.rs
@@ -538,6 +538,11 @@ impl ProfileHost {
.collect()
}
+ /// The current grant of `id`, when it is open here.
+ pub(crate) fn grant_of(&self, id: &ProfileId) -> Option<LeaseGrant> {
+ self.lock().get(id).map(|slot| slot.grant.clone())
+ }
+
/// Replace `id`'s grant `old` with `renewed`, unless the slot moved on
/// (closed, or re-opened under a newer grant) meanwhile.
pub(crate) fn store_grant(&self, id: &ProfileId, old: &LeaseGrant, renewed: LeaseGrant) {