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
feat(config): add enabled field to autonomy settings patch
Steven Enamakel1910051996d1
diff --git a/crates/openhuman-core/src/config/ops/agent.rs b/crates/openhuman-core/src/config/ops/agent.rsindex ef4f04f526..b807febba4 100644--- a/crates/openhuman-core/src/config/ops/agent.rs+++ b/crates/openhuman-core/src/config/ops/agent.rs@@ -15,6 +15,12 @@ use super::loader::{load_config_with_timeout, snapshot_config_json};/// array wholesale.#[derive(Debug, Clone, Default)]pub struct AutonomySettingsPatch {+ /// Master switch for the whole autonomy policy. Defaults to `false`+ /// (`AutonomyConfig::enabled`): with it off, classification, the approval+ /// gate, the allowlist, the action budget and containment are all inert,+ /// and every other field in this patch has no effect until it is `true`.+ /// `is_always_forbidden` applies either way.+ pub enabled: Option<bool>,/// `"readonly" | "supervised" | "full"` (case-insensitive).pub level: Option<String>,pub workspace_only: Option<bool>,@@ -84,6 +90,9 @@ pub async fn apply_autonomy_settings() -> Result<RpcOutcome<serde_json::Value>, String> {use crate::security::AutonomyLevel;+ if let Some(enabled) = update.enabled {+ config.autonomy.enabled = enabled;+ }if let Some(level) = update.level {config.autonomy.level = match level.trim().to_ascii_lowercase().as_str() {"readonly" | "read_only" | "read-only" => AutonomyLevel::ReadOnly,diff --git a/crates/openhuman-core/src/config/schemas/controllers/agent.rs b/crates/openhuman-core/src/config/schemas/controllers/agent.rsindex 1d908246fb..875ffb43e4 100644--- a/crates/openhuman-core/src/config/schemas/controllers/agent.rs+++ b/crates/openhuman-core/src/config/schemas/controllers/agent.rs@@ -19,6 +19,7 @@ pub(crate) fn handle_update_autonomy_settings(params: Map<String, Value>) -> ConBox::pin(async move {let update = deserialize_params::<AutonomySettingsUpdate>(params)?;let patch = config_rpc::AutonomySettingsPatch {+ enabled: update.enabled,level: update.level,workspace_only: update.workspace_only,allowed_commands: update.allowed_commands,diff --git a/crates/openhuman-core/src/config/schemas/helpers.rs b/crates/openhuman-core/src/config/schemas/helpers.rsindex d3e7fcd936..d56cac9475 100644--- a/crates/openhuman-core/src/config/schemas/helpers.rs+++ b/crates/openhuman-core/src/config/schemas/helpers.rs@@ -189,6 +189,12 @@ pub(super) struct ComposioTriggerSettingsUpdate {#[derive(Debug, Deserialize)]pub(super) struct AutonomySettingsUpdate {+ /// Master switch for the whole autonomy policy. Defaults to `false`+ /// (`AutonomyConfig::enabled`): with it off, classification, the approval+ /// gate, the allowlist, the action budget and containment are all inert,+ /// and every other field in this patch has no effect until it is `true`.+ /// `is_always_forbidden` applies either way.+ pub(super) enabled: Option<bool>,/// `"readonly" | "supervised" | "full"` (case-insensitive).pub(super) level: Option<String>,pub(super) workspace_only: Option<bool>,