The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(profiles): rename user_agents module to profiles
Steven Enamakele6ab49a5d9fe
diff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rsindex 3c400bee05..9f1e197e0c 100644--- a/crates/openhuman-core/src/core/all.rs+++ b/crates/openhuman-core/src/core/all.rs@@ -87,14 +87,14 @@ fn group_allowed(group: DomainGroup) -> bool {}/// Whether `g` is live in the ambient scope: its family is enabled and, for a-/// SaaS user, the method is on the user surface (`user_agents::surface`).+/// SaaS user, the method is on the user surface (`profiles::surface`).fn visible(g: &GroupedController) -> bool {group_allowed(g.group) && on_surface(g)}fn on_surface(g: &GroupedController) -> bool {let operator = g.group == DomainGroup::Operator;- crate::user_agents::surface::method_visible(&g.controller.rpc_method_name(), operator)+ crate::profiles::surface::method_visible(&g.controller.rpc_method_name(), operator)}/// The global static registry of all controllers, initialized once on first access.@@ -730,11 +730,11 @@ fn build_registered_controllers() -> Vec<GroupedController> {DomainGroup::Agent,crate::agent::orchestration::all_subagent_control_registered_controllers(),);- // SaaS operator plane: provision and inspect user agents.+ // SaaS operator plane: provision and inspect user profiles.push(&mut controllers,DomainGroup::Operator,- crate::user_agents::all_user_agents_registered_controllers(),+ crate::profiles::all_profiles_registered_controllers(),);controllers}@@ -818,7 +818,7 @@ pub fn namespace_description(namespace: &str) -> Option<&'static str> {"agent" => Some("Per-thread agent run-mode control (Plan vs Build)."),"ai" => Some("Agent-generated artifact storage, retrieval, and lifecycle management."),"app_state" => Some("Expose core-owned app shell state for frontend polling."),- "user_agents" => Some("SaaS operator plane: provision and inspect the agent serving each user."),+ "profiles" => Some("SaaS operator plane: provision and inspect the profile serving each user."),"auth" => Some("Manage app session and provider credentials."),"agent_experience" => Some("Local procedural experience capture and retrieval for agents."),"channels" => Some("Channel definitions, connections, and lifecycle management."),diff --git a/crates/openhuman-core/src/core/domain_group.rs b/crates/openhuman-core/src/core/domain_group.rsindex 00a66741fb..bde765f420 100644--- a/crates/openhuman-core/src/core/domain_group.rs+++ b/crates/openhuman-core/src/core/domain_group.rs@@ -88,8 +88,8 @@ pub enum DomainGroup {Modules,// Everything not in a named family — always on in `full()`, off otherwise.Platform,- /// The SaaS operator plane: provisioning and inspecting user agents- /// (`user_agents/`). On only under `DomainSet::saas()`.+ /// The SaaS operator plane: provisioning and inspecting user profiles+ /// (`profiles/`). On only under `DomainSet::saas()`.Operator,}diff --git a/crates/openhuman-core/src/core/runtime/boot_guard.rs b/crates/openhuman-core/src/core/runtime/boot_guard.rsindex 589a83dd84..a9cb77c123 100644--- a/crates/openhuman-core/src/core/runtime/boot_guard.rs+++ b/crates/openhuman-core/src/core/runtime/boot_guard.rs@@ -241,7 +241,7 @@ pub fn check(inputs: &BootInputs<'_>) -> Result<(), BootGuardError> {}}- let unknown = crate::user_agents::tools::unknown_entries(&inputs.config.tool_allowlist);+ let unknown = crate::profiles::tools::unknown_entries(&inputs.config.tool_allowlist);if !unknown.is_empty() {violations.push(Violation::ToolAllowlist(unknown));}@@ -285,7 +285,7 @@ fn sandbox_problems(inputs: &BootInputs<'_>) -> Vec<String> {if !inputs.sandbox_available {problems.push("host_shell is allowlisted but Docker is not available".to_string());}- if crate::user_agents::tools::is_host_network(&sandbox.network) {+ if crate::profiles::tools::is_host_network(&sandbox.network) {problems.push("network `host` defeats the sandbox".to_string());}if sandbox.image.trim().is_empty() {@@ -299,7 +299,7 @@ fn sandbox_problems(inputs: &BootInputs<'_>) -> Vec<String> {/// Whether `config` allowlists a group that needs the container sandbox.pub fn needs_sandbox(config: &SaasConfig) -> bool {- crate::user_agents::tools::parse_allowlist(&config.tool_allowlist)+ crate::profiles::tools::parse_allowlist(&config.tool_allowlist).iter().any(|group| group.needs_sandbox())}diff --git a/crates/openhuman-core/src/core/runtime/domain_set.rs b/crates/openhuman-core/src/core/runtime/domain_set.rsindex bb1a64888b..a8be6bac43 100644--- a/crates/openhuman-core/src/core/runtime/domain_set.rs+++ b/crates/openhuman-core/src/core/runtime/domain_set.rs@@ -65,7 +65,7 @@ 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+ /// The SaaS operator plane (`profiles.*`). Off in every preset but/// `DomainSet::saas()`, `full()` included: a single-user core has no/// users to provision.pub operator: bool,diff --git a/crates/openhuman-core/src/lib.rs b/crates/openhuman-core/src/lib.rsindex 29631b80c1..a80a182790 100644--- a/crates/openhuman-core/src/lib.rs+++ b/crates/openhuman-core/src/lib.rs@@ -74,6 +74,7 @@ pub mod memory;#[cfg(feature = "modules")]pub mod modules;pub mod platform;+pub mod profiles;pub mod runtime;pub mod sandbox;pub mod search;@@ -86,7 +87,6 @@ pub mod threads;#[cfg(feature = "tinymemes")]pub mod tinymemes;pub mod tools;-pub mod user_agents;pub mod util;pub mod voice;pub mod web3;diff --git a/crates/openhuman-core/src/memory/user_scope.rs b/crates/openhuman-core/src/memory/user_scope.rsindex c6644f9b88..7ea7cccefd 100644--- a/crates/openhuman-core/src/memory/user_scope.rs+++ b/crates/openhuman-core/src/memory/user_scope.rs@@ -1,7 +1,7 @@//! Confining a SaaS user's memory to the user's own tree.//!-//! Every SaaS user agent runs with `[memory] root = user:<agent>`-//! (`user_agents::layout::agent_config`). The lifecycle hooks already read and+//! Every SaaS profile runs with `[memory] root = user:<profile>`, on the+//! legacy layout (`profiles::layout::profile_config`). The lifecycle hooks already read and//! write below that root, but the memory operations — the `memory.*` RPCs and//! the agent's memory tools — pass the caller's filter or namespace straight//! to the engine. Users normally have engines of their own (each is bound todiff --git a/crates/openhuman-core/src/security/approval/gate_intercept.rs b/crates/openhuman-core/src/security/approval/gate_intercept.rsindex a4500bd213..9de37c44b7 100644--- a/crates/openhuman-core/src/security/approval/gate_intercept.rs+++ b/crates/openhuman-core/src/security/approval/gate_intercept.rs@@ -53,7 +53,7 @@ impl ApprovalGate {// SaaS has no per-user approval surface: never park, allow only what// the deployment's sandboxed tool groups open.if crate::core::runtime::is_saas() {- let outcome = match crate::user_agents::tools::gate_verdict(tool_name) {+ let outcome = match crate::profiles::tools::gate_verdict(tool_name) {Ok(()) => GateOutcome::Allow,Err(why) => GateOutcome::Deny {reason: format!("{POLICY_DENIED_MARKER} {why}"),diff --git a/crates/openhuman-core/src/security/credentials/bus.rs b/crates/openhuman-core/src/security/credentials/bus.rsindex 2c93dc48e7..3ce17baba4 100644--- a/crates/openhuman-core/src/security/credentials/bus.rs+++ b/crates/openhuman-core/src/security/credentials/bus.rs@@ -60,7 +60,7 @@ impl EventHandler<DomainEvent> for SessionExpiredSubscriber {};// SaaS: the credential belongs to one user and the gateway owns its- // refresh (`user_agents.set_credential`). Nothing process-wide is torn+ // refresh (`profiles.set_credential`). Nothing process-wide is torn// down; the failing call already reports the 401 to that user.if crate::core::runtime::is_saas() {tracing::warn!(diff --git a/crates/openhuman-core/src/security/credentials/ops/credential.rs b/crates/openhuman-core/src/security/credentials/ops/credential.rsindex b5906e5b47..a6f42dc589 100644--- a/crates/openhuman-core/src/security/credentials/ops/credential.rs+++ b/crates/openhuman-core/src/security/credentials/ops/credential.rs@@ -546,7 +546,7 @@ pub async fn clear_session(config: &Config) -> Result<Outcome<Value>, String> {/// A process-wide credential is a single-user concept: installing one/// activates a user directory and rebinds process globals. A SaaS process-/// keeps one credential per user agent instead (`user_agents.set_credential`).+/// keeps one credential per profile instead (`profiles.set_credential`).fn refuse_process_credential_in_saas(operation: &str) -> Result<(), String> {process_credential_refusal(crate::core::runtime::is_saas(), operation)}@@ -560,7 +560,7 @@ pub(crate) fn process_credential_refusal(saas: bool, operation: &str) -> Result<);return Err(format!("{operation} is not available in SaaS mode; the gateway installs each user's \- credential through user_agents.set_credential"+ credential through profiles.set_credential"));}Ok(())diff --git a/crates/openhuman-core/src/security/credentials/ops/credential_tests.rs b/crates/openhuman-core/src/security/credentials/ops/credential_tests.rsindex 2a4adbeef2..23c823b2c3 100644--- a/crates/openhuman-core/src/security/credentials/ops/credential_tests.rs+++ b/crates/openhuman-core/src/security/credentials/ops/credential_tests.rs@@ -4,5 +4,5 @@ use super::*;fn process_wide_credentials_are_single_user_only() {assert!(process_credential_refusal(false, "set_credential").is_ok());let err = process_credential_refusal(true, "set_credential").unwrap_err();- assert!(err.contains("user_agents.set_credential"), "{err}");+ assert!(err.contains("profiles.set_credential"), "{err}");}diff --git a/crates/openhuman-core/src/threads/schemas/handlers.rs b/crates/openhuman-core/src/threads/schemas/handlers.rsindex 2ccf00e8fe..1b0c388a59 100644--- a/crates/openhuman-core/src/threads/schemas/handlers.rs+++ b/crates/openhuman-core/src/threads/schemas/handlers.rs@@ -26,9 +26,9 @@ pub(super) fn handle_upsert(params: Map<String, Value>) -> ControllerFuture {let p = parse::<UpsertConversationThreadRequest>(params)?;// A SaaS user picks thread ids for their own threads only; reserved// prefixes and path-like ids are refused (no-op outside SaaS).- crate::user_agents::surface::check_thread_id(&p.id)?;+ crate::profiles::surface::check_thread_id(&p.id)?;if let Some(parent) = p.parent_thread_id.as_deref() {- crate::user_agents::surface::check_thread_id(parent)?;+ crate::profiles::surface::check_thread_id(parent)?;}to_json(ops::thread_upsert(p).await?)})@@ -39,7 +39,7 @@ pub(super) fn handle_create_new(params: Map<String, Value>) -> ControllerFuturelet p = parse::<CreateConversationThreadRequest>(params)?;// A SaaS user acts only in their own sandbox; a caller-chosen working// folder would point the thread at the host.- crate::user_agents::surface::check_working_dir(p.action_dir.as_deref())?;+ crate::profiles::surface::check_working_dir(p.action_dir.as_deref())?;to_json(ops::thread_create_new(p).await?)})}diff --git a/crates/openhuman-core/src/tools/impl/system/shell.rs b/crates/openhuman-core/src/tools/impl/system/shell.rsindex f3e42c92ce..162084ddb5 100644--- a/crates/openhuman-core/src/tools/impl/system/shell.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell.rs@@ -366,7 +366,7 @@ impl ShellTool {// agent's sandbox mode says, and never on the host.if crate::core::runtime::is_saas() {let action_dir = self.effective_action_dir_for_context(context);- return match crate::user_agents::tools::sandbox_policy(+ return match crate::profiles::tools::sandbox_policy(&action_dir,&self.security.workspace_dir,) {diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rsindex c9fd28c65f..109a24cde1 100644--- a/crates/openhuman-core/src/tools/ops.rs+++ b/crates/openhuman-core/src/tools/ops.rs@@ -921,14 +921,14 @@ pub fn all_tools_with_runtime(// ambient CoreContext; no context, or `DomainSet::full()`, keeps every// tool. Under `harness()` only the memory + threads families survive// (see `tool_group` and its Platform-default caveat). In SaaS,- // `user_agents::tools::admits` also applies the operator's host groups.+ // `profiles::tools::admits` also applies the operator's host groups.let before = tools.len();let domains = crate::core::runtime::context::CoreContext::current().map(|c| c.domains());let mut tools: Vec<Box<dyn Tool>> = if let Some(set) = domains {tools.into_iter().filter(|t| {- crate::user_agents::tools::admits(t.name(), set.allows(tool_group(t.name())))+ crate::profiles::tools::admits(t.name(), set.allows(tool_group(t.name())))}).collect()} else {diff --git a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs b/crates/openhuman-core/src/web_chat/ops/channel_ops.rsindex c2fc900dd7..003afaf8d9 100644--- a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs+++ b/crates/openhuman-core/src/web_chat/ops/channel_ops.rs@@ -208,7 +208,7 @@ pub async fn channel_web_chat() -> Result<Outcome<Value>, String> {// A SaaS user chooses the thread id; the same rules as `threads_upsert`// apply (no reserved prefixes, no path-like ids). No-op outside SaaS.- crate::user_agents::surface::check_thread_id(thread_id.trim())?;+ crate::profiles::surface::check_thread_id(thread_id.trim())?;// Mirrors the socket `chat:start` payload's `run_mode` handling// (`openhuman_rpc::server::socketio`): apply it before starting the turn so// `plan_mode_middleware` sees the requested mode from the first tooldiff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rsindex e920b2d729..4ea9a5012d 100644--- a/crates/openhuman-embed/src/host_internals.rs+++ b/crates/openhuman-embed/src/host_internals.rs@@ -11,7 +11,7 @@pub use openhuman_core::{agent, backend, channels, config, core, desktop, inference, integrations, mcp, platform,- security, storage, tools, user_agents, util, voice, web3, web_chat,+ profiles, security, storage, tools, util, voice, web3, web_chat,};pub use openhuman_core::run_core_from_args;diff --git a/crates/openhuman-rpc/src/server/saas_gateway.rs b/crates/openhuman-rpc/src/server/saas_gateway.rsindex 0397e670e5..2c1b39bccd 100644--- a/crates/openhuman-rpc/src/server/saas_gateway.rs+++ b/crates/openhuman-rpc/src/server/saas_gateway.rs@@ -13,13 +13,13 @@//! caller learns nothing about which users exist and cannot open agents —//! then the signature, then runs the request under that user's agent.//!-//! The decision itself lives in `crate::core_host::user_agents::gateway`.+//! The decision itself lives in `crate::core_host::profiles::gateway`.use std::sync::Arc;use std::time::{SystemTime, UNIX_EPOCH};use crate::core_host::core::runtime::CoreContext;-use crate::core_host::user_agents::gateway::{+use crate::core_host::profiles::gateway::{resolve_scope, GatewayScope, USER_HEADER, USER_SIG_HEADER,};use axum::extract::Request;