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(config): reorder imports and wrap long lines
Steven Enamakelebc2f2a232ce
diff --git a/crates/openhuman-core/src/config/schema/load/impl_load.rs b/crates/openhuman-core/src/config/schema/load/impl_load.rsindex b59fd0716e..b182f1676a 100644--- a/crates/openhuman-core/src/config/schema/load/impl_load.rs+++ b/crates/openhuman-core/src/config/schema/load/impl_load.rs@@ -1,8 +1,8 @@use super::super::Config;use super::branches::pre_login_config_boxed;use super::dirs::{- default_action_dir, default_config_and_workspace_dirs, resolve_action_dir,- resolve_config_dirs_ignoring_env, resolve_runtime_config_dirs_with, ConfigResolutionSource,+ ConfigResolutionSource, default_action_dir, default_config_and_workspace_dirs,+ resolve_action_dir, resolve_config_dirs_ignoring_env, resolve_runtime_config_dirs_with,};use super::env::{EnvLookup, ProcessEnv, ProcessEnvWithoutWorkspace};use super::migrate::{@@ -17,8 +17,8 @@ use std::path::Path;use std::sync::{Mutex, OnceLock};use tokio::fs;-pub(crate) use super::config_file_read::parse_config_with_recovery;pub(crate) use super::config_file_read::CONFIG_OWNER_MISMATCH_MARKER;+pub(crate) use super::config_file_read::parse_config_with_recovery;pub(super) use super::config_file_read::{describe_config_ownership, migration_source, parse_config_boxed, parse_toml_off_worker,};diff --git a/crates/openhuman-core/src/config/schema/load/source/concurrency_tests.rs b/crates/openhuman-core/src/config/schema/load/source/concurrency_tests.rsindex 6405b93a5c..4c5d7ea42f 100644--- a/crates/openhuman-core/src/config/schema/load/source/concurrency_tests.rs+++ b/crates/openhuman-core/src/config/schema/load/source/concurrency_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::core::runtime::{context::CoreContext, DispatchCtx, DomainSet};+use crate::core::runtime::{DispatchCtx, DomainSet, context::CoreContext};use serde_json::json;#[tokio::test]@@ -191,7 +191,10 @@ async fn config_snapshot_cannot_be_saved_into_a_different_tenant_scope() {.chain().find_map(|cause| cause.downcast_ref::<tinystoragedrivers::StorageError>()).expect("a save into a different source returns a typed conflict");- assert_eq!(storage_error.kind(), tinystoragedrivers::ErrorKind::Conflict);+ assert_eq!(+ storage_error.kind(),+ tinystoragedrivers::ErrorKind::Conflict+ );let tenant_b = {let _source = ForcedDocumentSource::new(diff --git a/crates/openhuman-core/src/config/schema/load/source/document.rs b/crates/openhuman-core/src/config/schema/load/source/document.rsindex 236355e5d8..95453d9363 100644--- a/crates/openhuman-core/src/config/schema/load/source/document.rs+++ b/crates/openhuman-core/src/config/schema/load/source/document.rs@@ -2,17 +2,20 @@use std::sync::{Arc, Mutex};-use anyhow::{anyhow, Context, Result};+use anyhow::{Context, Result, anyhow};use async_trait::async_trait;use serde_json::json;-use tinystoragedrivers::secrets::{crypto, KeyProvider};+use tinystoragedrivers::secrets::{KeyProvider, crypto};use tinystoragedrivers::{CollectionSpec, DocumentStore, Precondition};-use super::{apply_bootstrap, strip_bootstrap, ConfigRead, ConfigSource, ConfigSourceAnchor, FileConfigSource};+use super::{+ ConfigRead, ConfigSource, ConfigSourceAnchor, FileConfigSource, apply_bootstrap,+ strip_bootstrap,+};use crate::storage::Scope;-use super::storage_schema::document_id;pub(crate) use super::storage_schema::CONFIG_COLLECTION;+use super::storage_schema::document_id;/// The document field holding the encrypted TOML body (`enc2:` hex).const BODY_FIELD: &str = "toml_enc";@@ -173,7 +176,10 @@ impl ConfigSource for DocumentConfigSource {tracing::debug!(scope = %self.scope.as_str(), "[config] no config document; reading the file");let read = self.file.read().await?;*self.observed_version.lock().unwrap() = None;- return Ok(ConfigRead { source_anchor: self.anchor(), ..read });+ return Ok(ConfigRead {+ source_anchor: self.anchor(),+ ..read+ });};// Bootstrap tables come from the file, whatever the document says.// Through the file source, so its corruption recovery (a `.bak`, adiff --git a/crates/openhuman-core/src/config/schema/load/source/mod.rs b/crates/openhuman-core/src/config/schema/load/source/mod.rsindex 60e3256a87..46e2e2c601 100644--- a/crates/openhuman-core/src/config/schema/load/source/mod.rs+++ b/crates/openhuman-core/src/config/schema/load/source/mod.rs@@ -62,7 +62,11 @@ pub(crate) struct ConfigRead {#[derive(Debug, Clone, PartialEq, Eq)]pub(crate) enum ConfigSourceAnchor {File(std::path::PathBuf),- Document { backend: usize, scope: String, id: String },+ Document {+ backend: usize,+ scope: String,+ id: String,+ },}/// A place a config's TOML text is read from and written to.diff --git a/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs b/crates/openhuman-core/src/config/schema/load/source/mod_tests.rsindex 91fef4070a..8a79dc37dd 100644--- a/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs+++ b/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs@@ -3,7 +3,7 @@ use super::*;use crate::config::Config;use crate::storage::{MemoryStorage, Scope, ScopedStorage, StorageBackend};use std::sync::Arc;-use tinystoragedrivers::secrets::{crypto, DerivedKeys, KeyProvider};+use tinystoragedrivers::secrets::{DerivedKeys, KeyProvider, crypto};use zeroize::Zeroizing;fn keys(byte: u8) -> Arc<dyn KeyProvider> {diff --git a/crates/openhuman-core/src/config/schema/types/config_clone.rs b/crates/openhuman-core/src/config/schema/types/config_clone.rsindex 7fa4421a88..26142b5030 100644--- a/crates/openhuman-core/src/config/schema/types/config_clone.rs+++ b/crates/openhuman-core/src/config/schema/types/config_clone.rs@@ -12,7 +12,9 @@ impl Clone for Config {#[inline(never)]fn clone(&self) -> Self {Self {- document_snapshot: std::sync::Mutex::new(self.document_snapshot.lock().unwrap().clone()),+ document_snapshot: std::sync::Mutex::new(+ self.document_snapshot.lock().unwrap().clone(),+ ),context_snapshot: self.context_snapshot.clone(),profile_providers: self.profile_providers.clone(),workspace_dir: self.workspace_dir.clone(),diff --git a/crates/openhuman-core/src/config/schema/types/defaults.rs b/crates/openhuman-core/src/config/schema/types/defaults.rsindex 4c6870a838..ea32acff24 100644--- a/crates/openhuman-core/src/config/schema/types/defaults.rs+++ b/crates/openhuman-core/src/config/schema/types/defaults.rs@@ -4,8 +4,8 @@ use directories::UserDirs;use std::collections::HashMap;use std::path::PathBuf;-use super::config::default_temperature_unsupported_models;use super::config::DEFAULT_TEMPERATURE;+use super::config::default_temperature_unsupported_models;use super::model_ids::DEFAULT_MODEL;use crate::config::schema::*;diff --git a/crates/openhuman-core/src/core/runtime/context_tests.rs b/crates/openhuman-core/src/core/runtime/context_tests.rsindex 4c470e794e..c00132eb9c 100644--- a/crates/openhuman-core/src/core/runtime/context_tests.rs+++ b/crates/openhuman-core/src/core/runtime/context_tests.rs@@ -11,7 +11,7 @@ fn ctx(dir: &str) -> Arc<CoreContext> {tool_groups: Default::default(),components: Default::default(),embedder_config: None,- latest_embedder_config: None,+ latest_embedder_config: None,user_skill_roots: true,extensions: Default::default(),turn_origin: None,@@ -48,7 +48,7 @@ fn ctx_with_config(config: crate::config::Config) -> Arc<CoreContext> {tool_groups: Default::default(),components: Default::default(),embedder_config: Some(config),- latest_embedder_config: None,+ latest_embedder_config: None,user_skill_roots: true,extensions: Default::default(),turn_origin: None,@@ -390,7 +390,7 @@ fn degraded_context_rejects_workspace_bound_stores() {tool_groups: Default::default(),components: Default::default(),embedder_config: None,- latest_embedder_config: None,+ latest_embedder_config: None,user_skill_roots: true,extensions: Default::default(),turn_origin: None,diff --git a/crates/openhuman-core/src/core/runtime/context_turn_origin_tests.rs b/crates/openhuman-core/src/core/runtime/context_turn_origin_tests.rsindex 83baedb714..43ea2a0570 100644--- a/crates/openhuman-core/src/core/runtime/context_turn_origin_tests.rs+++ b/crates/openhuman-core/src/core/runtime/context_turn_origin_tests.rs@@ -240,11 +240,13 @@ async fn a_turn_origin_survives_a_change_of_context() {Some(crate::security::turn_origin::AgentTurnOrigin::TrustedAutomation { .. })));// It is the inner context that is scoped (its own state), not the outer.- assert!(CoreContext::current()- .unwrap()- .workspace_dir()- .unwrap()- .ends_with("origin-survives-inner"));+ assert!(+ CoreContext::current()+ .unwrap()+ .workspace_dir()+ .unwrap()+ .ends_with("origin-survives-inner")+ );}).await;CoreContext::sync_scope(inner, || {