Skip to content

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

feat(runtime): add operator domain group to DomainSet

Steven Enamakel752aacc228e9
diff --git a/crates/openhuman-core/src/core/runtime/domain_set.rs b/crates/openhuman-core/src/core/runtime/domain_set.rs
index c39d8ffab6..bb1a64888b 100644
--- a/crates/openhuman-core/src/core/runtime/domain_set.rs
+++ b/crates/openhuman-core/src/core/runtime/domain_set.rs
@@ -65,6 +65,10 @@ pub struct DomainSet {
pub modules: bool,
/// Everything not in a named family — always on in `full()`.
pub platform: bool,
+ /// The SaaS operator plane (`user_agents.*`). Off in every preset but
+ /// `DomainSet::saas()`, `full()` included: a single-user core has no
+ /// users to provision.
+ pub operator: bool,
}
impl DomainSet {
@@ -92,6 +96,7 @@ impl DomainSet {
hosted: true,
modules: true,
platform: true,
+ operator: false,
}
}
@@ -120,6 +125,7 @@ impl DomainSet {
hosted: false,
modules: false,
platform: false,
+ operator: false,
}
}
@@ -165,6 +171,7 @@ impl DomainSet {
hosted: false,
modules: false,
platform: true,
+ operator: false,
}
}
@@ -199,6 +206,7 @@ impl DomainSet {
hosted: false,
modules: false,
platform: false,
+ operator: false,
}
}
@@ -225,6 +233,7 @@ impl DomainSet {
hosted: false,
modules: false,
platform: false,
+ operator: false,
}
}
@@ -251,6 +260,7 @@ impl DomainSet {
DomainGroup::Hosted => self.hosted,
DomainGroup::Modules => self.modules,
DomainGroup::Platform => self.platform,
+ DomainGroup::Operator => self.operator,
}
}
@@ -285,6 +295,7 @@ impl DomainSet {
hosted: self.hosted && other.hosted,
modules: self.modules && other.modules,
platform: self.platform && other.platform,
+ operator: self.operator && other.operator,
}
}
}
diff --git a/crates/openhuman-core/src/core/runtime/saas.rs b/crates/openhuman-core/src/core/runtime/saas.rs
index 4dddef668d..5c258ed206 100644
--- a/crates/openhuman-core/src/core/runtime/saas.rs
+++ b/crates/openhuman-core/src/core/runtime/saas.rs
@@ -128,10 +128,13 @@ impl ServiceSet {
}
impl DomainSet {
- /// The domain families a SaaS core serves. None yet: each family opens as
- /// its per-user isolation lands.
+ /// The domain families a SaaS core serves: the operator plane. No user
+ /// family yet; each opens as its per-user isolation lands.
pub fn saas() -> Self {
- Self::none()
+ Self {
+ operator: true,
+ ..Self::none()
+ }
}
}
diff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjs
index d960951a26..55599ee7f2 100644
--- a/scripts/ci/check-openhuman-rust-layout.mjs
+++ b/scripts/ci/check-openhuman-rust-layout.mjs
@@ -52,7 +52,7 @@ const LEGACY_LIMIT_ENTRIES = [
// their current sizes while follow-up work separates their test concerns.
// `core/` was pruned from the line limit by name until these pins; its
// oversized files are pinned at the size they had when enforcement began.
- ["crates/openhuman-core/src/core/all.rs", 1492],
+ ["crates/openhuman-core/src/core/all.rs", 1340],
["crates/openhuman-core/src/core/all_tests.rs", 1632],
["crates/openhuman-core/src/core/events.rs", 1808],
["crates/openhuman-core/src/core/events_tests.rs", 1003],