Skip to content

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

fix: finish explicit dispatch context migration

Steven Enamakel4a1ec8c53fcf
diff --git a/crates/openhuman-core/src/agent/artifacts/schemas.rs b/crates/openhuman-core/src/agent/artifacts/schemas.rs
index 4833c5ad01..314611ec91 100644
--- a/crates/openhuman-core/src/agent/artifacts/schemas.rs
+++ b/crates/openhuman-core/src/agent/artifacts/schemas.rs
@@ -2,7 +2,6 @@ use crate::core::runtime::DispatchCtx;
use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/agent/multimodal.rs b/crates/openhuman-core/src/agent/multimodal.rs
index 5e5b6061d9..0d88aab593 100644
--- a/crates/openhuman-core/src/agent/multimodal.rs
+++ b/crates/openhuman-core/src/agent/multimodal.rs
@@ -4,7 +4,6 @@
//! the acting workspace and provider bytes are prepared only on request copies.
//! The older stash remains readable so existing conversations can resume.
-use crate::core::runtime::DispatchCtx;
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::OnceLock;
@@ -126,9 +125,11 @@ impl TextExtractor for DocumentsTextExtractor {
use crate::modules::documents;
match tokio::time::timeout(PDF_EXTRACTION_TIMEOUT, async {
- let config = crate::config::ops::load_current_or_init(&DispatchCtx::ambient())
- .await
- .map_err(|error| format!("config unavailable for pdf extraction: {error}"))?;
+ let config = crate::config::ops::load_current_or_init(
+ &crate::core::runtime::DispatchCtx::ambient(),
+ )
+ .await
+ .map_err(|error| format!("config unavailable for pdf extraction: {error}"))?;
documents::extract_text(&config, bytes)
.await
.map_err(|error| error.to_string())
diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/schemas.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/schemas.rs
index 745a7b52b3..fccd08e89f 100644
--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/schemas.rs
+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/schemas.rs
@@ -10,7 +10,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs b/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs
index f5f05a9ade..af36b05917 100644
--- a/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs
+++ b/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs
@@ -8,7 +8,6 @@ use serde_json::{Map, Value};
use tinyagents_session::run_ledger::command_center::ControlVerb;
use crate::agent::harness::host_definition::AgentDefinitionRegistry;
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/schemas.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/schemas.rs
index 20927321ca..435cbf653d 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/schemas.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/schemas.rs
@@ -8,7 +8,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/agent/session_db/schemas.rs b/crates/openhuman-core/src/agent/session_db/schemas.rs
index 07c5c929d6..47a6faf348 100644
--- a/crates/openhuman-core/src/agent/session_db/schemas.rs
+++ b/crates/openhuman-core/src/agent/session_db/schemas.rs
@@ -3,7 +3,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs
index b5dcae0d50..da35e74879 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs
@@ -2,7 +2,6 @@
//! the session's channel-permission ceiling at the tool boundary, and render
//! session-scoped `use_skill` listings.
-use crate::core::runtime::DispatchCtx;
use std::sync::Arc;
use async_trait::async_trait;
diff --git a/crates/openhuman-core/src/channels/controllers/schemas.rs b/crates/openhuman-core/src/channels/controllers/schemas.rs
index 9d2ef8773b..b5f02e8a21 100644
--- a/crates/openhuman-core/src/channels/controllers/schemas.rs
+++ b/crates/openhuman-core/src/channels/controllers/schemas.rs
@@ -5,7 +5,6 @@ use serde::de::DeserializeOwned;
use serde::Deserialize;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::config::Config;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::ControllerSchema;
diff --git a/crates/openhuman-core/src/config/ops/agent.rs b/crates/openhuman-core/src/config/ops/agent.rs
index ad78a57085..1f53f7d120 100644
--- a/crates/openhuman-core/src/config/ops/agent.rs
+++ b/crates/openhuman-core/src/config/ops/agent.rs
@@ -8,7 +8,7 @@ use serde_json::json;
use crate::config::Config;
use crate::core::Outcome;
-use super::loader::{load_config_with_timeout, snapshot_config_json};
+use super::loader::snapshot_config_json;
use super::tool_dispatcher as td;
/// Partial update for the `[autonomy]` block — the agent's filesystem access
diff --git a/crates/openhuman-core/src/config/ops/computer.rs b/crates/openhuman-core/src/config/ops/computer.rs
index 0a10486ed8..eb30230037 100644
--- a/crates/openhuman-core/src/config/ops/computer.rs
+++ b/crates/openhuman-core/src/config/ops/computer.rs
@@ -5,7 +5,7 @@ use crate::config::{ComputerConfig, Config, DecisionModel};
use crate::core::runtime::DispatchCtx;
use crate::core::Outcome;
-use super::loader::{load_config_with_timeout, snapshot_config_json};
+use super::loader::snapshot_config_json;
/// A partial update to `[computer]`. An empty model string restores the
/// module's default.
diff --git a/crates/openhuman-core/src/config/ops/loader/reset_local_data.rs b/crates/openhuman-core/src/config/ops/loader/reset_local_data.rs
index 1d28ee3b7d..eebddd2c34 100644
--- a/crates/openhuman-core/src/config/ops/loader/reset_local_data.rs
+++ b/crates/openhuman-core/src/config/ops/loader/reset_local_data.rs
@@ -7,7 +7,6 @@ use std::path::Path;
use serde_json::json;
-use super::load::load_config_with_timeout;
use super::paths::{active_workspace_marker_path, config_openhuman_dir, default_openhuman_dir};
use crate::core::Outcome;
diff --git a/crates/openhuman-core/src/config/ops/loader/snapshot.rs b/crates/openhuman-core/src/config/ops/loader/snapshot.rs
index 9d93e5a544..b91294c245 100644
--- a/crates/openhuman-core/src/config/ops/loader/snapshot.rs
+++ b/crates/openhuman-core/src/config/ops/loader/snapshot.rs
@@ -3,7 +3,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::json;
-use super::load::load_config_with_timeout;
use crate::config::Config;
use crate::core::Outcome;
diff --git a/crates/openhuman-core/src/config/ops/model.rs b/crates/openhuman-core/src/config/ops/model.rs
index 120ada96c6..4f9c0ffbf1 100644
--- a/crates/openhuman-core/src/config/ops/model.rs
+++ b/crates/openhuman-core/src/config/ops/model.rs
@@ -4,7 +4,7 @@ use crate::config::Config;
use crate::core::runtime::DispatchCtx;
use crate::core::Outcome;
-use super::loader::{load_config_with_timeout, snapshot_config_json};
+use super::loader::snapshot_config_json;
#[derive(Debug, Clone, Default)]
pub struct ModelSettingsPatch {
diff --git a/crates/openhuman-core/src/config/ops/privacy.rs b/crates/openhuman-core/src/config/ops/privacy.rs
index e1abe9eb2a..7efa3ba1de 100644
--- a/crates/openhuman-core/src/config/ops/privacy.rs
+++ b/crates/openhuman-core/src/config/ops/privacy.rs
@@ -9,8 +9,6 @@ use crate::config::{Config, PrivacyMode};
use crate::core::runtime::DispatchCtx;
use crate::core::Outcome;
-use super::loader::load_config_with_timeout;
-
/// Partial update for the `[privacy]` block. `None` leaves the mode unchanged.
#[derive(Debug, Clone, Default)]
pub struct PrivacySettingsPatch {
diff --git a/crates/openhuman-core/src/config/ops/sandbox.rs b/crates/openhuman-core/src/config/ops/sandbox.rs
index 758fa9a772..73bcc08982 100644
--- a/crates/openhuman-core/src/config/ops/sandbox.rs
+++ b/crates/openhuman-core/src/config/ops/sandbox.rs
@@ -4,7 +4,7 @@ use crate::config::Config;
use crate::core::runtime::DispatchCtx;
use crate::core::Outcome;
-use super::loader::{load_config_with_timeout, snapshot_config_json};
+use super::loader::snapshot_config_json;
/// Partial update for the `[security.sandbox]` + `[runtime.docker]` blocks.
#[derive(Debug, Clone, Default)]
diff --git a/crates/openhuman-core/src/config/ops/search.rs b/crates/openhuman-core/src/config/ops/search.rs
index df3ff4e416..d8d9db30d8 100644
--- a/crates/openhuman-core/src/config/ops/search.rs
+++ b/crates/openhuman-core/src/config/ops/search.rs
@@ -18,8 +18,6 @@ use crate::core::Outcome;
use crate::search::providers;
use tinysearch_bus::{parse_role, role_key, ROLES};
-use super::loader::load_config_with_timeout;
-
/// Partial update of one provider.
#[derive(Debug, Clone, Default, Deserialize)]
pub struct SearchProviderPatch {
diff --git a/crates/openhuman-core/src/config/ops/ui.rs b/crates/openhuman-core/src/config/ops/ui.rs
index 3fd9dfd0ae..7906f94c32 100644
--- a/crates/openhuman-core/src/config/ops/ui.rs
+++ b/crates/openhuman-core/src/config/ops/ui.rs
@@ -7,7 +7,7 @@ use serde_json::json;
use crate::config::Config;
use crate::core::Outcome;
-use super::loader::{fallback_workspace_dir, load_config_with_timeout, snapshot_config_json};
+use super::loader::{fallback_workspace_dir, snapshot_config_json};
#[derive(Debug, Clone, Default)]
pub struct BrowserSettingsPatch {
diff --git a/crates/openhuman-core/src/config/schemas/controllers/workspace.rs b/crates/openhuman-core/src/config/schemas/controllers/workspace.rs
index a692ffcbc0..19d229ec9e 100644
--- a/crates/openhuman-core/src/config/schemas/controllers/workspace.rs
+++ b/crates/openhuman-core/src/config/schemas/controllers/workspace.rs
@@ -162,7 +162,7 @@ async fn resolve_data_paths(
);
match user_id.as_deref() {
Some(id) => config_rpc::get_data_paths_for_user(id).await,
- None => config_rpc::get_data_paths(&ctx).await,
+ None => config_rpc::get_data_paths(ctx).await,
}
}
diff --git a/crates/openhuman-core/src/config/tools.rs b/crates/openhuman-core/src/config/tools.rs
index 536dd3d4f9..16d2ddfde6 100644
--- a/crates/openhuman-core/src/config/tools.rs
+++ b/crates/openhuman-core/src/config/tools.rs
@@ -12,7 +12,6 @@
//! as a follow-up. They would all ship default-OFF (and autonomy is privilege
//! escalation), so leaving them out keeps this PR's surface read-only and safe.
-use crate::core::runtime::DispatchCtx;
use std::sync::Arc;
use async_trait::async_trait;
diff --git a/crates/openhuman-core/src/config/workspace/ops.rs b/crates/openhuman-core/src/config/workspace/ops.rs
index 4a6de5fbc8..424cbece80 100644
--- a/crates/openhuman-core/src/config/workspace/ops.rs
+++ b/crates/openhuman-core/src/config/workspace/ops.rs
@@ -1,7 +1,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::json;
-use crate::config::rpc as config_rpc;
use crate::skills::init_workflows_dir;
use std::path::Path;
diff --git a/crates/openhuman-core/src/config/workspace/schemas.rs b/crates/openhuman-core/src/config/workspace/schemas.rs
index c5c28e0a9d..ab3bed0cf2 100644
--- a/crates/openhuman-core/src/config/workspace/schemas.rs
+++ b/crates/openhuman-core/src/config/workspace/schemas.rs
@@ -2,7 +2,6 @@ use crate::core::runtime::DispatchCtx;
use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::config::workspace::rpc as workspace_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
diff --git a/crates/openhuman-core/src/cron/scheduler.rs b/crates/openhuman-core/src/cron/scheduler.rs
index 42c3833645..9b31cf11a4 100644
--- a/crates/openhuman-core/src/cron/scheduler.rs
+++ b/crates/openhuman-core/src/cron/scheduler.rs
@@ -26,7 +26,6 @@ mod tests;
#[allow(unused_imports)]
use crate::core::runtime::DispatchCtx;
-use agent_run::*;
#[allow(unused_imports)]
use delivery::*;
#[allow(unused_imports)]
diff --git a/crates/openhuman-core/src/cron/schemas.rs b/crates/openhuman-core/src/cron/schemas.rs
index 43263405ff..bafa862fd4 100644
--- a/crates/openhuman-core/src/cron/schemas.rs
+++ b/crates/openhuman-core/src/cron/schemas.rs
@@ -2,7 +2,6 @@ use crate::core::runtime::DispatchCtx;
use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/desktop/app_state/ops/snapshot.rs b/crates/openhuman-core/src/desktop/app_state/ops/snapshot.rs
index 536a3af490..c5f8c150c6 100644
--- a/crates/openhuman-core/src/desktop/app_state/ops/snapshot.rs
+++ b/crates/openhuman-core/src/desktop/app_state/ops/snapshot.rs
@@ -17,7 +17,6 @@ use super::state_file::{
};
use super::types::{AppStateSnapshot, StoredAppState, StoredAppStatePatch};
use super::LOG_PREFIX;
-use crate::config::rpc as config_rpc;
use crate::core::runtime::DispatchCtx;
use crate::core::Outcome;
use crate::security::credentials::session_support::{
diff --git a/crates/openhuman-core/src/desktop/notifications/rpc.rs b/crates/openhuman-core/src/desktop/notifications/rpc.rs
index 2468f4b99f..76a2a02b65 100644
--- a/crates/openhuman-core/src/desktop/notifications/rpc.rs
+++ b/crates/openhuman-core/src/desktop/notifications/rpc.rs
@@ -17,7 +17,6 @@ use crate::agent::triage::{
apply_decision, local_trigger_origin, run_triage, TriageOutcome, TriggerEnvelope, TriggerSource,
};
use crate::agent::turn_origin::with_origin;
-use crate::config::rpc as config_rpc;
use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
use crate::core::Outcome;
diff --git a/crates/openhuman-core/src/flows/ops/builder.rs b/crates/openhuman-core/src/flows/ops/builder.rs
index 7c3acde563..b9d2d8a28d 100644
--- a/crates/openhuman-core/src/flows/ops/builder.rs
+++ b/crates/openhuman-core/src/flows/ops/builder.rs
@@ -22,7 +22,7 @@ pub async fn flows_build(
req: crate::flows::agents::workflow_builder::builder_prompt::BuilderRequest,
stream: Option<FlowStreamTarget>,
) -> Result<Outcome<Value>, String> {
- flows_build_with_extra_hidden_tools(&ctx, config, req, stream, &[]).await
+ flows_build_with_extra_hidden_tools(ctx, config, req, stream, &[]).await
}
/// [`flows_build`] with caller-specific tools removed in addition to the
@@ -52,7 +52,7 @@ pub(crate) async fn flows_build_with_extra_hidden_tools(
) {
if let Some(assistant_text) = req.error.as_deref().and_then(backend_repair_message) {
if let Some(target) = &stream {
- finalize_flow_stream(&ctx, target, &Ok(assistant_text.clone()), &prompt).await;
+ finalize_flow_stream(ctx, target, &Ok(assistant_text.clone()), &prompt).await;
}
return Ok(Outcome::single_log(
json!({
@@ -315,7 +315,7 @@ pub(crate) async fn flows_build_with_extra_hidden_tools(
if cancelled {
if let Some(target) = &stream {
let terminal: Result<String, String> = Ok(assistant_text.clone());
- finalize_flow_stream(&ctx, target, &terminal, &prompt).await;
+ finalize_flow_stream(ctx, target, &terminal, &prompt).await;
}
tracing::info!(
target: "flows",
@@ -341,7 +341,7 @@ pub(crate) async fn flows_build_with_extra_hidden_tools(
if let Some(err) = &run_error {
if let Some(target) = &stream {
let terminal: Result<String, String> = Err(err.clone());
- finalize_flow_stream(&ctx, target, &terminal, &prompt).await;
+ finalize_flow_stream(ctx, target, &terminal, &prompt).await;
}
return Err(format!("workflow_builder produced no proposal: {err}"));
}
@@ -398,7 +398,7 @@ pub(crate) async fn flows_build_with_extra_hidden_tools(
None => Ok(assistant_text.clone()),
Some(err) => Err(err.clone()),
};
- finalize_flow_stream(&ctx, target, &terminal, &prompt).await;
+ finalize_flow_stream(ctx, target, &terminal, &prompt).await;
}
tracing::info!(
diff --git a/crates/openhuman-core/src/flows/ops/discovery.rs b/crates/openhuman-core/src/flows/ops/discovery.rs
index 15a1bb6a06..02d5496133 100644
--- a/crates/openhuman-core/src/flows/ops/discovery.rs
+++ b/crates/openhuman-core/src/flows/ops/discovery.rs
@@ -110,7 +110,7 @@ pub async fn flows_discover(
// Emit the terminal chat event so a client viewing the thread finalizes the
// assistant bubble instead of spinning (the bridge only streams deltas).
if let Some(target) = &stream {
- finalize_flow_stream(&ctx, target, &outcome, FLOW_DISCOVER_PROMPT).await;
+ finalize_flow_stream(ctx, target, &outcome, FLOW_DISCOVER_PROMPT).await;
}
let suggestions = store::list_suggestions(config, Some(SuggestionStatus::New), 50)
diff --git a/crates/openhuman-core/src/flows/schemas.rs b/crates/openhuman-core/src/flows/schemas.rs
index 1973fb8b3d..180d965657 100644
--- a/crates/openhuman-core/src/flows/schemas.rs
+++ b/crates/openhuman-core/src/flows/schemas.rs
@@ -8,7 +8,6 @@
use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/hooks/host.rs b/crates/openhuman-core/src/hooks/host.rs
index 54a7f2d1dc..834df591af 100644
--- a/crates/openhuman-core/src/hooks/host.rs
+++ b/crates/openhuman-core/src/hooks/host.rs
@@ -54,7 +54,7 @@ pub async fn reload(
) -> Arc<HookConfig> {
// Hook commands run under the shell TinyBox selects; ask it here, where the
// caller is async, so the engine's synchronous shell factory can use it.
- super::shell::resolve(&ctx).await;
+ super::shell::resolve(ctx).await;
let current = environment();
let loaded = tokio::task::spawn_blocking(move || {
config::load(&current, project_dir.as_deref(), workspace_dir.as_deref())
diff --git a/crates/openhuman-core/src/hooks/ops.rs b/crates/openhuman-core/src/hooks/ops.rs
index 19b6e530fe..0c9bec1b16 100644
--- a/crates/openhuman-core/src/hooks/ops.rs
+++ b/crates/openhuman-core/src/hooks/ops.rs
@@ -44,7 +44,7 @@ pub async fn init(ctx: &DispatchCtx, config: &crate::config::schema::Config) {
.set_default_timeout(Duration::from_secs(settings.default_timeout_secs))
.await;
let loaded = super::host::reload(
- &ctx,
+ ctx,
Some(config.action_dir.clone()),
Some(config.workspace_dir.clone()),
)
diff --git a/crates/openhuman-core/src/hooks/schemas.rs b/crates/openhuman-core/src/hooks/schemas.rs
index 1afdf7b8d4..287b558343 100644
--- a/crates/openhuman-core/src/hooks/schemas.rs
+++ b/crates/openhuman-core/src/hooks/schemas.rs
@@ -11,7 +11,6 @@ use crate::core::runtime::DispatchCtx;
use serde::de::DeserializeOwned;
use serde_json::{json, Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/inference/embedding_host/rpc/settings.rs b/crates/openhuman-core/src/inference/embedding_host/rpc/settings.rs
index 839cdafe0b..8a945f1396 100644
--- a/crates/openhuman-core/src/inference/embedding_host/rpc/settings.rs
+++ b/crates/openhuman-core/src/inference/embedding_host/rpc/settings.rs
@@ -201,7 +201,6 @@ pub async fn update_settings(
custom_endpoint: Option<String>,
rate_limit_per_min: Option<u32>,
) -> Result<Outcome<serde_json::Value>, String> {
- use crate::config::ops as config_rpc;
use tinyinference_embeddings::format_embedding_signature;
let mut config = ctx.load_config().await?;
diff --git a/crates/openhuman-core/src/inference/embedding_host/schemas.rs b/crates/openhuman-core/src/inference/embedding_host/schemas.rs
index 3f597a2ee2..53643e5c73 100644
--- a/crates/openhuman-core/src/inference/embedding_host/schemas.rs
+++ b/crates/openhuman-core/src/inference/embedding_host/schemas.rs
@@ -4,7 +4,6 @@ use crate::core::runtime::DispatchCtx;
use serde::Deserialize;
use serde_json::{Map, Value};
-use crate::config::ops as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/inference/host_runtime/schemas.rs b/crates/openhuman-core/src/inference/host_runtime/schemas.rs
index a088eba570..09295064f1 100644
--- a/crates/openhuman-core/src/inference/host_runtime/schemas.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/schemas.rs
@@ -8,7 +8,6 @@ struct LocalAiTestConnectionParams {
url: String,
}
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/inference/ops.rs b/crates/openhuman-core/src/inference/ops.rs
index 7a5b5d01c3..e9ac765320 100644
--- a/crates/openhuman-core/src/inference/ops.rs
+++ b/crates/openhuman-core/src/inference/ops.rs
@@ -253,7 +253,7 @@ pub async fn inference_analyze_sentiment(
pub async fn inference_get_client_config(ctx: &DispatchCtx) -> Result<Outcome<Value>, String> {
debug!("{LOG_PREFIX} get_client_config:start");
- let result = config_rpc::load_and_get_client_config_snapshot(&ctx).await;
+ let result = config_rpc::load_and_get_client_config_snapshot(ctx).await;
match &result {
Ok(_) => debug!("{LOG_PREFIX} get_client_config:ok"),
Err(err) => warn!(error = %err, "{LOG_PREFIX} get_client_config:error"),
@@ -266,7 +266,7 @@ pub async fn inference_update_model_settings(
update: config_rpc::ModelSettingsPatch,
) -> Result<Outcome<Value>, String> {
debug!("{LOG_PREFIX} update_model_settings:start");
- let result = config_rpc::load_and_apply_model_settings(&ctx, update).await;
+ let result = config_rpc::load_and_apply_model_settings(ctx, update).await;
match &result {
Ok(_) => debug!("{LOG_PREFIX} update_model_settings:ok"),
Err(err) => warn!(error = %err, "{LOG_PREFIX} update_model_settings:error"),
@@ -279,7 +279,7 @@ pub async fn inference_update_local_settings(
update: config_rpc::LocalAiSettingsPatch,
) -> Result<Outcome<Value>, String> {
debug!("{LOG_PREFIX} update_local_settings:start");
- let result = config_rpc::load_and_apply_local_ai_settings(&ctx, update).await;
+ let result = config_rpc::load_and_apply_local_ai_settings(ctx, update).await;
match &result {
Ok(_) => {
debug!("{LOG_PREFIX} update_local_settings:ok");
diff --git a/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs b/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs
index 289361f3a5..36a30f0204 100644
--- a/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs
+++ b/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs
@@ -6,7 +6,6 @@ use serde::Deserialize;
use serde_json::{Map, Value};
use super::{deserialize_params, to_json};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
use crate::core::Outcome;
diff --git a/crates/openhuman-core/src/inference/schemas/oauth_handlers.rs b/crates/openhuman-core/src/inference/schemas/oauth_handlers.rs
index 4ede57b6bd..440e323fa0 100644
--- a/crates/openhuman-core/src/inference/schemas/oauth_handlers.rs
+++ b/crates/openhuman-core/src/inference/schemas/oauth_handlers.rs
@@ -6,7 +6,6 @@ use serde::Deserialize;
use serde_json::{Map, Value};
use super::{deserialize_params, to_json};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
#[derive(Debug, Deserialize)]
diff --git a/crates/openhuman-core/src/inference/schemas/prompt_handlers.rs b/crates/openhuman-core/src/inference/schemas/prompt_handlers.rs
index ae5fa67d2c..a51107e304 100644
--- a/crates/openhuman-core/src/inference/schemas/prompt_handlers.rs
+++ b/crates/openhuman-core/src/inference/schemas/prompt_handlers.rs
@@ -6,7 +6,6 @@ use serde::Deserialize;
use serde_json::{Map, Value};
use super::{deserialize_params, to_json};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
#[derive(Debug, Deserialize)]
diff --git a/crates/openhuman-core/src/integrations/composio/action_tool.rs b/crates/openhuman-core/src/integrations/composio/action_tool.rs
index aa0a3a39d4..54a0c87cd6 100644
--- a/crates/openhuman-core/src/integrations/composio/action_tool.rs
+++ b/crates/openhuman-core/src/integrations/composio/action_tool.rs
@@ -37,7 +37,6 @@ use serde_json::Value;
use super::contract::ToolScope;
use super::tools::resolve_action_scope;
use crate::agent::tinyagents::host::run_context::sandbox_mode_for_tool;
-use crate::config::rpc as config_rpc;
use crate::config::Config;
use tinyagents_definition::SandboxMode;
use tinytools::{PermissionLevel, Tool, ToolCallOptions, ToolCategory, ToolResult, ToolRunContext};
@@ -315,7 +314,7 @@ impl ComposioActionTool {
// fresh routing. Anchored to this tool's original config path rather than
// re-resolving process-global `OPENHUMAN_WORKSPACE` (the tool is scoped to
// the user/workspace it was created for).
- let live_config = match self.live_config(&ctx).await {
+ let live_config = match self.live_config(ctx).await {
Ok(c) => Box::new(c),
Err(e) => {
tracing::warn!(
diff --git a/crates/openhuman-core/src/integrations/composio/bus/config_changed_subscriber.rs b/crates/openhuman-core/src/integrations/composio/bus/config_changed_subscriber.rs
index 847c11483a..78ecf4aa9e 100644
--- a/crates/openhuman-core/src/integrations/composio/bus/config_changed_subscriber.rs
+++ b/crates/openhuman-core/src/integrations/composio/bus/config_changed_subscriber.rs
@@ -5,7 +5,6 @@ use crate::core::runtime::DispatchCtx;
use async_trait::async_trait;
use tinybus::EventHandler;
-use crate::config::rpc as config_rpc;
use crate::core::events::DomainEvent;
use crate::integrations::composio::ops;
use crate::integrations::composio::FetchConnectedIntegrationsStatus;
diff --git a/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs b/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs
index 68d687eb5f..2d598032b3 100644
--- a/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs
+++ b/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs
@@ -8,7 +8,6 @@ use crate::agent::triage::{
apply_decision, remote_trigger_origin, run_triage, TriageOutcome, TriggerEnvelope,
};
use crate::agent::turn_origin::with_origin;
-use crate::config::rpc as config_rpc;
use crate::core::events::DomainEvent;
use crate::integrations::composio::trigger_history;
diff --git a/crates/openhuman-core/src/integrations/composio/schemas/handlers_connections.rs b/crates/openhuman-core/src/integrations/composio/schemas/handlers_connections.rs
index 0608c892f9..d5fcfd7dbf 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_connections.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_connections.rs
@@ -6,7 +6,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
use crate::integrations::composio::ops;
diff --git a/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs b/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs
index 6e21e02ff3..c6226edb4b 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs
@@ -5,7 +5,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
use crate::integrations::composio::{contract, ops};
diff --git a/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools.rs b/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools.rs
index 53bdad3f21..81feeb5943 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools.rs
@@ -3,7 +3,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
use crate::integrations::composio::ops;
diff --git a/crates/openhuman-core/src/integrations/composio/schemas/handlers_triggers.rs b/crates/openhuman-core/src/integrations/composio/schemas/handlers_triggers.rs
index 223c392e88..bf0234369c 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_triggers.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_triggers.rs
@@ -5,7 +5,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
use crate::integrations::composio::ops;
diff --git a/crates/openhuman-core/src/integrations/task_sources/bus.rs b/crates/openhuman-core/src/integrations/task_sources/bus.rs
index 94003e11ea..9b6231a0c3 100644
--- a/crates/openhuman-core/src/integrations/task_sources/bus.rs
+++ b/crates/openhuman-core/src/integrations/task_sources/bus.rs
@@ -10,7 +10,6 @@ use std::sync::{Arc, OnceLock};
use async_trait::async_trait;
-use crate::config::rpc as config_rpc;
use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
use tinybus::EventHandler;
diff --git a/crates/openhuman-core/src/integrations/task_sources/periodic.rs b/crates/openhuman-core/src/integrations/task_sources/periodic.rs
index a98457475a..1012c3be07 100644
--- a/crates/openhuman-core/src/integrations/task_sources/periodic.rs
+++ b/crates/openhuman-core/src/integrations/task_sources/periodic.rs
@@ -15,8 +15,6 @@ use std::time::{Duration, Instant};
use tokio::time::interval;
-use crate::config::rpc as config_rpc;
-
use super::pipeline;
use super::types::{FetchReason, TaskSource};
diff --git a/crates/openhuman-core/src/integrations/task_sources/schemas.rs b/crates/openhuman-core/src/integrations/task_sources/schemas.rs
index a1cffe525f..1e4ec80ed9 100644
--- a/crates/openhuman-core/src/integrations/task_sources/schemas.rs
+++ b/crates/openhuman-core/src/integrations/task_sources/schemas.rs
@@ -8,7 +8,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/mcp/audit/schemas.rs b/crates/openhuman-core/src/mcp/audit/schemas.rs
index 54874e5bc3..d9788d76dd 100644
--- a/crates/openhuman-core/src/mcp/audit/schemas.rs
+++ b/crates/openhuman-core/src/mcp/audit/schemas.rs
@@ -1,7 +1,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/mcp/registry/schemas/handlers.rs b/crates/openhuman-core/src/mcp/registry/schemas/handlers.rs
index cad241bbb2..45e40721dd 100644
--- a/crates/openhuman-core/src/mcp/registry/schemas/handlers.rs
+++ b/crates/openhuman-core/src/mcp/registry/schemas/handlers.rs
@@ -4,7 +4,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
use super::params::{
diff --git a/crates/openhuman-core/src/mcp/ui/schemas.rs b/crates/openhuman-core/src/mcp/ui/schemas.rs
index 5957927520..67ea603a43 100644
--- a/crates/openhuman-core/src/mcp/ui/schemas.rs
+++ b/crates/openhuman-core/src/mcp/ui/schemas.rs
@@ -5,7 +5,6 @@ use std::sync::Arc;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
use crate::security::SecurityPolicy;
diff --git a/crates/openhuman-core/src/modules/schemas.rs b/crates/openhuman-core/src/modules/schemas.rs
index 37290973ef..ab629278a1 100644
--- a/crates/openhuman-core/src/modules/schemas.rs
+++ b/crates/openhuman-core/src/modules/schemas.rs
@@ -15,7 +15,6 @@ use std::sync::Arc;
use tinycomputer_bus::browser::SessionOptions;
use super::ops;
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/platform/cost/schemas.rs b/crates/openhuman-core/src/platform/cost/schemas.rs
index 3d1e63bf91..6fcc6a4c20 100644
--- a/crates/openhuman-core/src/platform/cost/schemas.rs
+++ b/crates/openhuman-core/src/platform/cost/schemas.rs
@@ -4,7 +4,6 @@ use crate::core::runtime::DispatchCtx;
use serde::Deserialize;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/platform/doctor/schemas.rs b/crates/openhuman-core/src/platform/doctor/schemas.rs
index 28a3f5c2bf..6a8fdf538f 100644
--- a/crates/openhuman-core/src/platform/doctor/schemas.rs
+++ b/crates/openhuman-core/src/platform/doctor/schemas.rs
@@ -2,7 +2,6 @@ use crate::core::runtime::DispatchCtx;
use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/platform/service/schemas.rs b/crates/openhuman-core/src/platform/service/schemas.rs
index 05f229f6ce..bfea682a25 100644
--- a/crates/openhuman-core/src/platform/service/schemas.rs
+++ b/crates/openhuman-core/src/platform/service/schemas.rs
@@ -8,7 +8,6 @@ use crate::core::runtime::DispatchCtx;
use serde::Deserialize;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/platform/update/ops.rs b/crates/openhuman-core/src/platform/update/ops.rs
index 0e908979ec..600e643c94 100644
--- a/crates/openhuman-core/src/platform/update/ops.rs
+++ b/crates/openhuman-core/src/platform/update/ops.rs
@@ -5,7 +5,7 @@ use std::path::PathBuf;
use serde_json::Value;
-use crate::config::{self, UpdateConfig, UpdateRestartStrategy};
+use crate::config::{UpdateConfig, UpdateRestartStrategy};
use crate::core::Outcome;
use crate::platform::update;
use crate::platform::update::types::{UpdateApplyResult, UpdateInfo, UpdateRunResult, VersionInfo};
@@ -21,7 +21,7 @@ async fn enforce_update_mutation_policy(
ctx: &DispatchCtx,
method: &str,
) -> Result<UpdateConfig, String> {
- let policy = load_update_policy(&ctx).await.map_err(|err| {
+ let policy = load_update_policy(ctx).await.map_err(|err| {
let message = format!(
"{method} blocked: {err}; failing closed because update policy could not be loaded"
);
@@ -183,7 +183,7 @@ pub async fn update_version() -> Outcome<Value> {
/// core process will exit shortly afterwards.
pub async fn update_run(ctx: &DispatchCtx) -> Outcome<Value> {
log::info!("[update:rpc] update_run invoked");
- let policy = match enforce_update_mutation_policy(&ctx, "openhuman.update_run").await {
+ let policy = match enforce_update_mutation_policy(ctx, "openhuman.update_run").await {
Ok(policy) => policy,
Err(error) => {
return Outcome::single_log(
@@ -356,7 +356,7 @@ pub async fn update_apply(
download_url,
asset_name,
);
- let policy = match enforce_update_mutation_policy(&ctx, "openhuman.update_apply").await {
+ let policy = match enforce_update_mutation_policy(ctx, "openhuman.update_apply").await {
Ok(policy) => policy,
Err(error) => {
return Outcome::single_log(
diff --git a/crates/openhuman-core/src/sandbox/ops.rs b/crates/openhuman-core/src/sandbox/ops.rs
index 33cb747e0a..6e71a31175 100644
--- a/crates/openhuman-core/src/sandbox/ops.rs
+++ b/crates/openhuman-core/src/sandbox/ops.rs
@@ -302,7 +302,7 @@ pub async fn execute_in_sandbox(
extra_env: HashMap<OsString, OsString>,
timeout: Duration,
) -> anyhow::Result<SandboxExecResult> {
- execute_in_sandbox_metered(&ctx, policy, command, working_dir, extra_env, timeout, None).await
+ execute_in_sandbox_metered(ctx, policy, command, working_dir, extra_env, timeout, None).await
}
/// [`execute_in_sandbox`] that feeds `meter` with the command's output as it
diff --git a/crates/openhuman-core/src/sandbox/schemas.rs b/crates/openhuman-core/src/sandbox/schemas.rs
index ab82bed476..6fbe68e2ac 100644
--- a/crates/openhuman-core/src/sandbox/schemas.rs
+++ b/crates/openhuman-core/src/sandbox/schemas.rs
@@ -3,7 +3,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/security/approval/rpc.rs b/crates/openhuman-core/src/security/approval/rpc.rs
index 2cadf1ed4c..6e7844deee 100644
--- a/crates/openhuman-core/src/security/approval/rpc.rs
+++ b/crates/openhuman-core/src/security/approval/rpc.rs
@@ -294,7 +294,7 @@ pub async fn approval_decide(
row.tool_name
));
} else if decision == ApprovalDecision::ApproveAlwaysForTool {
- match crate::config::ops::add_auto_approve_tool(&ctx, &row.tool_name).await {
+ match crate::config::ops::add_auto_approve_tool(ctx, &row.tool_name).await {
Ok(()) => {
tracing::info!(
tool = row.tool_name.as_str(),
diff --git a/crates/openhuman-core/src/security/credentials/bus.rs b/crates/openhuman-core/src/security/credentials/bus.rs
index e2f16cfd20..8f1882dd11 100644
--- a/crates/openhuman-core/src/security/credentials/bus.rs
+++ b/crates/openhuman-core/src/security/credentials/bus.rs
@@ -135,7 +135,7 @@ impl SessionExpiredSubscriber {
// we've at least pinned the scheduler gate so background work
// can't make things worse.
if let Err(err) =
- crate::security::credentials::rpc::clear_session(&ctx, &config).await
+ crate::security::credentials::rpc::clear_session(ctx, &config).await
{
tracing::warn!(
source = %source,
diff --git a/crates/openhuman-core/src/security/credentials/ops/boot_env.rs b/crates/openhuman-core/src/security/credentials/ops/boot_env.rs
index 2a41c84344..b5e900fdd1 100644
--- a/crates/openhuman-core/src/security/credentials/ops/boot_env.rs
+++ b/crates/openhuman-core/src/security/credentials/ops/boot_env.rs
@@ -65,7 +65,7 @@ pub async fn seed_session_from_env(ctx: &DispatchCtx, config: &Config) {
user: None,
issuing_backend: None,
};
- match set_credential(&ctx, config, request).await {
+ match set_credential(ctx, config, request).await {
Ok(outcome) => log::info!(
"[auth][boot] session installed from {BACKEND_SESSION_TOKEN_ENV} (user_id={})",
outcome.value.user_id.as_deref().unwrap_or("?")
diff --git a/crates/openhuman-core/src/security/credentials/ops/credential.rs b/crates/openhuman-core/src/security/credentials/ops/credential.rs
index acbca00bc7..52b997e90e 100644
--- a/crates/openhuman-core/src/security/credentials/ops/credential.rs
+++ b/crates/openhuman-core/src/security/credentials/ops/credential.rs
@@ -271,7 +271,7 @@ pub async fn set_credential(
operation = "set_credential",
"{LOG_PREFIX} credential names a different user than the stored one; clearing the previous session first"
);
- let cleared = clear_session_credential(&ctx, config).await?;
+ let cleared = clear_session_credential(ctx, config).await?;
logs.extend(cleared.logs);
}
metadata.insert("user_id".to_string(), user_id.clone());
@@ -298,9 +298,9 @@ pub async fn set_credential(
logs.extend(activate_user_scope(&user_id)?);
// Reload so auth-profiles.json, the encryption key and the workspace
// resolve to the user-scoped location before the profile is written.
- let effective = reload_config_or(&ctx, config).await?;
+ let effective = reload_config_or(ctx, config).await?;
if resolved.kind == CredentialKind::Local {
- match crate::config::ops::set_onboarding_completed(&ctx, false).await {
+ match crate::config::ops::set_onboarding_completed(ctx, false).await {
Ok(_) => {
logs.push("onboarding left incomplete for local session setup".to_string())
}
@@ -414,14 +414,14 @@ pub async fn clear_credential(
kind,
None | Some(CredentialKind::Session) | Some(CredentialKind::Local)
) {
- let outcome = clear_session_credential(&ctx, config).await?;
+ let outcome = clear_session_credential(ctx, config).await?;
removed_session = outcome.value;
logs.extend(outcome.logs);
if removed_session {
// Follow the same process globals the teardown just rebound to,
// so the api-key checks below agree with `auth.get_state`.
- effective_config = reload_config_or(&ctx, config).await?;
+ effective_config = reload_config_or(ctx, config).await?;
if let Some(key) = source_api_key.as_deref() {
if matches!(
kind,
@@ -586,7 +586,7 @@ pub async fn store_session(
user: Option<Value>,
) -> Result<Outcome<AuthStateResponse>, String> {
set_credential(
- &ctx,
+ ctx,
config,
SetCredentialRequest {
token: token.to_string(),
@@ -602,7 +602,7 @@ pub async fn store_session(
/// Historical entry point: sign the session out. Same as
/// [`clear_credential`] for the session kind.
pub async fn clear_session(ctx: &DispatchCtx, config: &Config) -> Result<Outcome<Value>, String> {
- clear_credential(&ctx, config, Some(CredentialKind::Session)).await
+ clear_credential(ctx, config, Some(CredentialKind::Session)).await
}
/// A process-wide credential is a single-user concept: installing one
diff --git a/crates/openhuman-core/src/security/credentials/schemas.rs b/crates/openhuman-core/src/security/credentials/schemas.rs
index d0f1cb1168..e352eb5a80 100644
--- a/crates/openhuman-core/src/security/credentials/schemas.rs
+++ b/crates/openhuman-core/src/security/credentials/schemas.rs
@@ -3,7 +3,6 @@ use serde::de::DeserializeOwned;
use serde::Deserialize;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/security/devices/owner.rs b/crates/openhuman-core/src/security/devices/owner.rs
index 6209272052..40fd804aa7 100644
--- a/crates/openhuman-core/src/security/devices/owner.rs
+++ b/crates/openhuman-core/src/security/devices/owner.rs
@@ -114,7 +114,7 @@ pub(super) async fn owner_of(
}
let revoked = crate::storage::agents::within_agent(
session.agent.as_deref(),
- is_revoked(&ctx, channel_id),
+ is_revoked(ctx, channel_id),
)
.await;
return match revoked {
@@ -136,7 +136,7 @@ pub(super) async fn owner_of(
if let Some(owner) = cached(channel_id) {
match crate::storage::agents::within_agent(
owner.as_deref(),
- has_live_device(&ctx, channel_id),
+ has_live_device(ctx, channel_id),
)
.await
{
@@ -150,10 +150,9 @@ pub(super) async fn owner_of(
Some(Ok(false)) | None => forget(channel_id),
}
}
- let lookups = crate::storage::agents::for_each_scope("device owner", || {
- has_live_device(&ctx, channel_id)
- })
- .await;
+ let lookups =
+ crate::storage::agents::for_each_scope("device owner", || has_live_device(ctx, channel_id))
+ .await;
let owner = decide(lookups)?;
if let Some(owner) = &owner {
log::debug!(
diff --git a/crates/openhuman-core/src/security/devices/schemas.rs b/crates/openhuman-core/src/security/devices/schemas.rs
index d293bdb281..7a89efa605 100644
--- a/crates/openhuman-core/src/security/devices/schemas.rs
+++ b/crates/openhuman-core/src/security/devices/schemas.rs
@@ -6,7 +6,6 @@ use crate::core::runtime::DispatchCtx;
use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/security/encryption/schemas.rs b/crates/openhuman-core/src/security/encryption/schemas.rs
index 25c0cfeeb7..2c0acc76ff 100644
--- a/crates/openhuman-core/src/security/encryption/schemas.rs
+++ b/crates/openhuman-core/src/security/encryption/schemas.rs
@@ -2,7 +2,6 @@ use crate::core::runtime::DispatchCtx;
use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/security/keyring_consent/ops.rs b/crates/openhuman-core/src/security/keyring_consent/ops.rs
index 6f440b5940..405f68a492 100644
--- a/crates/openhuman-core/src/security/keyring_consent/ops.rs
+++ b/crates/openhuman-core/src/security/keyring_consent/ops.rs
@@ -35,7 +35,7 @@ pub async fn keyring_consent_decide(
// Persist to disk first. If this fails we return an error without
// updating the cache, so cache and disk stay consistent.
- persist_consent(&ctx, &pref).await?;
+ persist_consent(ctx, &pref).await?;
// Only update the in-memory cache after a successful persist.
policy::apply_consent(&pref);
@@ -60,7 +60,7 @@ async fn persist_consent(ctx: &DispatchCtx, pref: &ConsentPreference) -> Result<
keyring_consent: Some(Some(pref.clone())),
..Default::default()
};
- crate::desktop::app_state::update_local_state(&ctx, patch).await?;
+ crate::desktop::app_state::update_local_state(ctx, patch).await?;
log::debug!("{LOG_PREFIX} consent persisted to app state");
Ok(())
}
diff --git a/crates/openhuman-core/src/tools/impl/system/shell.rs b/crates/openhuman-core/src/tools/impl/system/shell.rs
index d4090d3fdd..0f948b9e2f 100644
--- a/crates/openhuman-core/src/tools/impl/system/shell.rs
+++ b/crates/openhuman-core/src/tools/impl/system/shell.rs
@@ -302,7 +302,7 @@ impl ShellTool {
context,
crate::sandbox::shell_progress::HEARTBEAT_INTERVAL,
|meter| {
- self.run_with_security_in_context(&ctx, command, requested_timeout, context, meter)
+ self.run_with_security_in_context(ctx, command, requested_timeout, context, meter)
},
)
.await;
@@ -336,7 +336,7 @@ impl ShellTool {
command: &str,
requested_timeout: Option<u64>,
) -> (bool, ToolResult) {
- self.run_with_security_in_context(&ctx, command, requested_timeout, None, None)
+ self.run_with_security_in_context(ctx, command, requested_timeout, None, None)
.await
}
@@ -417,7 +417,7 @@ impl ShellTool {
let action_dir = saas_action_dir;
return match resolved {
Ok(policy) => {
- self.run_in_policy(&ctx, policy, command, requested_timeout, &action_dir, meter)
+ self.run_in_policy(ctx, policy, command, requested_timeout, &action_dir, meter)
.await
}
Err(why) => {
@@ -431,7 +431,7 @@ impl ShellTool {
// A sandboxed agent or an explicit operator backend uses the sandbox
// execution path. Security checks above still apply.
let sandbox_required = match crate::sandbox::command_requires_sandbox(
- &ctx,
+ ctx,
crate::agent::tinyagents::host::run_context::sandbox_mode_for_tool(context),
)
.await
@@ -447,7 +447,7 @@ impl ShellTool {
if sandbox_required {
let action_dir = self.effective_action_dir_for_context(context);
return self
- .run_sandboxed(&ctx, command, requested_timeout, &action_dir, meter)
+ .run_sandboxed(ctx, command, requested_timeout, &action_dir, meter)
.await;
}
@@ -647,7 +647,7 @@ impl ShellTool {
&config,
false,
);
- self.run_in_policy(&ctx, policy, command, requested_timeout, action_dir, meter)
+ self.run_in_policy(ctx, policy, command, requested_timeout, action_dir, meter)
.await
}
@@ -692,7 +692,7 @@ impl ShellTool {
);
let result = sandbox::ops::execute_in_sandbox_metered(
- &ctx, &policy, command, action_dir, extra_env, effective, meter,
+ ctx, &policy, command, action_dir, extra_env, effective, meter,
)
.await;
(true, exec_result(result, effective))
diff --git a/crates/openhuman-core/src/tools/schemas/composio.rs b/crates/openhuman-core/src/tools/schemas/composio.rs
index 36a5ead977..8dfb824b13 100644
--- a/crates/openhuman-core/src/tools/schemas/composio.rs
+++ b/crates/openhuman-core/src/tools/schemas/composio.rs
@@ -3,7 +3,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{json, Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
use crate::core::Outcome;
diff --git a/crates/openhuman-core/src/tools/schemas/web_search.rs b/crates/openhuman-core/src/tools/schemas/web_search.rs
index b3a7c20f4e..6ca3f0ce66 100644
--- a/crates/openhuman-core/src/tools/schemas/web_search.rs
+++ b/crates/openhuman-core/src/tools/schemas/web_search.rs
@@ -6,7 +6,6 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{json, Map, Value};
-use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
fn required_text(params: &Map<String, Value>, key: &str) -> Result<String, String> {
diff --git a/crates/openhuman-rpc/src/server/socketio.rs b/crates/openhuman-rpc/src/server/socketio.rs
index 34d287499a..c78514c734 100644
--- a/crates/openhuman-rpc/src/server/socketio.rs
+++ b/crates/openhuman-rpc/src/server/socketio.rs
@@ -30,7 +30,6 @@
//! (a "type carve-out"; see AGENTS.md). `pub mod socketio;` in `core::mod` is
//! intentionally NOT gated for the same reason.
-use crate::core_host::core::runtime::DispatchCtx;
use serde::Deserialize;
use serde::Serialize;
use serde_json::json;