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
chore(profiles): remove unused profile modules
Steven Enamakelca2a35a25a36
diff --git a/crates/openhuman-core/src/profiles/background.rs b/crates/openhuman-core/src/profiles/background.rsindex 2420e4eb5f..180bd13a29 100644--- a/crates/openhuman-core/src/profiles/background.rs+++ b/crates/openhuman-core/src/profiles/background.rs@@ -4,12 +4,12 @@//! gated by the process-wide scheduler gate. Neither fits SaaS: the cron//! service is off, and the gate reflects the operator (who holds no//! credential) rather than any user. Instead, one loop per process visits the-//! provisioned agents:+//! provisioned profiles://!-//! - it closes agents that have sat idle past `idle_evict_secs`;-//! - for each agent whose workspace has queued memory jobs (deferred ingests,-//! belief builds), it opens the agent and runs the due jobs **under that-//! agent's context**, so the jobs read that user's config, credential and+//! - it closes profiles that have sat idle past `idle_evict_secs`;+//! - for each profile whose workspace has queued memory jobs (deferred ingests,+//! belief builds), it opens the profile and runs the due jobs **under that+//! profile's context**, so the jobs read that user's config, credential and//! memory root and nobody else's.//!//! Users run one after another, and the memory job queue serialises them@@ -23,15 +23,15 @@ use super::host::ProfileHost;use crate::core::runtime::CoreContext;use crate::memory::lifecycle::jobs::{self, Selection};-/// How often the loop visits the agents.+/// How often the loop visits the profiles.pub const TICK_INTERVAL: Duration = Duration::from_secs(60);/// What one visit did.#[derive(Debug, Default, Clone, PartialEq, Eq)]pub struct TickReport {- /// Agents with queued memory jobs that were run.+ /// Profiles with queued memory jobs that were run.pub ran: usize,- /// Agents whose jobs could not be run (not openable, engine off, …).+ /// Profiles whose jobs could not be run (not openable, engine off, …).pub skipped: usize,}@@ -58,18 +58,18 @@ pub fn spawn(host: Arc<ProfileHost>) -> tokio::task::JoinHandle<()> {})}-/// One visit to every provisioned agent.+/// One visit to every provisioned profile.pub async fn tick(host: &ProfileHost) -> TickReport {host.evict_idle();let mut report = TickReport::default();- let agents = match host.list() {- Ok(agents) => agents,+ let profiles = match host.list() {+ Ok(profiles) => profiles,Err(error) => {- log::warn!("[profiles][background] listing agents failed: {error}");+ log::warn!("[profiles][background] listing profiles failed: {error}");return report;}};- for summary in agents {+ for summary in profiles {let id = summary.profile_id;if !jobs::has_pending(&host.layout_of(&id).workspace_dir) {continue;@@ -77,7 +77,7 @@ pub async fn tick(host: &ProfileHost) -> TickReport {let state = match host.open(&id) {Ok(state) => state,Err(error) => {- log::debug!("[profiles][background] agent={id} not opened: {error}");+ log::debug!("[profiles][background] profile={id} not opened: {error}");report.skipped += 1;continue;}@@ -90,13 +90,13 @@ pub async fn tick(host: &ProfileHost) -> TickReport {match result {Ok(runs) => {log::debug!(- "[profiles][background] agent={id} ran {} memory job(s)",+ "[profiles][background] profile={id} ran {} memory job(s)",runs.len());report.ran += 1;}Err(error) => {- log::debug!("[profiles][background] agent={id} memory jobs not run: {error}");+ log::debug!("[profiles][background] profile={id} memory jobs not run: {error}");report.skipped += 1;}}diff --git a/crates/openhuman-core/src/profiles/credentials.rs b/crates/openhuman-core/src/profiles/credentials.rsindex 8fb0f61770..014dca90d9 100644--- a/crates/openhuman-core/src/profiles/credentials.rs+++ b/crates/openhuman-core/src/profiles/credentials.rs@@ -2,9 +2,9 @@//!//! The gateway hands the core each user's TinyHumans credential — a session//! JWT or an API key — through the operator plane. It is stored where every-//! backend caller already looks: the auth-profile store beside the agent's-//! `config_path` (`<root>/users/<id>/`). Work running under that agent's-//! context loads the agent's config, so `resolve_backend_credential` finds+//! backend caller already looks: the auth-profile store beside the profile's+//! `config_path` (`<root>/users/<id>/`). Work running under that profile's+//! context loads the profile's config, so `resolve_backend_credential` finds//! that user's credential and no other.//!//! Unlike `auth.set_credential`, this changes nothing process-wide: no@@ -34,7 +34,7 @@ pub enum UserCredentialKind {ApiKey,}-/// Store `token` as agent `config`'s credential of `kind`, replacing any+/// Store `token` as profile `config`'s credential of `kind`, replacing any/// credential of the other kind.////// `expires_at` (RFC 3339) lets the core reject an expired session locally@@ -74,7 +74,7 @@ pub fn store(}// Then drop the other kind, which would otherwise keep winning (an API// key is resolved before a session). The new credential is written first,- // so a failure here never leaves the agent with none; it is reported so+ // so a failure here never leaves the profile with none; it is reported so// the gateway can retry.let replaced = match kind {UserCredentialKind::Session => remove_provider(config, api_key::API_KEY_PROVIDER),@@ -97,7 +97,7 @@ pub fn store(Ok(())}-/// Remove every credential agent `config` holds, under any profile name.+/// Remove every credential profile `config` holds, under any profile name./// Returns whether there was one.pub fn clear(config: &Config) -> Result<bool, String> {let _serial = replacing();@@ -107,7 +107,7 @@ pub fn clear(config: &Config) -> Result<bool, String> {}/// Serialises credential changes, so two replacements of different kinds-/// cannot interleave their write and their removal and leave the agent with+/// cannot interleave their write and their removal and leave the profile with/// neither. Operator credential changes are rare; one process-wide lock is/// enough.fn replacing() -> std::sync::MutexGuard<'static, ()> {@@ -116,7 +116,7 @@ fn replacing() -> std::sync::MutexGuard<'static, ()> {.unwrap_or_else(std::sync::PoisonError::into_inner)}-/// Remove every profile of `provider` in agent `config`'s store, not just the+/// Remove every profile of `provider` in profile `config`'s store, not just the/// default one: the resolver would pick up any active profile left behind.fn remove_provider(config: &Config, provider: &str) -> Result<bool, String> {let auth = AuthService::from_config(config);@@ -143,7 +143,7 @@ fn remove_provider(config: &Config, provider: &str) -> Result<bool, String> {Ok(removed)}-/// Whether agent `config` holds a credential.+/// Whether profile `config` holds a credential.pub fn has(config: &Config) -> bool {has_backend_credential(config)}diff --git a/crates/openhuman-core/src/profiles/gateway.rs b/crates/openhuman-core/src/profiles/gateway.rsindex bb36159356..d6fc431093 100644--- a/crates/openhuman-core/src/profiles/gateway.rs+++ b/crates/openhuman-core/src/profiles/gateway.rs@@ -10,7 +10,7 @@//! ```//!//! No user header means the operator plane. With one, the request runs under-//! that user's agent — which must already be provisioned — and nothing else.+//! that user's profile — which must already be provisioned — and nothing else.//! The signature, required unless the operator turns it off, binds the user id//! to the bearer holder and a ±60 s window: a gateway that forwards a client's//! headers by mistake cannot be talked into acting as another user.@@ -91,7 +91,7 @@ impl GatewayRefusal {pub enum GatewayScope {/// No user header: the operator plane.Operator,- /// One user's agent.+ /// One user's profile.User(Arc<Profile>),}@@ -108,18 +108,18 @@ pub fn resolve_scope(return Ok(GatewayScope::Operator);};let host = host::host().ok_or_else(|| GatewayRefusal::new(503, "this core serves no users"))?;- let agent = ProfileId::for_user(user_id, host.saas().profile_ids).map_err(|e| GatewayRefusal::new(400, e))?;+ let profile = ProfileId::for_user(user_id, host.saas().profile_ids).map_err(|e| GatewayRefusal::new(400, e))?;if host.saas().require_user_signature {let signature = signature.ok_or_else(|| GatewayRefusal::new(401, format!("missing {USER_SIG_HEADER}")))?;verify(secret, user_id, signature, now).map_err(|e| {- log::warn!("[profiles][gateway] refused agent={agent}: {e}");+ log::warn!("[profiles][gateway] refused profile={profile}: {e}");GatewayRefusal::new(401, e)})?;}- match host.open(&agent) {+ match host.open(&profile) {Ok(state) => {- log::debug!("[profiles][gateway] scoped request to agent={agent}");+ log::debug!("[profiles][gateway] scoped request to profile={profile}");Ok(GatewayScope::User(state))}Err(e) if e.contains("not provisioned") => Err(GatewayRefusal::new(403, e)),diff --git a/crates/openhuman-core/src/profiles/host.rs b/crates/openhuman-core/src/profiles/host.rsindex 38dc91b554..7ceb607468 100644--- a/crates/openhuman-core/src/profiles/host.rs+++ b/crates/openhuman-core/src/profiles/host.rs@@ -2,11 +2,11 @@//!//! A profile is opened lazily on first use and kept until it has been idle//! for [`SaasConfig::idle_evict_secs`] or the host needs its slot-//! ([`SaasConfig::max_profiles_open`]). An agent still in use — anyone holding+//! ([`SaasConfig::max_profiles_open`]). An profile still in use — anyone holding//! its [`Profile`] — is never evicted.//!-//! Each open agent carries its own [`CoreContext`], derived from the operator-//! context with the agent's forced config and `session_agent` set to its id.+//! Each open profile carries its own [`CoreContext`], derived from the operator+//! context with the profile's forced config and `session_agent` set to its id.//! Running work under that context is what makes the session store, the//! config loader and the web_chat session cache resolve that user's state.@@ -37,7 +37,7 @@ impl std::fmt::Debug for Profile {}impl Profile {- /// The context every piece of this agent's work runs under.+ /// The context every piece of this profile's work runs under.pub fn context(&self) -> &Arc<CoreContext> {&self.context}@@ -53,7 +53,7 @@ pub struct ProfileHost {saas: SaasConfig,operator: Arc<CoreContext>,open: Mutex<HashMap<ProfileId, Slot>>,- /// Agents whose leftovers from a previous process were already swept+ /// Profiles whose leftovers from a previous process were already swept/// (see [`recover_workspace`]). Kept across evictions: a re-open after an/// eviction must not mark a turn this process is still running as/// interrupted.@@ -95,7 +95,7 @@ impl ProfileHost {&self.saas}- /// Where agent `id`'s state lives, provisioned or not.+ /// Where profile `id`'s state lives, provisioned or not.pub fn layout_of(&self, id: &ProfileId) -> ProfileLayout {self.layout(id)}@@ -104,14 +104,14 @@ impl ProfileHost {ProfileLayout::new(&self.saas.root, id)}- /// Create agent `id`'s directories. Returns whether it was new.+ /// Create profile `id`'s directories. Returns whether it was new.pub fn provision(&self, id: &ProfileId) -> Result<bool, String> {- // Under the open-agent lock, like `deprovision`, so the two never- // interleave on one agent's directory.+ // Under the open-profile lock, like `deprovision`, so the two never+ // interleave on one profile's directory.let _guard = self.lock();let layout = self.layout(id);if layout.meta_path.exists() {- log::debug!("[profiles] provision agent={id}: already provisioned");+ log::debug!("[profiles] provision profile={id}: already provisioned");return Ok(false);}for dir in [&layout.workspace_dir, &layout.sandbox_dir] {@@ -122,25 +122,25 @@ impl ProfileHost {created_at: unix_now(),layout_version: LAYOUT_VERSION,};- let raw = toml::to_string(&meta).map_err(|e| format!("encoding agent meta: {e}"))?;+ let raw = toml::to_string(&meta).map_err(|e| format!("encoding profile meta: {e}"))?;std::fs::write(&layout.meta_path, raw).map_err(|e| format!("writing {}: {e}", layout.meta_path.display()))?;- log::info!("[profiles] provisioned agent={id}");+ log::info!("[profiles] provisioned profile={id}");Ok(true)}- /// Close agent `id` and archive its state under `<root>/deprovisioned/`.- /// Nothing is deleted. Returns whether there was such an agent.+ /// Close profile `id` and archive its state under `<root>/deprovisioned/`.+ /// Nothing is deleted. Returns whether there was such an profile.///- /// The open-agent lock is held for the whole operation, so no `open` can- /// re-open the agent between closing it and moving its directory. An- /// agent still in use (a request holds its state) is not archived from+ /// The open-profile lock is held for the whole operation, so no `open` can+ /// re-open the profile between closing it and moving its directory. An+ /// profile still in use (a request holds its state) is not archived from/// under it: deprovisioning fails and can be retried.pub fn deprovision(&self, id: &ProfileId) -> Result<bool, String> {let mut open = self.lock();if let Some(slot) = open.get(id) {if Arc::strong_count(&slot.state) > 1 {- return Err(format!("agent {id} is in use; try again shortly"));+ return Err(format!("profile {id} is in use; try again shortly"));}}open.remove(id);@@ -148,11 +148,11 @@ impl ProfileHost {if !layout.dir.exists() {return Ok(false);}- // Credential secrets live in the process keyring under the agent id,- // not only in the agent's directory, so archiving the directory alone- // would let a re-provisioned agent pick the old credential back up.+ // Credential secrets live in the process keyring under the profile id,+ // not only in the profile's directory, so archiving the directory alone+ // would let a re-provisioned profile pick the old credential back up.if let Err(e) = super::credentials::clear(&layout::profile_config(&layout, id)) {- log::warn!("[profiles] clearing credentials of agent={id} before archiving: {e}");+ log::warn!("[profiles] clearing credentials of profile={id} before archiving: {e}");}let archive = layout::archive_dir(&self.saas.root);std::fs::create_dir_all(&archive)@@ -166,28 +166,28 @@ impl ProfileHost {std::fs::rename(&layout.dir, &dest).map_err(|e| format!("archiving {}: {e}", layout.dir.display()))?;drop(open);- log::info!("[profiles] deprovisioned agent={id} (archived)");+ log::info!("[profiles] deprovisioned profile={id} (archived)");Ok(true)}- /// The forced config of provisioned agent `id`, without opening it (and- /// so without taking an agent slot).+ /// The forced config of provisioned profile `id`, without opening it (and+ /// so without taking an profile slot).pub fn provisioned_config(&self, id: &ProfileId) -> Result<crate::config::Config, String> {let layout = self.layout(id);if !layout.meta_path.exists() {- return Err(format!("agent {id} is not provisioned"));+ return Err(format!("profile {id} is not provisioned"));}Ok(layout::profile_config(&layout, id))}- /// Agent `id`, opening it if it is provisioned and not open yet.+ /// Profile `id`, opening it if it is provisioned and not open yet.pub fn open(&self, id: &ProfileId) -> Result<Arc<Profile>, String> {let now = Instant::now();let mut open = self.lock();if let Some(slot) = open.get_mut(id) {slot.last_used = now;}- // Every open sweeps agents idle past `idle_evict_secs`, so they close+ // Every open sweeps profiles idle past `idle_evict_secs`, so they close// even when no new user arrives.self.sweep_idle_locked(&mut open, now);if let Some(slot) = open.get(id) {@@ -196,12 +196,12 @@ impl ProfileHost {let layout = self.layout(id);if !layout.meta_path.exists() {- return Err(format!("agent {id} is not provisioned"));+ return Err(format!("profile {id} is not provisioned"));}self.evict_locked(&mut open, now);if open.len() >= self.saas.max_profiles_open.max(1) {return Err(format!(- "all {} agent slots are in use; try again shortly",+ "all {} profile slots are in use; try again shortly",self.saas.max_profiles_open));}@@ -233,11 +233,11 @@ impl ProfileHost {last_used: now,},);- log::debug!("[profiles] opened agent={id} ({} open)", open.len());+ log::debug!("[profiles] opened profile={id} ({} open)", open.len());Ok(state)}- /// Agent `id` if it is open.+ /// Profile `id` if it is open.pub fn get(&self, id: &ProfileId) -> Option<Arc<Profile>> {self.lock().get(id).map(|slot| Arc::clone(&slot.state))}@@ -250,7 +250,7 @@ impl ProfileHost {self.lock().len()}- /// Every provisioned agent, open or not.+ /// Every provisioned profile, open or not.pub fn list(&self) -> Result<Vec<ProfileSummary>, String> {let dir = layout::users_dir(&self.saas.root);let entries = match std::fs::read_dir(&dir) {@@ -266,19 +266,19 @@ impl ProfileHost {let Ok(id) = ProfileId::parse(&name) else {continue;};- // One unreadable agent must not hide the rest (or stop the+ // One unreadable profile must not hide the rest (or stop the// background loop for everyone): log it and move on.match self.summary(&id) {Ok(Some(summary)) => found.push(summary),Ok(None) => {}- Err(error) => log::warn!("[profiles] skipping agent={id} in listing: {error}"),+ Err(error) => log::warn!("[profiles] skipping profile={id} in listing: {error}"),}}found.sort_by(|a, b| a.profile_id.cmp(&b.profile_id));Ok(found)}- /// Agent `id`, or `None` when it is not provisioned.+ /// Profile `id`, or `None` when it is not provisioned.pub fn summary(&self, id: &ProfileId) -> Result<Option<ProfileSummary>, String> {let layout = self.layout(id);let raw = match std::fs::read_to_string(&layout.meta_path) {@@ -296,20 +296,20 @@ impl ProfileHost {}))}- /// Close agents idle past the configured limit that nobody holds.+ /// Close profiles idle past the configured limit that nobody holds.pub fn evict_idle(&self) {let mut open = self.lock();self.evict_locked(&mut open, Instant::now());}- /// Close agents idle past `idle_evict_secs` that nothing is using.+ /// Close profiles idle past `idle_evict_secs` that nothing is using.fn sweep_idle_locked(&self, open: &mut HashMap<ProfileId, Slot>, now: Instant) {let idle_limit = Duration::from_secs(self.saas.idle_evict_secs);open.retain(|id, slot| {let keep = Arc::strong_count(&slot.state) > 1|| now.duration_since(slot.last_used) < idle_limit;if !keep {- log::debug!("[profiles] evicted idle agent={id}");+ log::debug!("[profiles] evicted idle profile={id}");}keep});@@ -327,7 +327,7 @@ impl ProfileHost {.map(|(id, _)| id.clone());if let Some(id) = victim {open.remove(&id);- log::debug!("[profiles] evicted least recently used agent={id}");+ log::debug!("[profiles] evicted least recently used profile={id}");}}}@@ -337,10 +337,10 @@ impl ProfileHost {}}-/// Settle what a previous process left in agent `id`'s workspace: turns that+/// Settle what a previous process left in profile `id`'s workspace: turns that/// were mid-flight become interrupted and run-ledger rows left running are-/// closed. The sweep a single-user core runs at boot, run per agent on its-/// first open in this process. Failures are logged; the agent still opens.+/// closed. The sweep a single-user core runs at boot, run per profile on its+/// first open in this process. Failures are logged; the profile still opens.pub(crate) fn recover_workspace(id: &ProfileId, workspace_dir: &std::path::Path) {let now = chrono::Utc::now().to_rfc3339();match tinyagents_session::turn_state::store::mark_all_interrupted(@@ -348,35 +348,35 @@ pub(crate) fn recover_workspace(id: &ProfileId, workspace_dir: &std::path::Path)&now,) {Ok(0) => {}- Ok(turns) => log::info!("[profiles] agent={id} recovered {turns} interrupted turn(s)"),- Err(error) => log::warn!("[profiles] agent={id} turn recovery failed: {error}"),+ Ok(turns) => log::info!("[profiles] profile={id} recovered {turns} interrupted turn(s)"),+ Err(error) => log::warn!("[profiles] profile={id} turn recovery failed: {error}"),}match tinyagents_session::run_ledger::interrupt_orphaned_agent_runs(workspace_dir) {Ok(0) => {}- Ok(runs) => log::info!("[profiles] agent={id} settled {runs} orphaned run(s)"),- Err(error) => log::warn!("[profiles] agent={id} run recovery failed: {error:#}"),+ Ok(runs) => log::info!("[profiles] profile={id} settled {runs} orphaned run(s)"),+ Err(error) => log::warn!("[profiles] profile={id} run recovery failed: {error:#}"),}}static HOST: OnceLock<Arc<ProfileHost>> = OnceLock::new();-/// Install the process's agent host. A SaaS boot does this once; later calls+/// Install the process's profile host. A SaaS boot does this once; later calls/// are ignored.pub fn install(host: Arc<ProfileHost>) {if HOST.set(host).is_err() {- log::warn!("[profiles] agent host already installed; keeping the first");+ log::warn!("[profiles] profile host already installed; keeping the first");}}-/// The process's agent host, when this is a SaaS process.+/// The process's profile host, when this is a SaaS process.pub fn host() -> Option<Arc<ProfileHost>> {HOST.get().cloned()}/// The profile the current work runs for, if any.pub fn current() -> Option<Arc<Profile>> {- let agent = CoreContext::current()?.session_agent()?.to_owned();- let id = ProfileId::parse(&agent).ok()?;+ let profile = CoreContext::current()?.session_agent()?.to_owned();+ let id = ProfileId::parse(&profile).ok()?;host()?.get(&id)}diff --git a/crates/openhuman-core/src/profiles/ops.rs b/crates/openhuman-core/src/profiles/ops.rsindex 5e5b57ca78..06bc899e14 100644--- a/crates/openhuman-core/src/profiles/ops.rs+++ b/crates/openhuman-core/src/profiles/ops.rs@@ -1,6 +1,6 @@//! Operator-plane operations on profiles.//!-//! Gateway user ids are taken here and turned into agent ids at once; they+//! Gateway user ids are taken here and turned into profile ids at once; they//! are never logged, stored or returned.use super::credentials::{self, UserCredentialKind};@@ -14,7 +14,7 @@ fn require_host() -> Result<std::sync::Arc<ProfileHost>, String> {host::host().ok_or_else(|| "profiles exist only in SaaS mode".to_string())}-/// Create the agent for gateway user `user_id`, if it does not exist yet.+/// Create the profile for gateway user `user_id`, if it does not exist yet.pub fn provision(user_id: &str) -> Result<Outcome<ProvisionResult>, String> {provision_on(&*require_host()?, user_id)}@@ -36,7 +36,7 @@ pub(crate) fn provision_on())}-/// Close agent `profile_id` and archive its state.+/// Close profile `profile_id` and archive its state.pub fn deprovision(profile_id: &str) -> Result<Outcome<DeprovisionResult>, String> {deprovision_on(&*require_host()?, profile_id)}@@ -58,14 +58,14 @@ pub(crate) fn deprovision_on())}-/// Every provisioned agent.+/// Every provisioned profile.pub fn list() -> Result<Outcome<Vec<ProfileSummary>>, String> {- let agents = require_host()?.list()?;- let log = format!("{} profile(s)", agents.len());- Ok(Outcome::single_log(agents, log))+ let profiles = require_host()?.list()?;+ let log = format!("{} profile(s)", profiles.len());+ Ok(Outcome::single_log(profiles, log))}-/// One agent, or an error when it is not provisioned.+/// One profile, or an error when it is not provisioned.pub fn status(profile_id: &str) -> Result<Outcome<ProfileSummary>, String> {status_on(&*require_host()?, profile_id)}@@ -77,14 +77,14 @@ pub(crate) fn status_on(let profile_id = ProfileId::parse(profile_id)?;let summary = host.summary(&profile_id)?- .ok_or_else(|| format!("agent {profile_id} is not provisioned"))?;+ .ok_or_else(|| format!("profile {profile_id} is not provisioned"))?;Ok(Outcome::single_log(summary,format!("status of {profile_id}"),))}-/// Install the backend credential the gateway holds for agent `profile_id`.+/// Install the backend credential the gateway holds for profile `profile_id`.pub fn set_credential(profile_id: &str,kind: UserCredentialKind,@@ -103,10 +103,10 @@ pub(crate) fn set_credential_on() -> Result<Outcome<CredentialResult>, String> {let profile_id = ProfileId::parse(profile_id)?;// From the layout, not `open`: installing or revoking a credential must- // work even when every agent slot is busy.+ // work even when every profile slot is busy.let config = host.provisioned_config(&profile_id)?;credentials::store(&config, kind, token, expires_at)?;- log::info!("[profiles] credential installed for agent={profile_id} kind={kind:?}");+ log::info!("[profiles] credential installed for profile={profile_id} kind={kind:?}");Ok(Outcome::single_log(CredentialResult {profile_id: profile_id.clone(),@@ -116,7 +116,7 @@ pub(crate) fn set_credential_on())}-/// Remove every credential agent `profile_id` holds.+/// Remove every credential profile `profile_id` holds.pub fn clear_credential(profile_id: &str) -> Result<Outcome<CredentialResult>, String> {clear_credential_on(&*require_host()?, profile_id)}@@ -128,7 +128,7 @@ pub(crate) fn clear_credential_on(let profile_id = ProfileId::parse(profile_id)?;let config = host.provisioned_config(&profile_id)?;let removed = credentials::clear(&config)?;- log::info!("[profiles] credential cleared for agent={profile_id} removed={removed}");+ log::info!("[profiles] credential cleared for profile={profile_id} removed={removed}");let log = if removed {format!("credential cleared for {profile_id}")} else {