Skip to content

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

chore(config): split loader into module

Steven Enamakelfde74f273294
diff --git a/crates/openhuman-core/src/config/ops/loader.rs b/crates/openhuman-core/src/config/ops/loader.rs
index 2ee213a25c..fdfc784317 100644
--- a/crates/openhuman-core/src/config/ops/loader.rs
+++ b/crates/openhuman-core/src/config/ops/loader.rs
@@ -8,7 +8,7 @@ mod snapshot;
pub use load::{
load_config_for_workspace_with_timeout, load_config_in, load_config_with_timeout,
- load_current_or_init, load_current_or_init_ambient, reload_config_from_paths,
+ load_current_or_init, reload_config_from_paths,
reload_config_snapshot_with_timeout,
};
pub(crate) use paths::fallback_workspace_dir;
diff --git a/crates/openhuman-core/src/config/ops/loader/load.rs b/crates/openhuman-core/src/config/ops/loader/load.rs
index 2d11174bbf..644195a0ec 100644
--- a/crates/openhuman-core/src/config/ops/loader/load.rs
+++ b/crates/openhuman-core/src/config/ops/loader/load.rs
@@ -91,12 +91,6 @@ pub async fn load_current_or_init(ctx: &DispatchCtx) -> anyhow::Result<Config> {
Ok(config)
}
-/// [`load_current_or_init`] for a caller with no context of its own yet: reads
-/// the task's ambient one. Transitional (#7801), like `DispatchCtx::ambient`.
-pub async fn load_current_or_init_ambient() -> anyhow::Result<Config> {
- load_current_or_init(&crate::core::runtime::DispatchCtx::ambient()).await
-}
-
/// Loads the config that belongs to `workspace_dir`, rather than whichever one
/// the process-global active-user / `OPENHUMAN_WORKSPACE` resolution currently
/// selects.
diff --git a/crates/openhuman-core/src/config/ops/mod.rs b/crates/openhuman-core/src/config/ops/mod.rs
index 88a9368eb2..92118b4bf6 100644
--- a/crates/openhuman-core/src/config/ops/mod.rs
+++ b/crates/openhuman-core/src/config/ops/mod.rs
@@ -25,7 +25,7 @@ pub use loader::{
get_dashboard_settings, get_data_paths, get_data_paths_for_user, get_runtime_flags,
load_and_get_client_config_snapshot, load_and_get_config_snapshot,
load_config_for_workspace_with_timeout, load_config_in, load_config_with_timeout,
- load_current_or_init, load_current_or_init_ambient, reload_config_from_paths,
+ load_current_or_init, reload_config_from_paths,
reload_config_snapshot_with_timeout, reset_local_data, set_browser_allow_all,
snapshot_config_json, RuntimeFlagsOut,
};