Skip to content

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

feat(config): migrate legacy config keys on load

Steven Enamakel18e80a286303
diff --git a/crates/openhuman-core/src/config/schema/load/migrate.rs b/crates/openhuman-core/src/config/schema/load/migrate.rs
index df89487550..ce77fc065c 100644
--- a/crates/openhuman-core/src/config/schema/load/migrate.rs
+++ b/crates/openhuman-core/src/config/schema/load/migrate.rs
@@ -362,6 +362,19 @@ pub(crate) fn migrate_components_with(config: &mut Config, raw: &str, tinymemes:
.and_then(|t| t.get("router_enabled"))
.and_then(toml::Value::as_bool);
disable(config, "juice", router_enabled);
+ // `[sandbox] enabled = false` (and the same key under `[security.sandbox]`)
+ // already meant "no isolation backend"; it now also keeps the TinyBox
+ // module from loading. Unset (auto) and `true` keep the component on.
+ let sandbox_flag = |path: &[&str]| {
+ let mut node = value.as_ref()?;
+ for key in path {
+ node = node.get(key)?;
+ }
+ node.get("enabled").and_then(toml::Value::as_bool)
+ };
+ let sandbox_off = [sandbox_flag(&["sandbox"]), sandbox_flag(&["security", "sandbox"])]
+ .contains(&Some(false));
+ disable(config, "sandbox", sandbox_off.then_some(false));
if !moved.is_empty() {
tracing::info!(
"[config][migrate] legacy switches moved to [components]: {}",