Skip to content

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

refactor(openhuman-core): thread dispatch context through controller handlers

Steven Enamakelb056fb9bb58d
diff --git a/crates/openhuman-core/src/agent/artifacts/schemas.rs b/crates/openhuman-core/src/agent/artifacts/schemas.rs
index c190e1232e..ed28991e42 100644
--- a/crates/openhuman-core/src/agent/artifacts/schemas.rs
+++ b/crates/openhuman-core/src/agent/artifacts/schemas.rs
@@ -252,7 +252,7 @@ fn artifact_id_input(comment: &'static str) -> FieldSchema {
}
}
-fn handle_list_artifacts(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_artifacts(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let offset = read_optional_u64(&params, "offset")?
@@ -276,7 +276,7 @@ fn handle_list_artifacts(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get_artifact(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_artifact(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let artifact_id = read_required::<String>(&params, "artifact_id")?;
@@ -284,7 +284,7 @@ fn handle_get_artifact(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_delete_artifact(params: Map<String, Value>) -> ControllerFuture {
+fn handle_delete_artifact(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let artifact_id = read_required::<String>(&params, "artifact_id")?;
@@ -294,7 +294,7 @@ fn handle_delete_artifact(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_regenerate(params: Map<String, Value>) -> ControllerFuture {
+fn handle_regenerate(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let artifact_id = read_required::<String>(&params, "artifact_id")?;
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 985cc79a61..1da2270b33 100644
--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/schemas.rs
+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/schemas.rs
@@ -252,7 +252,7 @@ fn schema_for(function: &str) -> ControllerSchema {
}
}
-fn handle_create(params: Map<String, Value>) -> ControllerFuture {
+fn handle_create(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] create.entry");
@@ -277,7 +277,7 @@ fn handle_create(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] list.entry");
@@ -303,7 +303,7 @@ fn handle_list(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] get.entry");
@@ -319,7 +319,7 @@ fn handle_get(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_assign_task(params: Map<String, Value>) -> ControllerFuture {
+fn handle_assign_task(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] assign_task.entry");
@@ -346,7 +346,7 @@ fn handle_assign_task(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_claim_task(params: Map<String, Value>) -> ControllerFuture {
+fn handle_claim_task(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] claim_task.entry");
@@ -365,7 +365,7 @@ fn handle_claim_task(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_message_member(params: Map<String, Value>) -> ControllerFuture {
+fn handle_message_member(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] message_member.entry");
@@ -393,7 +393,7 @@ fn handle_message_member(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list_messages(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_messages(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] list_messages.entry");
@@ -413,7 +413,7 @@ fn handle_list_messages(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_complete_task(params: Map<String, Value>) -> ControllerFuture {
+fn handle_complete_task(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] complete_task.entry");
@@ -437,7 +437,7 @@ fn handle_complete_task(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_shutdown_member(params: Map<String, Value>) -> ControllerFuture {
+fn handle_shutdown_member(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] shutdown_member.entry");
@@ -454,7 +454,7 @@ fn handle_shutdown_member(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_close(params: Map<String, Value>) -> ControllerFuture {
+fn handle_close(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] close.entry");
@@ -471,7 +471,7 @@ fn handle_close(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_start_member(params: Map<String, Value>) -> ControllerFuture {
+fn handle_start_member(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "agent_team_rpc", "[agent_team_rpc][{cid}] start_member.entry");
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 69c976a033..d6351a0830 100644
--- a/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs
+++ b/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs
@@ -85,7 +85,7 @@ fn schema_for(function: &str) -> ControllerSchema {
}
}
-fn handle_agent_work_list(params: Map<String, Value>) -> ControllerFuture {
+fn handle_agent_work_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "command_center_rpc", "[command_center_rpc][{cid}] list.entry");
@@ -111,7 +111,7 @@ fn handle_agent_work_list(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_agent_work_control(params: Map<String, Value>) -> ControllerFuture {
+fn handle_agent_work_control(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "command_center_rpc", "[command_center_rpc][{cid}] control.entry");
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_control.rs b/crates/openhuman-core/src/agent/orchestration/subagent_control.rs
index be497e97ee..b84a7aa63f 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_control.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_control.rs
@@ -100,7 +100,7 @@ fn schema_for(function: &str) -> ControllerSchema {
}
}
-fn handle_subagent_cancel(params: Map<String, Value>) -> ControllerFuture {
+fn handle_subagent_cancel(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
let task_id = require_str(&params, "taskId")?;
@@ -182,7 +182,7 @@ fn handle_subagent_cancel(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_subagent_steer(params: Map<String, Value>) -> ControllerFuture {
+fn handle_subagent_steer(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
let task_id = require_str(&params, "taskId")?;
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 aee23895a5..f5182c447f 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/schemas.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/schemas.rs
@@ -132,7 +132,7 @@ fn schema_for(function: &str) -> ControllerSchema {
}
}
-fn handle_list_definitions(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_definitions(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "workflow_run_rpc", "[workflow_run_rpc][{cid}] list_definitions.entry");
@@ -142,7 +142,7 @@ fn handle_list_definitions(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "workflow_run_rpc", "[workflow_run_rpc][{cid}] list.entry");
@@ -170,7 +170,7 @@ fn handle_list(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "workflow_run_rpc", "[workflow_run_rpc][{cid}] get.entry");
@@ -192,7 +192,7 @@ fn handle_get(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_start(params: Map<String, Value>) -> ControllerFuture {
+fn handle_start(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "workflow_run_rpc", "[workflow_run_rpc][{cid}] start.entry");
@@ -227,7 +227,7 @@ fn handle_start(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_stop(params: Map<String, Value>) -> ControllerFuture {
+fn handle_stop(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "workflow_run_rpc", "[workflow_run_rpc][{cid}] stop.entry");
@@ -249,7 +249,7 @@ fn handle_stop(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_resume(params: Map<String, Value>) -> ControllerFuture {
+fn handle_resume(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "workflow_run_rpc", "[workflow_run_rpc][{cid}] resume.entry");
diff --git a/crates/openhuman-core/src/agent/orchestration/worktree_schemas.rs b/crates/openhuman-core/src/agent/orchestration/worktree_schemas.rs
index 0c9c7edbfe..a54e71e146 100644
--- a/crates/openhuman-core/src/agent/orchestration/worktree_schemas.rs
+++ b/crates/openhuman-core/src/agent/orchestration/worktree_schemas.rs
@@ -144,7 +144,7 @@ fn require_managed_worktree_path(params: &Map<String, Value>) -> Result<PathBuf,
Ok(path)
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "worktree_rpc", "[worktree_rpc][{cid}] list.entry");
@@ -153,7 +153,7 @@ fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_status(params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "worktree_rpc", "[worktree_rpc][{cid}] status.entry");
@@ -163,7 +163,7 @@ fn handle_status(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_diff(params: Map<String, Value>) -> ControllerFuture {
+fn handle_diff(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "worktree_rpc", "[worktree_rpc][{cid}] diff.entry");
@@ -173,7 +173,7 @@ fn handle_diff(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_remove(params: Map<String, Value>) -> ControllerFuture {
+fn handle_remove(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "worktree_rpc", "[worktree_rpc][{cid}] remove.entry");
diff --git a/crates/openhuman-core/src/agent/plan_review/schemas.rs b/crates/openhuman-core/src/agent/plan_review/schemas.rs
index 6cdb4c7f7e..6970c86fb6 100644
--- a/crates/openhuman-core/src/agent/plan_review/schemas.rs
+++ b/crates/openhuman-core/src/agent/plan_review/schemas.rs
@@ -81,7 +81,7 @@ struct DecideParams {
feedback: Option<String>,
}
-fn handle_decide(params: Map<String, Value>) -> ControllerFuture {
+fn handle_decide(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<DecideParams>(params)?;
let resolution = match p.decision.trim().to_ascii_lowercase().as_str() {
diff --git a/crates/openhuman-core/src/agent/registry/schemas.rs b/crates/openhuman-core/src/agent/registry/schemas.rs
index c5b8010108..fb03d59f14 100644
--- a/crates/openhuman-core/src/agent/registry/schemas.rs
+++ b/crates/openhuman-core/src/agent/registry/schemas.rs
@@ -213,56 +213,56 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_list(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let req = parse_value::<rpc::ListRequest>(Value::Object(params))?;
to_json(rpc::list_rpc(req).await?)
})
}
-fn handle_available_tools(params: Map<String, Value>) -> ControllerFuture {
+fn handle_available_tools(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let req = parse_value::<rpc::AvailableToolsRequest>(Value::Object(params))?;
to_json(rpc::available_tools_rpc(req).await?)
})
}
-fn handle_get(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let req = parse_value::<rpc::GetRequest>(Value::Object(params))?;
to_json(rpc::get_rpc(req).await?)
})
}
-fn handle_create_custom(params: Map<String, Value>) -> ControllerFuture {
+fn handle_create_custom(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let req = parse_value::<rpc::CreateCustomRequest>(Value::Object(params))?;
to_json(rpc::create_custom_rpc(req).await?)
})
}
-fn handle_upsert_custom(params: Map<String, Value>) -> ControllerFuture {
+fn handle_upsert_custom(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let req = parse_value::<rpc::UpsertCustomRequest>(Value::Object(params))?;
to_json(rpc::upsert_custom_rpc(req).await?)
})
}
-fn handle_update(params: Map<String, Value>) -> ControllerFuture {
+fn handle_update(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let req = parse_value::<rpc::UpdateRequest>(Value::Object(params))?;
to_json(rpc::update_rpc(req).await?)
})
}
-fn handle_set_enabled(params: Map<String, Value>) -> ControllerFuture {
+fn handle_set_enabled(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let req = parse_value::<rpc::SetEnabledRequest>(Value::Object(params))?;
to_json(rpc::set_enabled_rpc(req).await?)
})
}
-fn handle_remove(params: Map<String, Value>) -> ControllerFuture {
+fn handle_remove(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let req = parse_value::<rpc::RemoveRequest>(Value::Object(params))?;
to_json(rpc::remove_rpc(req).await?)
diff --git a/crates/openhuman-core/src/agent/schemas.rs b/crates/openhuman-core/src/agent/schemas.rs
index 8643c48011..955346d786 100644
--- a/crates/openhuman-core/src/agent/schemas.rs
+++ b/crates/openhuman-core/src/agent/schemas.rs
@@ -259,7 +259,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_chat(params: Map<String, Value>) -> ControllerFuture {
+fn handle_chat(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<AgentChatParams>(params)?;
let mut config = config_rpc::load_config_with_timeout().await?;
@@ -282,7 +282,7 @@ fn handle_chat(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_chat_simple(params: Map<String, Value>) -> ControllerFuture {
+fn handle_chat_simple(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<AgentChatParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -299,11 +299,11 @@ fn handle_chat_simple(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_server_status(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_server_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::agent_server_status()) })
}
-fn handle_list_definitions(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_definitions(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let defs = crate::agent::library::list_definition_metadata().await?;
Ok(serde_json::json!({ "definitions": defs }))
@@ -315,7 +315,7 @@ struct GetDefinitionParams {
id: String,
}
-fn handle_get_definition(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_definition(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<GetDefinitionParams>(params)?;
let registry = crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
@@ -327,7 +327,7 @@ fn handle_get_definition(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_reload_definitions(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_reload_definitions(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
// The global registry is OnceLock-backed so live reload is a
// no-op in v1. Reply with a status payload that explains this
@@ -355,7 +355,7 @@ struct TriageEvaluateParams {
dry_run: Option<bool>,
}
-fn handle_triage_evaluate(params: Map<String, Value>) -> ControllerFuture {
+fn handle_triage_evaluate(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<TriageEvaluateParams>(params)?;
@@ -478,7 +478,7 @@ fn handle_triage_evaluate(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_graph_topologies(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_graph_topologies(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let reports = tinyagents_orchestration::topology::all_graph_topologies();
let agents = crate::agent::registry::agents::load_builtins()
@@ -576,7 +576,7 @@ fn local_catalog_models_from_config(
.collect()
}
-fn handle_registry_snapshot(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_registry_snapshot(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
use tinyagents_registry::{ComponentKind, ComponentMetadata, RegistrySnapshot};
@@ -686,7 +686,7 @@ fn handle_registry_snapshot(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_context_breakdown(params: Map<String, Value>) -> ControllerFuture {
+fn handle_context_breakdown(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p =
deserialize_params::<crate::agent::context_breakdown::ContextBreakdownParams>(params)?;
diff --git a/crates/openhuman-core/src/agent/session_db/schemas.rs b/crates/openhuman-core/src/agent/session_db/schemas.rs
index 34dc3ffa6b..b57cd80474 100644
--- a/crates/openhuman-core/src/agent/session_db/schemas.rs
+++ b/crates/openhuman-core/src/agent/session_db/schemas.rs
@@ -94,7 +94,7 @@ fn new_correlation_id() -> String {
uuid::Uuid::new_v4().simple().to_string()[..8].to_string()
}
-fn handle_run_ledger_list(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run_ledger_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "run_ledger_rpc", "[run_ledger_rpc][{cid}] list.entry");
@@ -124,7 +124,7 @@ fn handle_run_ledger_list(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_run_ledger_get(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run_ledger_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "run_ledger_rpc", "[run_ledger_rpc][{cid}] get.entry");
@@ -148,7 +148,7 @@ fn handle_run_ledger_get(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_run_ledger_events(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run_ledger_events(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "run_ledger_rpc", "[run_ledger_rpc][{cid}] events.entry");
diff --git a/crates/openhuman-core/src/agent/session_import/schemas.rs b/crates/openhuman-core/src/agent/session_import/schemas.rs
index 237ef318de..1b944d98d4 100644
--- a/crates/openhuman-core/src/agent/session_import/schemas.rs
+++ b/crates/openhuman-core/src/agent/session_import/schemas.rs
@@ -70,7 +70,7 @@ pub fn session_import_schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_session_import_run(params: Map<String, Value>) -> ControllerFuture {
+fn handle_session_import_run(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload: SessionImportRunParams = serde_json::from_value(Value::Object(params))
.map_err(|e| format!("invalid params: {e}"))?;
diff --git a/crates/openhuman-core/src/agent/tinyagents/replay/schemas.rs b/crates/openhuman-core/src/agent/tinyagents/replay/schemas.rs
index 9393c5a9b9..2f6e979d5f 100644
--- a/crates/openhuman-core/src/agent/tinyagents/replay/schemas.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/replay/schemas.rs
@@ -227,7 +227,7 @@ async fn configured_workspace() -> Result<std::path::PathBuf, String> {
Ok(config.workspace_dir)
}
-fn handle_run_events(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run_events(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload: RunEventsParams = serde_json::from_value(Value::Object(params))
.map_err(|e| format!("invalid params: {e}"))?;
@@ -261,7 +261,7 @@ fn handle_run_events(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_run_status(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload: RunStatusParams = serde_json::from_value(Value::Object(params))
.map_err(|e| format!("invalid params: {e}"))?;
@@ -282,7 +282,7 @@ fn handle_run_status(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_runs_active(params: Map<String, Value>) -> ControllerFuture {
+fn handle_runs_active(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload: RunsActiveParams = serde_json::from_value(Value::Object(params))
.map_err(|e| format!("invalid params: {e}"))?;
diff --git a/crates/openhuman-core/src/agent/tinyagents/run_mode.rs b/crates/openhuman-core/src/agent/tinyagents/run_mode.rs
index cf60f54cb8..1676602382 100644
--- a/crates/openhuman-core/src/agent/tinyagents/run_mode.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/run_mode.rs
@@ -195,7 +195,7 @@ struct ThreadIdParams {
thread_id: String,
}
-fn handle_set_run_mode(params: Map<String, Value>) -> ControllerFuture {
+fn handle_set_run_mode(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ThreadModeParams>(params)?;
let Some(mode) = parse_mode_label(&p.mode) else {
@@ -211,7 +211,7 @@ fn handle_set_run_mode(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get_run_mode(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_run_mode(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ThreadIdParams>(params)?;
let mode = get_mode(&p.thread_id);
diff --git a/crates/openhuman-core/src/channels/controllers/schemas.rs b/crates/openhuman-core/src/channels/controllers/schemas.rs
index 5291323bee..cfc192611d 100644
--- a/crates/openhuman-core/src/channels/controllers/schemas.rs
+++ b/crates/openhuman-core/src/channels/controllers/schemas.rs
@@ -219,7 +219,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
// Handlers
// ---------------------------------------------------------------------------
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
to_json(Outcome::new(
tinychannels_bus::controllers::all_channel_definitions(),
@@ -228,7 +228,7 @@ fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_describe(params: Map<String, Value>) -> ControllerFuture {
+fn handle_describe(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<DescribeParams>(params)?;
let channel = p.channel.trim();
@@ -238,7 +238,7 @@ fn handle_describe(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_connect(params: Map<String, Value>) -> ControllerFuture {
+fn handle_connect(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<ConnectParams>(params)?;
@@ -258,7 +258,7 @@ async fn connect_with_config(config: &Config, p: ConnectParams) -> Result<Value,
to_json(Outcome::new(outcome.value, logs))
}
-fn handle_disconnect(params: Map<String, Value>) -> ControllerFuture {
+fn handle_disconnect(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<DisconnectParams>(params)?;
@@ -282,7 +282,7 @@ fn handle_disconnect(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_status(params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = if params.is_empty() {
@@ -304,7 +304,7 @@ fn handle_status(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_set_default(params: Map<String, Value>) -> ControllerFuture {
+fn handle_set_default(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let mut config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<SetDefaultParams>(params)?;
@@ -312,14 +312,14 @@ fn handle_set_default(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get_default(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_default(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(super::ops::get_default_channel(&config)?)
})
}
-fn handle_test(params: Map<String, Value>) -> ControllerFuture {
+fn handle_test(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<TestParams>(params)?;
@@ -337,14 +337,14 @@ async fn test_with_config(config: &Config, params: TestParams) -> Result<Value,
)
}
-fn handle_discord_list_guilds(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_discord_list_guilds(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(super::ops::discord_list_guilds(&config).await?)
})
}
-fn handle_discord_list_channels(params: Map<String, Value>) -> ControllerFuture {
+fn handle_discord_list_channels(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<DiscordListChannelsParams>(params)?;
@@ -352,7 +352,7 @@ fn handle_discord_list_channels(params: Map<String, Value>) -> ControllerFuture
})
}
-fn handle_discord_check_permissions(params: Map<String, Value>) -> ControllerFuture {
+fn handle_discord_check_permissions(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<DiscordCheckPermissionsParams>(params)?;
@@ -363,7 +363,7 @@ fn handle_discord_check_permissions(params: Map<String, Value>) -> ControllerFut
})
}
-fn handle_send_message(params: Map<String, Value>) -> ControllerFuture {
+fn handle_send_message(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<SendMessageParams>(params)?;
@@ -389,7 +389,7 @@ async fn send_with_config(config: &Config, p: SendMessageParams) -> Result<Value
))
}
-fn handle_send_reaction(params: Map<String, Value>) -> ControllerFuture {
+fn handle_send_reaction(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<SendReactionParams>(params)?;
@@ -405,7 +405,7 @@ fn handle_send_reaction(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_create_thread(params: Map<String, Value>) -> ControllerFuture {
+fn handle_create_thread(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<CreateThreadParams>(params)?;
@@ -421,7 +421,7 @@ fn handle_create_thread(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_update_thread(params: Map<String, Value>) -> ControllerFuture {
+fn handle_update_thread(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<UpdateThreadParams>(params)?;
@@ -442,7 +442,7 @@ fn handle_update_thread(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list_threads(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_threads(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<ListThreadsParams>(params)?;
diff --git a/crates/openhuman-core/src/channels/providers/relay/schemas.rs b/crates/openhuman-core/src/channels/providers/relay/schemas.rs
index 04629aae3a..1470f24c22 100644
--- a/crates/openhuman-core/src/channels/providers/relay/schemas.rs
+++ b/crates/openhuman-core/src/channels/providers/relay/schemas.rs
@@ -91,7 +91,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_relay_inbound(params: Map<String, Value>) -> ControllerFuture {
+fn handle_relay_inbound(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let params: RelayInboundParams = serde_json::from_value(Value::Object(params))
.map_err(|e| format!("invalid params: {e}"))?;
diff --git a/crates/openhuman-core/src/commands/schemas.rs b/crates/openhuman-core/src/commands/schemas.rs
index 93ed6f0149..ef1bc28b02 100644
--- a/crates/openhuman-core/src/commands/schemas.rs
+++ b/crates/openhuman-core/src/commands/schemas.rs
@@ -52,7 +52,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
super::ops::commands_list()
.await?
diff --git a/crates/openhuman-core/src/config/schemas/controllers/agent.rs b/crates/openhuman-core/src/config/schemas/controllers/agent.rs
index bfdaea7fae..560eae382d 100644
--- a/crates/openhuman-core/src/config/schemas/controllers/agent.rs
+++ b/crates/openhuman-core/src/config/schemas/controllers/agent.rs
@@ -11,11 +11,11 @@ use super::super::helpers::{
SetBrowserAllowAllParams,
};
-pub(crate) fn handle_get_autonomy_settings(_params: Map<String, Value>) -> ControllerFuture {
+pub(crate) fn handle_get_autonomy_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { to_json(config_rpc::get_autonomy_settings().await?) })
}
-pub(crate) fn handle_update_autonomy_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(crate) fn handle_update_autonomy_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<AutonomySettingsUpdate>(params)?;
let patch = config_rpc::AutonomySettingsPatch {
@@ -34,11 +34,11 @@ pub(crate) fn handle_update_autonomy_settings(params: Map<String, Value>) -> Con
})
}
-pub(super) fn handle_get_privacy_mode(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_privacy_mode(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { to_json(config_rpc::get_privacy_mode().await?) })
}
-pub(super) fn handle_set_privacy_mode(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_set_privacy_mode(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<PrivacyModeUpdate>(params)?;
let patch = config_rpc::PrivacySettingsPatch { mode: update.mode };
@@ -46,7 +46,7 @@ pub(super) fn handle_set_privacy_mode(params: Map<String, Value>) -> ControllerF
})
}
-pub(super) fn handle_get_agent_settings(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_agent_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
log::debug!("[config][rpc] get_agent_settings enter");
match config_rpc::get_agent_settings().await {
@@ -62,7 +62,7 @@ pub(super) fn handle_get_agent_settings(_params: Map<String, Value>) -> Controll
})
}
-pub(super) fn handle_update_agent_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_agent_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!("[config][rpc] update_agent_settings enter");
let update = match deserialize_params::<AgentSettingsUpdate>(params) {
@@ -90,7 +90,7 @@ pub(super) fn handle_update_agent_settings(params: Map<String, Value>) -> Contro
})
}
-pub(super) fn handle_update_browser_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_browser_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<BrowserSettingsUpdate>(params)?;
let patch = config_rpc::BrowserSettingsPatch {
@@ -111,7 +111,7 @@ pub(super) fn handle_update_browser_settings(params: Map<String, Value>) -> Cont
})
}
-pub(super) fn handle_update_computer_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_computer_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<ComputerSettingsUpdate>(params)?;
let patch = config_rpc::ComputerSettingsPatch {
@@ -125,18 +125,18 @@ pub(super) fn handle_update_computer_settings(params: Map<String, Value>) -> Con
})
}
-pub(super) fn handle_set_browser_allow_all(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_set_browser_allow_all(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<SetBrowserAllowAllParams>(params)?;
to_json(config_rpc::set_browser_allow_all(payload.enabled)?)
})
}
-pub(super) fn handle_get_sandbox_settings(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_sandbox_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { to_json(config_rpc::get_sandbox_settings().await?) })
}
-pub(super) fn handle_update_sandbox_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_sandbox_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<SandboxSettingsUpdate>(params)?;
let patch = config_rpc::SandboxSettingsPatch {
diff --git a/crates/openhuman-core/src/config/schemas/controllers/inference.rs b/crates/openhuman-core/src/config/schemas/controllers/inference.rs
index 4515e2aa1c..4683c5bafa 100644
--- a/crates/openhuman-core/src/config/schemas/controllers/inference.rs
+++ b/crates/openhuman-core/src/config/schemas/controllers/inference.rs
@@ -10,11 +10,11 @@ use super::super::helpers::{
RuntimeSettingsUpdate,
};
-pub(super) fn handle_get_config(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_config(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::load_and_get_config_snapshot().await?) })
}
-pub(super) fn handle_get_client_config(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_client_config(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!("[config][rpc] get_client_config enter");
match config_rpc::load_and_get_client_config_snapshot().await {
@@ -27,7 +27,7 @@ pub(super) fn handle_get_client_config(_params: Map<String, Value>) -> Controlle
})
}
-pub(super) fn handle_update_model_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_model_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<ModelSettingsUpdate>(params)?;
let cloud_provider_ca_certs = update
@@ -167,7 +167,7 @@ pub(super) fn handle_update_model_settings(params: Map<String, Value>) -> Contro
})
}
-pub(super) fn handle_update_memory_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_memory_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<MemorySettingsUpdate>(params)?;
let patch = config_rpc::MemorySettingsPatch {
@@ -179,7 +179,7 @@ pub(super) fn handle_update_memory_settings(params: Map<String, Value>) -> Contr
})
}
-pub(super) fn handle_update_runtime_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_runtime_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<RuntimeSettingsUpdate>(params)?;
let patch = config_rpc::RuntimeSettingsPatch {
@@ -192,7 +192,7 @@ pub(super) fn handle_update_runtime_settings(params: Map<String, Value>) -> Cont
})
}
-pub(super) fn handle_update_local_ai_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_local_ai_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<LocalAiSettingsUpdate>(params)?;
let base_url = match update.base_url {
@@ -215,10 +215,10 @@ pub(super) fn handle_update_local_ai_settings(params: Map<String, Value>) -> Con
})
}
-pub(super) fn handle_resolve_api_url(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_resolve_api_url(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::load_and_resolve_api_url().await?) })
}
-pub(super) fn handle_get_runtime_flags(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_runtime_flags(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::get_runtime_flags()) })
}
diff --git a/crates/openhuman-core/src/config/schemas/controllers/integrations.rs b/crates/openhuman-core/src/config/schemas/controllers/integrations.rs
index e8dca740da..a4f83942b6 100644
--- a/crates/openhuman-core/src/config/schemas/controllers/integrations.rs
+++ b/crates/openhuman-core/src/config/schemas/controllers/integrations.rs
@@ -7,7 +7,7 @@ use crate::core::all::ControllerFuture;
use super::super::helpers::{deserialize_params, to_json, ComposioTriggerSettingsUpdate};
-pub(super) fn handle_update_search_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_search_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!("[config][rpc] update_search_settings enter");
let patch = match deserialize_params::<config_rpc::SearchSettingsPatch>(params) {
@@ -30,7 +30,7 @@ pub(super) fn handle_update_search_settings(params: Map<String, Value>) -> Contr
})
}
-pub(super) fn handle_get_search_settings(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_search_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
log::debug!("[config][rpc] get_search_settings enter");
match config_rpc::get_search_settings().await {
@@ -46,7 +46,7 @@ pub(super) fn handle_get_search_settings(_params: Map<String, Value>) -> Control
})
}
-pub(super) fn handle_update_composio_trigger_settings(
+pub(super) fn handle_update_composio_trigger_settings(_ctx: DispatchCtx,
params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
@@ -75,7 +75,7 @@ pub(super) fn handle_update_composio_trigger_settings(
})
}
-pub(super) fn handle_get_composio_trigger_settings(
+pub(super) fn handle_get_composio_trigger_settings(_ctx: DispatchCtx,
_params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async {
diff --git a/crates/openhuman-core/src/config/schemas/controllers/voice.rs b/crates/openhuman-core/src/config/schemas/controllers/voice.rs
index fa6f423d97..fdac991704 100644
--- a/crates/openhuman-core/src/config/schemas/controllers/voice.rs
+++ b/crates/openhuman-core/src/config/schemas/controllers/voice.rs
@@ -9,11 +9,11 @@ use super::super::helpers::{
deserialize_params, to_json, DictationSettingsUpdate, VoiceServerSettingsUpdate,
};
-pub(super) fn handle_get_dictation_settings(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_dictation_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::get_dictation_settings().await?) })
}
-pub(super) fn handle_update_dictation_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_dictation_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<DictationSettingsUpdate>(params)?;
let patch = config_rpc::DictationSettingsPatch {
@@ -28,11 +28,11 @@ pub(super) fn handle_update_dictation_settings(params: Map<String, Value>) -> Co
})
}
-pub(super) fn handle_get_voice_server_settings(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_voice_server_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::get_voice_server_settings().await?) })
}
-pub(super) fn handle_update_voice_server_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_voice_server_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<VoiceServerSettingsUpdate>(params)?;
let patch = config_rpc::VoiceServerSettingsPatch {
diff --git a/crates/openhuman-core/src/config/schemas/controllers/workspace.rs b/crates/openhuman-core/src/config/schemas/controllers/workspace.rs
index 292523eac4..5ce6d933b9 100644
--- a/crates/openhuman-core/src/config/schemas/controllers/workspace.rs
+++ b/crates/openhuman-core/src/config/schemas/controllers/workspace.rs
@@ -11,7 +11,7 @@ use super::super::helpers::{
WorkspaceOnboardingFlagSetParams, DEFAULT_ONBOARDING_FLAG_NAME,
};
-pub(super) fn handle_workspace_onboarding_flag_exists(
+pub(super) fn handle_workspace_onboarding_flag_exists(_ctx: DispatchCtx,
params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
@@ -26,7 +26,7 @@ pub(super) fn handle_workspace_onboarding_flag_exists(
})
}
-pub(super) fn handle_workspace_onboarding_flag_set(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_workspace_onboarding_flag_set(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkspaceOnboardingFlagSetParams>(params)?;
to_json(
@@ -40,7 +40,7 @@ pub(super) fn handle_workspace_onboarding_flag_set(params: Map<String, Value>) -
})
}
-pub(super) fn handle_update_analytics_settings(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_analytics_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<AnalyticsSettingsUpdate>(params)?;
let patch = config_rpc::AnalyticsSettingsPatch {
@@ -50,14 +50,14 @@ pub(super) fn handle_update_analytics_settings(params: Map<String, Value>) -> Co
})
}
-pub(super) fn handle_update_user_timezone(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_user_timezone(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let update = deserialize_params::<UserTimezoneUpdate>(params)?;
to_json(config_rpc::load_and_apply_user_timezone(update.timezone).await?)
})
}
-pub(super) fn handle_get_user_timezone(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_user_timezone(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::core::Outcome::single_log(
@@ -67,7 +67,7 @@ pub(super) fn handle_get_user_timezone(_params: Map<String, Value>) -> Controlle
})
}
-pub(super) fn handle_get_analytics_settings(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_analytics_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
use crate::core::Outcome;
let config = config_rpc::load_config_with_timeout().await?;
@@ -81,19 +81,19 @@ pub(super) fn handle_get_analytics_settings(_params: Map<String, Value>) -> Cont
})
}
-pub(super) fn handle_get_dashboard_settings(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_dashboard_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::get_dashboard_settings().await?) })
}
-pub(super) fn handle_agent_server_status(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_agent_server_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::agent_server_status()) })
}
-pub(super) fn handle_reset_local_data(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_reset_local_data(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::reset_local_data().await?) })
}
-pub(crate) fn handle_get_data_paths(params: Map<String, Value>) -> ControllerFuture {
+pub(crate) fn handle_get_data_paths(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!("[config][rpc] get_data_paths enter");
match resolve_data_paths(params).await {
@@ -134,7 +134,7 @@ async fn resolve_data_paths(
}
}
-pub(crate) fn handle_get_agent_paths(_params: Map<String, Value>) -> ControllerFuture {
+pub(crate) fn handle_get_agent_paths(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
log::debug!("[config][rpc] get_agent_paths enter");
match config_rpc::get_agent_paths().await {
@@ -150,7 +150,7 @@ pub(crate) fn handle_get_agent_paths(_params: Map<String, Value>) -> ControllerF
})
}
-pub(super) fn handle_update_agent_paths(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_agent_paths(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!("[config][rpc] update_agent_paths enter");
let update = match deserialize_params::<AgentPathsUpdate>(params) {
@@ -177,11 +177,11 @@ pub(super) fn handle_update_agent_paths(params: Map<String, Value>) -> Controlle
})
}
-pub(super) fn handle_get_onboarding_completed(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_onboarding_completed(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(config_rpc::get_onboarding_completed().await?) })
}
-pub(super) fn handle_set_onboarding_completed(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_set_onboarding_completed(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<OnboardingCompletedSetParams>(params)?;
to_json(config_rpc::set_onboarding_completed(payload.value).await?)
diff --git a/crates/openhuman-core/src/config/workspace/schemas.rs b/crates/openhuman-core/src/config/workspace/schemas.rs
index c3b7ad0bd4..66105bde9e 100644
--- a/crates/openhuman-core/src/config/workspace/schemas.rs
+++ b/crates/openhuman-core/src/config/workspace/schemas.rs
@@ -115,7 +115,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_file_read(params: Map<String, Value>) -> ControllerFuture {
+fn handle_file_read(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let filename = read_required::<String>(&params, "filename")?;
@@ -129,7 +129,7 @@ fn handle_file_read(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_file_write(params: Map<String, Value>) -> ControllerFuture {
+fn handle_file_write(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let filename = read_required::<String>(&params, "filename")?;
@@ -148,7 +148,7 @@ fn handle_file_write(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_file_reset(params: Map<String, Value>) -> ControllerFuture {
+fn handle_file_reset(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let filename = read_required::<String>(&params, "filename")?;
diff --git a/crates/openhuman-core/src/core/subsystem/schemas.rs b/crates/openhuman-core/src/core/subsystem/schemas.rs
index c3510c75fd..72267773f0 100644
--- a/crates/openhuman-core/src/core/subsystem/schemas.rs
+++ b/crates/openhuman-core/src/core/subsystem/schemas.rs
@@ -81,7 +81,7 @@ pub async fn subsystems_status() -> Vec<SubsystemStatus> {
}
}
-fn handle_status(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let rows = subsystems_status().await;
log::debug!("[subsystem] status requested: {} slot(s)", rows.len());
diff --git a/crates/openhuman-core/src/cron/schemas.rs b/crates/openhuman-core/src/cron/schemas.rs
index 1943f7b6e8..19a2d0d1ed 100644
--- a/crates/openhuman-core/src/cron/schemas.rs
+++ b/crates/openhuman-core/src/cron/schemas.rs
@@ -281,7 +281,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_add(params: Map<String, Value>) -> ControllerFuture {
+fn handle_add(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
@@ -402,14 +402,14 @@ fn handle_add(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::cron::rpc::cron_list(&config).await?)
})
}
-fn handle_update(params: Map<String, Value>) -> ControllerFuture {
+fn handle_update(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let job_id = read_required::<String>(&params, "job_id")?;
@@ -418,7 +418,7 @@ fn handle_update(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_remove(params: Map<String, Value>) -> ControllerFuture {
+fn handle_remove(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let job_id = read_required::<String>(&params, "job_id")?;
@@ -426,7 +426,7 @@ fn handle_remove(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_run(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let job_id = read_required::<String>(&params, "job_id")?;
@@ -434,7 +434,7 @@ fn handle_run(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_runs(params: Map<String, Value>) -> ControllerFuture {
+fn handle_runs(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let job_id = read_required::<String>(&params, "job_id")?;
diff --git a/crates/openhuman-core/src/desktop/app_state/schemas.rs b/crates/openhuman-core/src/desktop/app_state/schemas.rs
index de8f7375ea..6eb5232c2e 100644
--- a/crates/openhuman-core/src/desktop/app_state/schemas.rs
+++ b/crates/openhuman-core/src/desktop/app_state/schemas.rs
@@ -92,7 +92,7 @@ pub fn app_state_schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_snapshot(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_snapshot(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
crate::desktop::app_state::snapshot()
.await?
@@ -100,7 +100,7 @@ fn handle_snapshot(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_update_local_state(params: Map<String, Value>) -> ControllerFuture {
+fn handle_update_local_state(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload: UpdateLocalStateParams = serde_json::from_value(Value::Object(params))
.map_err(|e| format!("invalid params: {e}"))?;
diff --git a/crates/openhuman-core/src/desktop/control/schemas.rs b/crates/openhuman-core/src/desktop/control/schemas.rs
index 55556d5389..8131c61ab9 100644
--- a/crates/openhuman-core/src/desktop/control/schemas.rs
+++ b/crates/openhuman-core/src/desktop/control/schemas.rs
@@ -75,7 +75,7 @@ fn schema(function: &'static str) -> ControllerSchema {
}
}
-fn status(_: Map<String, Value>) -> ControllerFuture {
+fn status(_ctx: DispatchCtx, _: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = crate::config::rpc::load_config_with_timeout()
.await
@@ -85,7 +85,7 @@ fn status(_: Map<String, Value>) -> ControllerFuture {
})
}
-fn set_enabled(params: Map<String, Value>) -> ControllerFuture {
+fn set_enabled(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let value = params
.get("enabled")
@@ -100,7 +100,7 @@ fn set_enabled(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn probe(_: Map<String, Value>) -> ControllerFuture {
+fn probe(_ctx: DispatchCtx, _: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = crate::config::rpc::load_config_with_timeout()
.await
@@ -110,7 +110,7 @@ fn probe(_: Map<String, Value>) -> ControllerFuture {
})
}
-fn pending(_: Map<String, Value>) -> ControllerFuture {
+fn pending(_ctx: DispatchCtx, _: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = crate::config::rpc::load_config_with_timeout()
.await
@@ -120,7 +120,7 @@ fn pending(_: Map<String, Value>) -> ControllerFuture {
})
}
-fn confirm(params: Map<String, Value>) -> ControllerFuture {
+fn confirm(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let id = params
.get("confirmation_id")
diff --git a/crates/openhuman-core/src/desktop/dashboard/schemas.rs b/crates/openhuman-core/src/desktop/dashboard/schemas.rs
index 76fc7075da..cc069d9bbf 100644
--- a/crates/openhuman-core/src/desktop/dashboard/schemas.rs
+++ b/crates/openhuman-core/src/desktop/dashboard/schemas.rs
@@ -162,7 +162,7 @@ fn model_health_config_fields() -> Vec<FieldSchema> {
]
}
-fn handle_dashboard_model_health(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_dashboard_model_health(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!("[dashboard] model_health request received");
let cfg = crate::config::rpc::load_config_with_timeout()
diff --git a/crates/openhuman-core/src/desktop/provider_surfaces/schemas.rs b/crates/openhuman-core/src/desktop/provider_surfaces/schemas.rs
index 50031458f4..08d6bb15b3 100644
--- a/crates/openhuman-core/src/desktop/provider_surfaces/schemas.rs
+++ b/crates/openhuman-core/src/desktop/provider_surfaces/schemas.rs
@@ -83,14 +83,14 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_ingest_event(params: Map<String, Value>) -> crate::core::all::ControllerFuture {
+fn handle_ingest_event(_ctx: DispatchCtx, params: Map<String, Value>) -> crate::core::all::ControllerFuture {
Box::pin(async move {
let payload: ProviderEvent = parse_params(params)?;
ops::ingest_event(payload).await?.into_cli_compatible_json()
})
}
-fn handle_list_queue(params: Map<String, Value>) -> crate::core::all::ControllerFuture {
+fn handle_list_queue(_ctx: DispatchCtx, params: Map<String, Value>) -> crate::core::all::ControllerFuture {
Box::pin(async move {
let payload: EmptyRequest = parse_params(params)?;
ops::list_queue(payload).await?.into_cli_compatible_json()
diff --git a/crates/openhuman-core/src/flows/schemas_handlers.rs b/crates/openhuman-core/src/flows/schemas_handlers.rs
index 737ce0e291..df892c19d9 100644
--- a/crates/openhuman-core/src/flows/schemas_handlers.rs
+++ b/crates/openhuman-core/src/flows/schemas_handlers.rs
@@ -1,4 +1,4 @@
-fn handle_create(params: Map<String, Value>) -> ControllerFuture {
+fn handle_create(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let name = read_required::<String>(&params, "name")?;
@@ -21,7 +21,7 @@ fn handle_create(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_validate(params: Map<String, Value>) -> ControllerFuture {
+fn handle_validate(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
// No config load: validation is pure (no persistence, no workspace).
let graph = read_required::<Value>(&params, "graph")?;
@@ -29,7 +29,7 @@ fn handle_validate(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_import(params: Map<String, Value>) -> ControllerFuture {
+fn handle_import(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
// No config load: import is pure (no persistence, no workspace).
let graph = read_required::<Value>(&params, "graph")?;
@@ -43,7 +43,7 @@ fn handle_import(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_duplicate(params: Map<String, Value>) -> ControllerFuture {
+fn handle_duplicate(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -51,7 +51,7 @@ fn handle_duplicate(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -59,21 +59,21 @@ fn handle_get(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::flows_list(&config).await?)
})
}
-fn handle_list_connections(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_connections(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::flows_list_connections(&config).await?)
})
}
-fn handle_update(params: Map<String, Value>) -> ControllerFuture {
+fn handle_update(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -115,7 +115,7 @@ fn handle_update(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_delete(params: Map<String, Value>) -> ControllerFuture {
+fn handle_delete(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -123,7 +123,7 @@ fn handle_delete(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_set_enabled(params: Map<String, Value>) -> ControllerFuture {
+fn handle_set_enabled(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -135,7 +135,7 @@ fn handle_set_enabled(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_run(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -154,7 +154,7 @@ fn handle_run(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_run_detached(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run_detached(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -197,7 +197,7 @@ fn read_declared_inputs(params: &Map<String, Value>) -> Result<Map<String, Value
}
}
-fn handle_resume(params: Map<String, Value>) -> ControllerFuture {
+fn handle_resume(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -224,7 +224,7 @@ fn handle_resume(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_cancel_run(params: Map<String, Value>) -> ControllerFuture {
+fn handle_cancel_run(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let run_id = read_required::<String>(&params, "run_id")?;
@@ -232,7 +232,7 @@ fn handle_cancel_run(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list_runs(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_runs(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -245,7 +245,7 @@ fn handle_list_runs(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list_all_runs(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_all_runs(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let limit = params
@@ -257,7 +257,7 @@ fn handle_list_all_runs(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get_run(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_run(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let run_id = read_required::<String>(&params, "run_id")?;
@@ -265,7 +265,7 @@ fn handle_get_run(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_prune_runs(params: Map<String, Value>) -> ControllerFuture {
+fn handle_prune_runs(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -273,7 +273,7 @@ fn handle_prune_runs(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_build(params: Map<String, Value>) -> ControllerFuture {
+fn handle_build(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
// Optional streaming target: when the copilot passes its chat `thread_id`
@@ -291,7 +291,7 @@ fn handle_build(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_build_cancel(params: Map<String, Value>) -> ControllerFuture {
+fn handle_build_cancel(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let thread_id = read_required::<String>(&params, "thread_id")?;
let request_id = params
@@ -302,7 +302,7 @@ fn handle_build_cancel(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_discover(params: Map<String, Value>) -> ControllerFuture {
+fn handle_discover(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
// Optional streaming target for the Flow Scout run (Phase B) — same
@@ -328,7 +328,7 @@ fn read_flow_stream_target(params: &Map<String, Value>) -> Option<ops::FlowStrea
ops::FlowStreamTarget::from_params(thread_id, request_id)
}
-fn handle_list_suggestions(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_suggestions(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let status = params
@@ -341,7 +341,7 @@ fn handle_list_suggestions(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_dismiss_suggestion(params: Map<String, Value>) -> ControllerFuture {
+fn handle_dismiss_suggestion(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -349,7 +349,7 @@ fn handle_dismiss_suggestion(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_mark_suggestion_built(params: Map<String, Value>) -> ControllerFuture {
+fn handle_mark_suggestion_built(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -357,7 +357,7 @@ fn handle_mark_suggestion_built(params: Map<String, Value>) -> ControllerFuture
})
}
-fn handle_required_connections(params: Map<String, Value>) -> ControllerFuture {
+fn handle_required_connections(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let graph = read_required::<Value>(&params, "graph")?;
@@ -365,7 +365,7 @@ fn handle_required_connections(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_approval_manifest(params: Map<String, Value>) -> ControllerFuture {
+fn handle_approval_manifest(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = params
@@ -378,7 +378,7 @@ fn handle_approval_manifest(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_search_tool_catalog(params: Map<String, Value>) -> ControllerFuture {
+fn handle_search_tool_catalog(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let query = read_required::<String>(&params, "query")?;
@@ -395,7 +395,7 @@ fn handle_search_tool_catalog(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get_tool_contract(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_tool_contract(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let slug = read_required::<String>(&params, "slug")?;
@@ -403,7 +403,7 @@ fn handle_get_tool_contract(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get_history(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_history(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -416,7 +416,7 @@ fn handle_get_history(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_rollback(params: Map<String, Value>) -> ControllerFuture {
+fn handle_rollback(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -432,7 +432,7 @@ fn handle_rollback(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_draft_create(params: Map<String, Value>) -> ControllerFuture {
+fn handle_draft_create(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let name = read_required::<String>(&params, "name")?;
@@ -453,7 +453,7 @@ fn handle_draft_create(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_draft_get(params: Map<String, Value>) -> ControllerFuture {
+fn handle_draft_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -461,7 +461,7 @@ fn handle_draft_get(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_draft_update(params: Map<String, Value>) -> ControllerFuture {
+fn handle_draft_update(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -484,14 +484,14 @@ fn handle_draft_update(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_draft_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_draft_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::flows_draft_list(&config)?)
})
}
-fn handle_draft_delete(params: Map<String, Value>) -> ControllerFuture {
+fn handle_draft_delete(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -499,7 +499,7 @@ fn handle_draft_delete(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_draft_promote(params: Map<String, Value>) -> ControllerFuture {
+fn handle_draft_promote(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
diff --git a/crates/openhuman-core/src/hooks/schemas.rs b/crates/openhuman-core/src/hooks/schemas.rs
index c02050ba07..2b6f8d1bb3 100644
--- a/crates/openhuman-core/src/hooks/schemas.rs
+++ b/crates/openhuman-core/src/hooks/schemas.rs
@@ -104,11 +104,11 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { Ok(describe(super::host::engine().snapshot().await.as_ref())) })
}
-fn handle_reload(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_reload(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
super::ops::init(&config).await;
@@ -116,7 +116,7 @@ fn handle_reload(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_test(params: Map<String, Value>) -> ControllerFuture {
+fn handle_test(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let event_name: String = read_required(&params, "event")?;
let event = HookEvent::parse(&event_name).ok_or_else(|| {
diff --git a/crates/openhuman-core/src/inference/embedding_host/schemas.rs b/crates/openhuman-core/src/inference/embedding_host/schemas.rs
index b5a6feabf3..bbcd8d6e7e 100644
--- a/crates/openhuman-core/src/inference/embedding_host/schemas.rs
+++ b/crates/openhuman-core/src/inference/embedding_host/schemas.rs
@@ -170,14 +170,14 @@ struct TestConnectionParams {
// ── Handlers ───────────────────────────────────────────────
-fn handle_get_settings(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_settings(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(super::rpc::get_settings(&config).await?)
})
}
-fn handle_update_settings(params: Map<String, Value>) -> ControllerFuture {
+fn handle_update_settings(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<UpdateSettingsParams>(params)?;
to_json(
@@ -193,7 +193,7 @@ fn handle_update_settings(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_set_api_key(params: Map<String, Value>) -> ControllerFuture {
+fn handle_set_api_key(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<SetApiKeyParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -201,7 +201,7 @@ fn handle_set_api_key(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_clear_api_key(params: Map<String, Value>) -> ControllerFuture {
+fn handle_clear_api_key(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<ClearApiKeyParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -209,7 +209,7 @@ fn handle_clear_api_key(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_embed(params: Map<String, Value>) -> ControllerFuture {
+fn handle_embed(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<EmbedParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -217,7 +217,7 @@ fn handle_embed(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_test_connection(params: Map<String, Value>) -> ControllerFuture {
+fn handle_test_connection(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<TestConnectionParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
diff --git a/crates/openhuman-core/src/inference/host_runtime/schemas.rs b/crates/openhuman-core/src/inference/host_runtime/schemas.rs
index 7ba08dc89c..c74d14b355 100644
--- a/crates/openhuman-core/src/inference/host_runtime/schemas.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/schemas.rs
@@ -222,7 +222,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_agent_chat(params: Map<String, Value>) -> ControllerFuture {
+fn handle_agent_chat(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<AgentChatParams>(params)?;
let mut config = config_rpc::load_config_with_timeout().await?;
@@ -249,7 +249,7 @@ fn handle_agent_chat(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_agent_chat_simple(params: Map<String, Value>) -> ControllerFuture {
+fn handle_agent_chat_simple(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<AgentChatParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -266,7 +266,7 @@ fn handle_agent_chat_simple(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_local_ai_transcribe(params: Map<String, Value>) -> ControllerFuture {
+fn handle_local_ai_transcribe(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<LocalAiTranscribeParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -277,7 +277,7 @@ fn handle_local_ai_transcribe(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_local_ai_transcribe_bytes(params: Map<String, Value>) -> ControllerFuture {
+fn handle_local_ai_transcribe_bytes(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<LocalAiTranscribeBytesParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -292,7 +292,7 @@ fn handle_local_ai_transcribe_bytes(params: Map<String, Value>) -> ControllerFut
})
}
-fn handle_local_ai_tts(params: Map<String, Value>) -> ControllerFuture {
+fn handle_local_ai_tts(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<LocalAiTtsParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -307,7 +307,7 @@ fn handle_local_ai_tts(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_local_ai_test_connection(params: Map<String, Value>) -> ControllerFuture {
+fn handle_local_ai_test_connection(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<LocalAiTestConnectionParams>(params)?;
let result = tinyinference_local::service::test_ollama_connection(&p.url).await?;
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 976131c600..fd6cdca34a 100644
--- a/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs
+++ b/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs
@@ -16,7 +16,7 @@ pub(super) struct InferenceClaudeCodeSetFullAccessParams {
enabled: bool,
}
-pub(super) fn handle_inference_claude_code_status(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_claude_code_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let status = tokio::task::spawn_blocking(
tinyagents_harness::providers::claude_code::version_check::probe,
@@ -27,7 +27,7 @@ pub(super) fn handle_inference_claude_code_status(_params: Map<String, Value>) -
})
}
-pub(super) fn handle_inference_claude_code_auth_status(
+pub(super) fn handle_inference_claude_code_auth_status(_ctx: DispatchCtx,
_params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
@@ -40,7 +40,7 @@ pub(super) fn handle_inference_claude_code_auth_status(
})
}
-pub(super) fn handle_inference_claude_code_settings(
+pub(super) fn handle_inference_claude_code_settings(_ctx: DispatchCtx,
_params: Map<String, Value>,
) -> ControllerFuture {
use tinyagents_harness::providers::claude_code::settings;
@@ -56,7 +56,7 @@ pub(super) fn handle_inference_claude_code_settings(
})
}
-pub(super) fn handle_inference_claude_code_set_full_access(
+pub(super) fn handle_inference_claude_code_set_full_access(_ctx: DispatchCtx,
params: Map<String, Value>,
) -> ControllerFuture {
use tinyagents_harness::providers::claude_code::settings;
diff --git a/crates/openhuman-core/src/inference/schemas/oauth_handlers.rs b/crates/openhuman-core/src/inference/schemas/oauth_handlers.rs
index 20afba3d17..cb587315ce 100644
--- a/crates/openhuman-core/src/inference/schemas/oauth_handlers.rs
+++ b/crates/openhuman-core/src/inference/schemas/oauth_handlers.rs
@@ -14,14 +14,14 @@ pub(super) struct InferenceOpenAiOAuthCompleteParams {
callback_url: String,
}
-pub(super) fn handle_inference_openai_oauth_start(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_openai_oauth_start(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::inference::rpc::inference_openai_oauth_start(&config).await?)
})
}
-pub(super) fn handle_inference_openai_oauth_complete(
+pub(super) fn handle_inference_openai_oauth_complete(_ctx: DispatchCtx,
params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
@@ -37,7 +37,7 @@ pub(super) fn handle_inference_openai_oauth_complete(
})
}
-pub(super) fn handle_inference_openai_oauth_import_codex_cli(
+pub(super) fn handle_inference_openai_oauth_import_codex_cli(_ctx: DispatchCtx,
_params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
@@ -46,7 +46,7 @@ pub(super) fn handle_inference_openai_oauth_import_codex_cli(
})
}
-pub(super) fn handle_inference_openai_oauth_status(
+pub(super) fn handle_inference_openai_oauth_status(_ctx: DispatchCtx,
_params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
@@ -55,7 +55,7 @@ pub(super) fn handle_inference_openai_oauth_status(
})
}
-pub(super) fn handle_inference_openai_oauth_disconnect(
+pub(super) fn handle_inference_openai_oauth_disconnect(_ctx: DispatchCtx,
_params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
diff --git a/crates/openhuman-core/src/inference/schemas/prompt_handlers.rs b/crates/openhuman-core/src/inference/schemas/prompt_handlers.rs
index eff8733a11..da89371efa 100644
--- a/crates/openhuman-core/src/inference/schemas/prompt_handlers.rs
+++ b/crates/openhuman-core/src/inference/schemas/prompt_handlers.rs
@@ -40,7 +40,7 @@ pub(super) struct InferenceAnalyzeSentimentParams {
message: String,
}
-pub(super) fn handle_inference_summarize(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_summarize(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<InferenceSummarizeParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -48,7 +48,7 @@ pub(super) fn handle_inference_summarize(params: Map<String, Value>) -> Controll
})
}
-pub(super) fn handle_inference_prompt(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_prompt(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<InferencePromptParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -59,7 +59,7 @@ pub(super) fn handle_inference_prompt(params: Map<String, Value>) -> ControllerF
})
}
-pub(super) fn handle_inference_vision_prompt(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_vision_prompt(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<InferenceVisionPromptParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -75,7 +75,7 @@ pub(super) fn handle_inference_vision_prompt(params: Map<String, Value>) -> Cont
})
}
-pub(super) fn handle_inference_test_provider_model(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_test_provider_model(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<InferenceTestChatModelParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -91,7 +91,7 @@ pub(super) fn handle_inference_test_provider_model(params: Map<String, Value>) -
})
}
-pub(super) fn handle_inference_analyze_sentiment(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_analyze_sentiment(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<InferenceAnalyzeSentimentParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
diff --git a/crates/openhuman-core/src/inference/schemas/settings_handlers.rs b/crates/openhuman-core/src/inference/schemas/settings_handlers.rs
index c9a8efde2c..609b0f0ffd 100644
--- a/crates/openhuman-core/src/inference/schemas/settings_handlers.rs
+++ b/crates/openhuman-core/src/inference/schemas/settings_handlers.rs
@@ -80,7 +80,7 @@ pub(super) struct InferenceListModelsParams {
provider_id: String,
}
-pub(super) fn handle_inference_resolve_model(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_resolve_model(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<InferenceResolveModelParams>(params)?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -100,18 +100,18 @@ pub(super) fn handle_inference_resolve_model(params: Map<String, Value>) -> Cont
})
}
-pub(super) fn handle_inference_status(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::inference::rpc::inference_status(&config).await?)
})
}
-pub(super) fn handle_inference_get_client_config(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_get_client_config(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { to_json(crate::inference::rpc::inference_get_client_config().await?) })
}
-pub(super) fn handle_inference_update_model_settings(
+pub(super) fn handle_inference_update_model_settings(_ctx: DispatchCtx,
params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
@@ -248,7 +248,7 @@ pub(super) fn handle_inference_update_model_settings(
})
}
-pub(super) fn handle_inference_update_local_settings(
+pub(super) fn handle_inference_update_local_settings(_ctx: DispatchCtx,
params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move {
@@ -273,20 +273,20 @@ pub(super) fn handle_inference_update_local_settings(
})
}
-pub(super) fn handle_inference_list_models(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_list_models(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let request = deserialize_params::<InferenceListModelsParams>(params)?;
to_json(crate::inference::rpc::inference_list_models(&request.provider_id).await?)
})
}
-pub(super) fn handle_inference_provider_auth_errors(
+pub(super) fn handle_inference_provider_auth_errors(_ctx: DispatchCtx,
_params: Map<String, Value>,
) -> ControllerFuture {
Box::pin(async move { to_json(crate::inference::rpc::inference_provider_auth_errors().await?) })
}
-pub(super) fn handle_inference_diagnostics(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_inference_diagnostics(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::inference::rpc::inference_diagnostics(&config).await?)
diff --git a/crates/openhuman-core/src/inference/tokenjuice/schemas.rs b/crates/openhuman-core/src/inference/tokenjuice/schemas.rs
index af292a312b..0919058f72 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/schemas.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/schemas.rs
@@ -281,7 +281,7 @@ fn str_param(params: &Map<String, Value>, key: &str) -> Option<String> {
params.get(key).and_then(Value::as_str).map(str::to_string)
}
-fn handle_detect(params: Map<String, Value>) -> ControllerFuture {
+fn handle_detect(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let content = str_param(&params, "content").ok_or("missing 'content'")?;
@@ -330,7 +330,7 @@ fn compress_hint_from_params(params: &Map<String, Value>) -> Result<ContentHint,
})
}
-fn handle_compress(params: Map<String, Value>) -> ControllerFuture {
+fn handle_compress(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let content = str_param(&params, "content").ok_or("missing 'content'")?;
@@ -349,7 +349,7 @@ fn handle_compress(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_cache_stats(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_cache_stats(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let stats = super::cache_stats().await?;
@@ -357,7 +357,7 @@ fn handle_cache_stats(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_retrieve(params: Map<String, Value>) -> ControllerFuture {
+fn handle_retrieve(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let token = str_param(&params, "token").ok_or("missing 'token'")?;
@@ -368,7 +368,7 @@ fn handle_retrieve(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_settings_get(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_settings_get(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let config = crate::config::rpc::load_config_with_timeout()
@@ -380,7 +380,7 @@ fn handle_settings_get(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_settings_update(params: Map<String, Value>) -> ControllerFuture {
+fn handle_settings_update(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
// Accept either {"patch": {...}} or a bare object of fields.
@@ -409,7 +409,7 @@ fn handle_settings_update(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_savings_stats(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_savings_stats(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let cache = super::cache_stats().await?;
@@ -428,7 +428,7 @@ fn handle_savings_stats(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_savings_reset(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_savings_reset(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let config = crate::config::rpc::load_config_with_timeout()
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 33f811b9b9..7073e73b1f 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_connections.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_connections.rs
@@ -11,35 +11,35 @@ use crate::integrations::composio::ops;
use super::util::{read_optional, read_required_non_empty, to_json};
-pub(super) fn handle_list_toolkits(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_toolkits(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::composio_list_toolkits(&config).await?)
})
}
-pub(super) fn handle_list_capabilities(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_capabilities(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::composio_list_capabilities(&config).await?)
})
}
-pub(super) fn handle_list_agent_ready_toolkits(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_agent_ready_toolkits(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::composio_list_agent_ready_toolkits(&config).await?)
})
}
-pub(super) fn handle_list_connections(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_connections(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::composio_list_connections(&config).await?)
})
}
-pub(super) fn handle_authorize(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_authorize(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let toolkit = read_required_non_empty(&params, "toolkit")?;
@@ -48,7 +48,7 @@ pub(super) fn handle_authorize(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_delete_connection(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_delete_connection(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let connection_id = read_required_non_empty(&params, "connection_id")?;
@@ -56,7 +56,7 @@ pub(super) fn handle_delete_connection(params: Map<String, Value>) -> Controller
})
}
-pub(super) fn handle_get_mode(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_mode(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
tracing::debug!("[composio-direct] rpc get_mode entry");
let config = config_rpc::load_config_with_timeout().await?;
@@ -64,7 +64,7 @@ pub(super) fn handle_get_mode(_params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_set_api_key(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_set_api_key(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
tracing::debug!("[composio-direct] rpc set_api_key entry");
let config = config_rpc::load_config_with_timeout().await?;
@@ -74,7 +74,7 @@ pub(super) fn handle_set_api_key(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_clear_api_key(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_clear_api_key(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
tracing::debug!("[composio-direct] rpc clear_api_key entry");
let config = config_rpc::load_config_with_timeout().await?;
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 b106663892..e002a55005 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs
@@ -10,7 +10,7 @@ use crate::integrations::composio::{contract, ops};
use super::util::{read_required, read_required_non_empty, to_json};
-pub(super) fn handle_get_user_profile(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_user_profile(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let connection_id = read_required_non_empty(&params, "connection_id")?;
@@ -18,14 +18,14 @@ pub(super) fn handle_get_user_profile(params: Map<String, Value>) -> ControllerF
})
}
-pub(super) fn handle_refresh_all_identities(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_refresh_all_identities(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::composio_refresh_all_identities(&config).await?)
})
}
-pub(super) fn handle_get_user_scopes(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_get_user_scopes(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let toolkit = match read_required_non_empty(&params, "toolkit") {
Ok(v) => v,
@@ -77,7 +77,7 @@ pub(super) fn handle_get_user_scopes(params: Map<String, Value>) -> ControllerFu
})
}
-pub(super) fn handle_set_user_scopes(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_set_user_scopes(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let toolkit = match read_required_non_empty(&params, "toolkit") {
Ok(v) => v,
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 5a0aa8930d..2067b511c1 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools.rs
@@ -8,7 +8,7 @@ use crate::integrations::composio::ops;
use super::util::{read_optional, read_required_non_empty, to_json};
-pub(super) fn handle_list_tools(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_tools(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let toolkits = read_optional::<Vec<String>>(&params, "toolkits")?;
@@ -17,7 +17,7 @@ pub(super) fn handle_list_tools(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_execute(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_execute(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let tool = read_required_non_empty(&params, "tool")?;
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 bd18b4d81e..65c3190909 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_triggers.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_triggers.rs
@@ -14,7 +14,7 @@ use super::params::{
};
use super::util::{read_required_non_empty, to_json};
-pub(super) fn handle_list_github_repos(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_github_repos(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload: ListGithubReposParams = serde_json::from_value(Value::Object(params))
@@ -23,7 +23,7 @@ pub(super) fn handle_list_github_repos(params: Map<String, Value>) -> Controller
})
}
-pub(super) fn handle_create_trigger(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_create_trigger(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload: CreateTriggerParams = serde_json::from_value(Value::Object(params))
@@ -44,7 +44,7 @@ pub(super) fn handle_create_trigger(params: Map<String, Value>) -> ControllerFut
})
}
-pub(super) fn handle_list_trigger_history(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_trigger_history(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload: TriggerHistoryParams = serde_json::from_value(Value::Object(params))
@@ -53,7 +53,7 @@ pub(super) fn handle_list_trigger_history(params: Map<String, Value>) -> Control
})
}
-pub(super) fn handle_list_available_triggers(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_available_triggers(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload: ListAvailableTriggersParams = serde_json::from_value(Value::Object(params))
@@ -68,7 +68,7 @@ pub(super) fn handle_list_available_triggers(params: Map<String, Value>) -> Cont
})
}
-pub(super) fn handle_list_triggers(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_triggers(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload: ListTriggersParams = serde_json::from_value(Value::Object(params))
@@ -77,7 +77,7 @@ pub(super) fn handle_list_triggers(params: Map<String, Value>) -> ControllerFutu
})
}
-pub(super) fn handle_enable_trigger(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_enable_trigger(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload: EnableTriggerParams = serde_json::from_value(Value::Object(params))
@@ -97,7 +97,7 @@ pub(super) fn handle_enable_trigger(params: Map<String, Value>) -> ControllerFut
})
}
-pub(super) fn handle_disable_trigger(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_disable_trigger(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let trigger_id = read_required_non_empty(&params, "trigger_id")?;
diff --git a/crates/openhuman-core/src/integrations/task_sources/schemas.rs b/crates/openhuman-core/src/integrations/task_sources/schemas.rs
index 69b8566392..7126d08b2f 100644
--- a/crates/openhuman-core/src/integrations/task_sources/schemas.rs
+++ b/crates/openhuman-core/src/integrations/task_sources/schemas.rs
@@ -406,14 +406,14 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::list(&config).await?)
})
}
-fn handle_get(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -421,7 +421,7 @@ fn handle_get(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_add(params: Map<String, Value>) -> ControllerFuture {
+fn handle_add(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let provider = read_provider(&params)?;
@@ -447,7 +447,7 @@ fn handle_add(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_update(params: Map<String, Value>) -> ControllerFuture {
+fn handle_update(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -456,7 +456,7 @@ fn handle_update(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_remove(params: Map<String, Value>) -> ControllerFuture {
+fn handle_remove(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -464,7 +464,7 @@ fn handle_remove(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_fetch(params: Map<String, Value>) -> ControllerFuture {
+fn handle_fetch(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -472,14 +472,14 @@ fn handle_fetch(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_sync(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_sync(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::sync(&config).await?)
})
}
-fn handle_list_tasks(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_tasks(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let id = read_required::<String>(&params, "id")?;
@@ -494,7 +494,7 @@ fn handle_list_tasks(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_preview_filter(params: Map<String, Value>) -> ControllerFuture {
+fn handle_preview_filter(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let provider = read_provider(&params)?;
@@ -505,7 +505,7 @@ fn handle_preview_filter(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list_databases(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_databases(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let provider = read_provider(&params)?;
@@ -514,7 +514,7 @@ fn handle_list_databases(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_status(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let config = config_rpc::load_config_with_timeout().await?;
to_json(ops::status(&config).await?)
diff --git a/crates/openhuman-core/src/mcp/audit/schemas.rs b/crates/openhuman-core/src/mcp/audit/schemas.rs
index 0b51e120db..038fc8c267 100644
--- a/crates/openhuman-core/src/mcp/audit/schemas.rs
+++ b/crates/openhuman-core/src/mcp/audit/schemas.rs
@@ -80,7 +80,7 @@ fn schema() -> ControllerSchema {
}
}
-fn handle_list(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!("[mcp_audit] handle_list enter params={params:?}");
log::trace!("[mcp_audit] handle_list loading config");
diff --git a/crates/openhuman-core/src/mcp/registry/schemas/handlers.rs b/crates/openhuman-core/src/mcp/registry/schemas/handlers.rs
index 1eaa69f345..0ce1cd6db1 100644
--- a/crates/openhuman-core/src/mcp/registry/schemas/handlers.rs
+++ b/crates/openhuman-core/src/mcp/registry/schemas/handlers.rs
@@ -12,7 +12,7 @@ use super::params::{
// ── Handler implementations ──────────────────────────────────────────────────
-pub(super) fn handle_registry_search(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_registry_search(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let query = read_optional_string(&params, "query")?;
@@ -28,7 +28,7 @@ pub(super) fn handle_registry_search(params: Map<String, Value>) -> ControllerFu
})
}
-pub(super) fn handle_registry_get(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_registry_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let qualified_name = read_required::<String>(&params, "qualified_name")?;
@@ -36,7 +36,7 @@ pub(super) fn handle_registry_get(params: Map<String, Value>) -> ControllerFutur
})
}
-pub(super) fn handle_installed_list(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_installed_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let _ = params;
let config = config_rpc::load_config_with_timeout().await?;
@@ -44,7 +44,7 @@ pub(super) fn handle_installed_list(params: Map<String, Value>) -> ControllerFut
})
}
-pub(super) fn handle_update_env(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_env(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let server_id = read_required::<String>(&params, "server_id")?;
@@ -53,7 +53,7 @@ pub(super) fn handle_update_env(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_uninstall(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_uninstall(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let server_id = read_required::<String>(&params, "server_id")?;
@@ -61,7 +61,7 @@ pub(super) fn handle_uninstall(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_detect_auth(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_detect_auth(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let server_id = read_required::<String>(&params, "server_id")?;
@@ -69,7 +69,7 @@ pub(super) fn handle_detect_auth(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_oauth_begin(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_oauth_begin(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let server_id = read_required::<String>(&params, "server_id")?;
@@ -77,7 +77,7 @@ pub(super) fn handle_oauth_begin(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_connect(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_connect(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let server_id = read_required::<String>(&params, "server_id")?;
@@ -85,7 +85,7 @@ pub(super) fn handle_connect(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_disconnect(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_disconnect(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let server_id = read_required::<String>(&params, "server_id")?;
@@ -93,7 +93,7 @@ pub(super) fn handle_disconnect(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_set_enabled(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_set_enabled(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let server_id = read_required::<String>(&params, "server_id")?;
@@ -104,7 +104,7 @@ pub(super) fn handle_set_enabled(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_status(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let _ = params;
let config = config_rpc::load_config_with_timeout().await?;
@@ -112,7 +112,7 @@ pub(super) fn handle_status(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_list_tools(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list_tools(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let server_id = read_required::<String>(&params, "server_id")?;
@@ -127,7 +127,7 @@ pub(super) fn handle_list_tools(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_tool_call(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_tool_call(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let server_id = read_required::<String>(&params, "server_id")?;
let tool_name = read_required::<String>(&params, "tool_name")?;
@@ -145,7 +145,7 @@ pub(super) fn handle_tool_call(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_config_get(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_config_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let _ = params;
let config = config_rpc::load_config_with_timeout().await?;
@@ -153,7 +153,7 @@ pub(super) fn handle_config_get(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_config_set(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_config_set(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
// The whole document is the parameter set: `{ "mcpServers": { … } }`
@@ -164,7 +164,7 @@ pub(super) fn handle_config_set(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_registry_settings_get(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_registry_settings_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let _ = params;
let config = config_rpc::load_config_with_timeout().await?;
@@ -172,7 +172,7 @@ pub(super) fn handle_registry_settings_get(params: Map<String, Value>) -> Contro
})
}
-pub(super) fn handle_registry_settings_set(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_registry_settings_set(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let smithery_api_key = read_optional::<String>(&params, "smithery_api_key")?;
let mcp_official_base = read_optional::<String>(&params, "mcp_official_base")?;
diff --git a/crates/openhuman-core/src/mcp/ui/schemas.rs b/crates/openhuman-core/src/mcp/ui/schemas.rs
index 826874fde1..5a7b4290bc 100644
--- a/crates/openhuman-core/src/mcp/ui/schemas.rs
+++ b/crates/openhuman-core/src/mcp/ui/schemas.rs
@@ -89,7 +89,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_resource_read(params: Map<String, Value>) -> ControllerFuture {
+fn handle_resource_read(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let server_id = read_optional::<String>(&params, "server_id")?;
let uri = read_optional::<String>(&params, "uri")?;
@@ -101,7 +101,7 @@ fn handle_resource_read(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_tool_call(params: Map<String, Value>) -> ControllerFuture {
+fn handle_tool_call(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let server_id = read_optional::<String>(&params, "server_id")?;
let tool_name = read_optional::<String>(&params, "tool_name")?;
diff --git a/crates/openhuman-core/src/memory/schemas/handlers.rs b/crates/openhuman-core/src/memory/schemas/handlers.rs
index 41b81b45c8..1a8932f007 100644
--- a/crates/openhuman-core/src/memory/schemas/handlers.rs
+++ b/crates/openhuman-core/src/memory/schemas/handlers.rs
@@ -44,7 +44,7 @@ async fn save(config: &Config) -> MemoryResult<()> {
.map_err(|error| MemoryError::Engine(format!("saving config failed: {error:#}")))
}
-pub(super) fn engines_list(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn engines_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
parse::<EmptyParams>(params)?;
to_json(ops::engines_list(&load().await?))
diff --git a/crates/openhuman-core/src/modules/schemas.rs b/crates/openhuman-core/src/modules/schemas.rs
index 93d385239d..fda9dd0599 100644
--- a/crates/openhuman-core/src/modules/schemas.rs
+++ b/crates/openhuman-core/src/modules/schemas.rs
@@ -199,7 +199,7 @@ fn readiness_error(detail: &str) -> String {
}
}
-fn handle_browser_check_readiness(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_browser_check_readiness(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let mut config = config_rpc::load_config_with_timeout().await?;
crate::core::runtime::components::require_config(&config, "computer")?;
@@ -238,7 +238,7 @@ fn handle_browser_check_readiness(_params: Map<String, Value>) -> ControllerFutu
})
}
-fn handle_browser_forget_sites(params: Map<String, Value>) -> ControllerFuture {
+fn handle_browser_forget_sites(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
// A blank or non-text site must not read as "every site".
let site = match params.get("site") {
@@ -265,7 +265,7 @@ fn handle_browser_forget_sites(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_computer_status(params: Map<String, Value>) -> ControllerFuture {
+fn handle_computer_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let load = params.get("load").and_then(Value::as_bool).unwrap_or(false);
let config = config_rpc::load_config_with_timeout().await?;
@@ -278,14 +278,14 @@ fn controller_value(value: impl serde::Serialize) -> Result<Value, String> {
serde_json::to_value(value).map_err(|error| error.to_string())
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
Ok(serde_json::json!({ "modules": ops::list(&config) }))
})
}
-fn handle_status(params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let id = string_param(&params, "id").ok_or("`id` is required")?;
let config = config_rpc::load_config_with_timeout().await?;
@@ -296,7 +296,7 @@ fn handle_status(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_load(params: Map<String, Value>) -> ControllerFuture {
+fn handle_load(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let id = string_param(&params, "id").ok_or("`id` is required")?;
let config = config_rpc::load_config_with_timeout().await?;
diff --git a/crates/openhuman-core/src/platform/about_app/schemas.rs b/crates/openhuman-core/src/platform/about_app/schemas.rs
index e1a79b6bf5..e5219400f8 100644
--- a/crates/openhuman-core/src/platform/about_app/schemas.rs
+++ b/crates/openhuman-core/src/platform/about_app/schemas.rs
@@ -103,7 +103,7 @@ pub fn about_app_schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_about_app_list(params: Map<String, Value>) -> ControllerFuture {
+fn handle_about_app_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<AboutAppListParams>(params)?;
let category = payload
@@ -117,7 +117,7 @@ fn handle_about_app_list(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_about_app_lookup(params: Map<String, Value>) -> ControllerFuture {
+fn handle_about_app_lookup(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<AboutAppLookupParams>(params)?;
tracing::debug!(id = %payload.id, "[about_app] lookup capability");
@@ -125,7 +125,7 @@ fn handle_about_app_lookup(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_about_app_search(params: Map<String, Value>) -> ControllerFuture {
+fn handle_about_app_search(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<AboutAppSearchParams>(params)?;
tracing::debug!(query = %payload.query, "[about_app] search capabilities");
diff --git a/crates/openhuman-core/src/platform/connectivity/schemas.rs b/crates/openhuman-core/src/platform/connectivity/schemas.rs
index 4db52a839f..2732a3e30f 100644
--- a/crates/openhuman-core/src/platform/connectivity/schemas.rs
+++ b/crates/openhuman-core/src/platform/connectivity/schemas.rs
@@ -54,7 +54,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_diag(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_diag(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { super::rpc::diag().await?.into_cli_compatible_json() })
}
diff --git a/crates/openhuman-core/src/platform/cost/schemas.rs b/crates/openhuman-core/src/platform/cost/schemas.rs
index def57d64c6..5c7391be13 100644
--- a/crates/openhuman-core/src/platform/cost/schemas.rs
+++ b/crates/openhuman-core/src/platform/cost/schemas.rs
@@ -223,7 +223,7 @@ fn new_correlation_id() -> String {
uuid::Uuid::new_v4().simple().to_string()[..8].to_string()
}
-fn handle_cost_get_dashboard(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_cost_get_dashboard(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "cost_rpc", "[cost_rpc][{cid}] cost_get_dashboard.entry");
@@ -241,7 +241,7 @@ fn handle_cost_get_dashboard(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_cost_get_daily_history(params: Map<String, Value>) -> ControllerFuture {
+fn handle_cost_get_daily_history(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "cost_rpc", "[cost_rpc][{cid}] cost_get_daily_history.entry");
@@ -273,7 +273,7 @@ fn handle_cost_get_daily_history(params: Map<String, Value>) -> ControllerFuture
})
}
-fn handle_cost_get_summary(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_cost_get_summary(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "cost_rpc", "[cost_rpc][{cid}] cost_get_summary.entry");
@@ -291,7 +291,7 @@ fn handle_cost_get_summary(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_cost_get_usage_log(params: Map<String, Value>) -> ControllerFuture {
+fn handle_cost_get_usage_log(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "cost_rpc", "[cost_rpc][{cid}] cost_get_usage_log.entry");
@@ -336,7 +336,7 @@ fn parse_report_params<T: serde::de::DeserializeOwned + Default>(
serde_json::from_value(Value::Object(params)).map_err(|e| format!("invalid params: {e}"))
}
-fn handle_cost_report(params: Map<String, Value>) -> ControllerFuture {
+fn handle_cost_report(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "cost_rpc", "[cost_rpc][{cid}] cost_report.entry");
@@ -349,7 +349,7 @@ fn handle_cost_report(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_cost_cache_report(params: Map<String, Value>) -> ControllerFuture {
+fn handle_cost_cache_report(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let cid = new_correlation_id();
log::debug!(target: "cost_rpc", "[cost_rpc][{cid}] cost_cache_report.entry");
diff --git a/crates/openhuman-core/src/platform/doctor/schemas.rs b/crates/openhuman-core/src/platform/doctor/schemas.rs
index 1ed670c7a8..b312cf2bfc 100644
--- a/crates/openhuman-core/src/platform/doctor/schemas.rs
+++ b/crates/openhuman-core/src/platform/doctor/schemas.rs
@@ -69,14 +69,14 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_report(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_report(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::platform::doctor::rpc::doctor_report(&config).await?)
})
}
-fn handle_models(params: Map<String, Value>) -> ControllerFuture {
+fn handle_models(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let use_cache = read_optional::<bool>(&params, "use_cache")?.unwrap_or(true);
diff --git a/crates/openhuman-core/src/platform/health/schemas.rs b/crates/openhuman-core/src/platform/health/schemas.rs
index 0ad0f50d87..f69f33f91e 100644
--- a/crates/openhuman-core/src/platform/health/schemas.rs
+++ b/crates/openhuman-core/src/platform/health/schemas.rs
@@ -89,11 +89,11 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_snapshot(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_snapshot(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(crate::platform::health::rpc::health_snapshot()) })
}
-fn handle_system_info(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_system_info(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(crate::platform::health::rpc::system_info()) })
}
diff --git a/crates/openhuman-core/src/platform/service/schemas.rs b/crates/openhuman-core/src/platform/service/schemas.rs
index 8f725370c1..188690ba19 100644
--- a/crates/openhuman-core/src/platform/service/schemas.rs
+++ b/crates/openhuman-core/src/platform/service/schemas.rs
@@ -174,7 +174,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_install(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_install(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::platform::service::rpc::service_install(&config).await?)
@@ -182,7 +182,7 @@ fn handle_install(_params: Map<String, Value>) -> ControllerFuture {
}
/// Service controller for `service.start`.
-fn handle_start(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_start(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::platform::service::rpc::service_start(&config).await?)
@@ -202,7 +202,7 @@ struct ServiceRestartParams {
/// Unlike install/start/stop/status, the restart action targets the currently
/// running core process itself, so it only needs restart metadata and not the
/// persisted service config.
-fn handle_restart(params: Map<String, Value>) -> ControllerFuture {
+fn handle_restart(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload: ServiceRestartParams =
serde_json::from_value(Value::Object(params)).map_err(|e| e.to_string())?;
@@ -215,7 +215,7 @@ fn handle_restart(params: Map<String, Value>) -> ControllerFuture {
/// Service controller for `service.shutdown`.
///
/// Uses the same `{source, reason}` shape as `service.restart`.
-fn handle_shutdown(params: Map<String, Value>) -> ControllerFuture {
+fn handle_shutdown(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload: ServiceRestartParams =
serde_json::from_value(Value::Object(params)).map_err(|e| e.to_string())?;
@@ -226,7 +226,7 @@ fn handle_shutdown(params: Map<String, Value>) -> ControllerFuture {
}
/// Service controller for `service.stop`.
-fn handle_stop(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_stop(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::platform::service::rpc::service_stop(&config).await?)
@@ -234,7 +234,7 @@ fn handle_stop(_params: Map<String, Value>) -> ControllerFuture {
}
/// Service controller for `service.status`.
-fn handle_status(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::platform::service::rpc::service_status(&config).await?)
@@ -242,7 +242,7 @@ fn handle_status(_params: Map<String, Value>) -> ControllerFuture {
}
/// Service controller for `service.uninstall`.
-fn handle_uninstall(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_uninstall(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::platform::service::rpc::service_uninstall(&config).await?)
@@ -255,7 +255,7 @@ struct DaemonHostSetParams {
}
/// Service controller for `service.daemon_host_get`.
-fn handle_daemon_host_get(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_daemon_host_get(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::platform::service::rpc::daemon_host_get(&config).await?)
@@ -263,7 +263,7 @@ fn handle_daemon_host_get(_params: Map<String, Value>) -> ControllerFuture {
}
/// Service controller for `service.daemon_host_set`.
-fn handle_daemon_host_set(params: Map<String, Value>) -> ControllerFuture {
+fn handle_daemon_host_set(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload: DaemonHostSetParams =
serde_json::from_value(Value::Object(params)).map_err(|e| e.to_string())?;
diff --git a/crates/openhuman-core/src/platform/socket/schemas.rs b/crates/openhuman-core/src/platform/socket/schemas.rs
index d8eacf4bfd..ea7fa7c7d5 100644
--- a/crates/openhuman-core/src/platform/socket/schemas.rs
+++ b/crates/openhuman-core/src/platform/socket/schemas.rs
@@ -183,7 +183,7 @@ fn status_slug(status: ConnectionStatus) -> String {
.unwrap_or_else(|| format!("{status:?}").to_lowercase())
}
-fn handle_connect(params: Map<String, Value>) -> ControllerFuture {
+fn handle_connect(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let mgr = require_manager()?;
let url = params
@@ -200,7 +200,7 @@ fn handle_connect(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_disconnect(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_disconnect(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let mgr = require_manager()?;
let state = super::ops::disconnect(mgr).await?;
@@ -208,7 +208,7 @@ fn handle_disconnect(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_state(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_state(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let mgr = require_manager()?;
let state = mgr.get_state();
@@ -217,7 +217,7 @@ fn handle_state(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_emit(params: Map<String, Value>) -> ControllerFuture {
+fn handle_emit(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let mgr = require_manager()?;
let event = params
@@ -232,7 +232,7 @@ fn handle_emit(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_connect_with_session(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_connect_with_session(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let mgr = require_manager()?;
let state = super::ops::connect_with_session(mgr).await?;
diff --git a/crates/openhuman-core/src/platform/update/schemas.rs b/crates/openhuman-core/src/platform/update/schemas.rs
index 5f6d5bce10..abbdb9c8f8 100644
--- a/crates/openhuman-core/src/platform/update/schemas.rs
+++ b/crates/openhuman-core/src/platform/update/schemas.rs
@@ -121,19 +121,19 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_version(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_version(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(crate::platform::update::rpc::update_version().await) })
}
-fn handle_check(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_check(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(crate::platform::update::rpc::update_check().await) })
}
-fn handle_run(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_run(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(crate::platform::update::rpc::update_run().await) })
}
-fn handle_apply(params: Map<String, Value>) -> ControllerFuture {
+fn handle_apply(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let download_url = params
.get("download_url")
diff --git a/crates/openhuman-core/src/profiles/schemas.rs b/crates/openhuman-core/src/profiles/schemas.rs
index caef204cb7..24fe25deb8 100644
--- a/crates/openhuman-core/src/profiles/schemas.rs
+++ b/crates/openhuman-core/src/profiles/schemas.rs
@@ -188,32 +188,32 @@ pub fn profiles_schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_provision(params: Map<String, Value>) -> ControllerFuture {
+fn handle_provision(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<UserParams>(params)?;
to_json(super::ops::provision(&payload.user_id).await?)
})
}
-fn handle_deprovision(params: Map<String, Value>) -> ControllerFuture {
+fn handle_deprovision(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<ProfileParams>(params)?;
to_json(super::ops::deprovision(&payload.profile_id).await?)
})
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { to_json(super::ops::list().await?) })
}
-fn handle_status(params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<ProfileParams>(params)?;
to_json(super::ops::status(&payload.profile_id).await?)
})
}
-fn handle_set_credential(params: Map<String, Value>) -> ControllerFuture {
+fn handle_set_credential(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<CredentialParams>(params)?;
to_json(
@@ -228,14 +228,14 @@ fn handle_set_credential(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_clear_credential(params: Map<String, Value>) -> ControllerFuture {
+fn handle_clear_credential(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<ProfileParams>(params)?;
to_json(super::ops::clear_credential(&payload.profile_id).await?)
})
}
-fn handle_release(params: Map<String, Value>) -> ControllerFuture {
+fn handle_release(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<ProfileParams>(params)?;
to_json(super::ops::release(&payload.profile_id).await?)
diff --git a/crates/openhuman-core/src/sandbox/schemas.rs b/crates/openhuman-core/src/sandbox/schemas.rs
index 11ac28af6d..c3299cf9a0 100644
--- a/crates/openhuman-core/src/sandbox/schemas.rs
+++ b/crates/openhuman-core/src/sandbox/schemas.rs
@@ -167,7 +167,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
/// requested name — so `backend:"docker"` on a native-config host reports Local,
/// matching what a real session on that host would run. Reporting the requested
/// backend instead was the conflation fixed in #6081.
-fn handle_status(params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let backend_str = params
@@ -224,7 +224,7 @@ fn handle_status(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_resolve_policy(params: Map<String, Value>) -> ControllerFuture {
+fn handle_resolve_policy(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let mode_str = params
@@ -283,7 +283,7 @@ fn handle_resolve_policy(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_cleanup_orphans(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_cleanup_orphans(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
gate()?;
let config = match crate::config::ops::load_config_with_timeout().await {
@@ -300,7 +300,7 @@ fn handle_cleanup_orphans(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_validate_policy(params: Map<String, Value>) -> ControllerFuture {
+fn handle_validate_policy(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate()?;
let policy_val = params.get("policy").cloned().unwrap_or(Value::Null);
diff --git a/crates/openhuman-core/src/security/approval/schemas.rs b/crates/openhuman-core/src/security/approval/schemas.rs
index b040ecafc5..537295d05c 100644
--- a/crates/openhuman-core/src/security/approval/schemas.rs
+++ b/crates/openhuman-core/src/security/approval/schemas.rs
@@ -179,7 +179,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_list_pending(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_pending(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let agent_id = read_optional_string(&params, "agent_id")?;
let outcome = approval_rpc::approval_list_pending(agent_id.as_deref())
@@ -189,7 +189,7 @@ fn handle_list_pending(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list_recent_decisions(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_recent_decisions(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let limit = read_optional_u64(&params, "limit")?.map(|value| value as usize);
let outcome = approval_rpc::approval_list_recent_decisions(limit)
@@ -199,7 +199,7 @@ fn handle_list_recent_decisions(params: Map<String, Value>) -> ControllerFuture
})
}
-fn handle_get_gate_state(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_get_gate_state(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let outcome = approval_rpc::approval_get_gate_state()
.await
@@ -208,7 +208,7 @@ fn handle_get_gate_state(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_decide(params: Map<String, Value>) -> ControllerFuture {
+fn handle_decide(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let request_id = read_required_string(&params, "request_id")?;
let decision_str = read_required_string(&params, "decision")?;
@@ -227,7 +227,7 @@ fn handle_decide(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_preauthorize_flow(params: Map<String, Value>) -> ControllerFuture {
+fn handle_preauthorize_flow(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let flow_id = read_required_string(&params, "flow_id")?;
let tool_names = match params.get("tool_names") {
diff --git a/crates/openhuman-core/src/security/credentials/schemas.rs b/crates/openhuman-core/src/security/credentials/schemas.rs
index 0aa53711ee..9185b79124 100644
--- a/crates/openhuman-core/src/security/credentials/schemas.rs
+++ b/crates/openhuman-core/src/security/credentials/schemas.rs
@@ -192,7 +192,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_auth_set_credential(params: Map<String, Value>) -> ControllerFuture {
+fn handle_auth_set_credential(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload =
@@ -201,7 +201,7 @@ fn handle_auth_set_credential(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_auth_clear_credential(params: Map<String, Value>) -> ControllerFuture {
+fn handle_auth_clear_credential(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload = deserialize_params::<AuthClearCredentialParams>(params)?;
@@ -221,21 +221,21 @@ fn handle_auth_clear_credential(params: Map<String, Value>) -> ControllerFuture
})
}
-fn handle_auth_get_state(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_auth_get_state(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::security::credentials::rpc::auth_get_state(&config).await?)
})
}
-fn handle_auth_get_session_token(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_auth_get_session_token(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::security::credentials::rpc::auth_get_session_token_json(&config).await?)
})
}
-fn handle_auth_store_provider_credentials(params: Map<String, Value>) -> ControllerFuture {
+fn handle_auth_store_provider_credentials(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload = deserialize_params::<AuthStoreProviderCredentialsParams>(params)?;
@@ -253,7 +253,7 @@ fn handle_auth_store_provider_credentials(params: Map<String, Value>) -> Control
})
}
-fn handle_auth_remove_provider_credentials(params: Map<String, Value>) -> ControllerFuture {
+fn handle_auth_remove_provider_credentials(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload = deserialize_params::<AuthRemoveProviderCredentialsParams>(params)?;
@@ -268,7 +268,7 @@ fn handle_auth_remove_provider_credentials(params: Map<String, Value>) -> Contro
})
}
-fn handle_auth_list_provider_credentials(params: Map<String, Value>) -> ControllerFuture {
+fn handle_auth_list_provider_credentials(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let payload = if params.is_empty() {
diff --git a/crates/openhuman-core/src/security/devices/schemas.rs b/crates/openhuman-core/src/security/devices/schemas.rs
index a8d1c17981..c26185c57c 100644
--- a/crates/openhuman-core/src/security/devices/schemas.rs
+++ b/crates/openhuman-core/src/security/devices/schemas.rs
@@ -149,7 +149,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
// Handler bridges
// ---------------------------------------------------------------------------
-fn handle_create_pairing(params: Map<String, Value>) -> ControllerFuture {
+fn handle_create_pairing(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let label = read_optional_string(&params, "label")?;
@@ -157,14 +157,14 @@ fn handle_create_pairing(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
to_json(crate::security::devices::rpc::devices_list(&config).await?)
})
}
-fn handle_revoke(params: Map<String, Value>) -> ControllerFuture {
+fn handle_revoke(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let channel_id = read_required::<String>(&params, "channel_id")?;
diff --git a/crates/openhuman-core/src/security/encryption/schemas.rs b/crates/openhuman-core/src/security/encryption/schemas.rs
index 23c3dac89c..5e5c9e3cc6 100644
--- a/crates/openhuman-core/src/security/encryption/schemas.rs
+++ b/crates/openhuman-core/src/security/encryption/schemas.rs
@@ -74,7 +74,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_encrypt_secret(params: Map<String, Value>) -> ControllerFuture {
+fn handle_encrypt_secret(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let plaintext = read_required::<String>(&params, "plaintext")?;
@@ -82,7 +82,7 @@ fn handle_encrypt_secret(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_decrypt_secret(params: Map<String, Value>) -> ControllerFuture {
+fn handle_decrypt_secret(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let ciphertext = read_required::<String>(&params, "ciphertext")?;
diff --git a/crates/openhuman-core/src/security/keyring_consent/schemas.rs b/crates/openhuman-core/src/security/keyring_consent/schemas.rs
index fd76919a18..07d341ac6f 100644
--- a/crates/openhuman-core/src/security/keyring_consent/schemas.rs
+++ b/crates/openhuman-core/src/security/keyring_consent/schemas.rs
@@ -88,7 +88,7 @@ fn keyring_consent_schema(function: &str) -> ControllerSchema {
}
}
-fn handle_status(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
super::ops::keyring_status()
.await?
@@ -96,7 +96,7 @@ fn handle_status(_params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_decide(params: Map<String, Value>) -> ControllerFuture {
+fn handle_decide(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let mode = params
.get("mode")
@@ -109,7 +109,7 @@ fn handle_decide(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_retry_probe(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_retry_probe(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
super::ops::keyring_retry_probe()
.await?
diff --git a/crates/openhuman-core/src/security/schemas.rs b/crates/openhuman-core/src/security/schemas.rs
index 461f1c17e0..26cca69a2b 100644
--- a/crates/openhuman-core/src/security/schemas.rs
+++ b/crates/openhuman-core/src/security/schemas.rs
@@ -39,7 +39,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_policy_info(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_policy_info(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
log::debug!("[security][rpc] policy_info enter");
match crate::security::rpc::load_and_get_security_policy_info().await {
diff --git a/crates/openhuman-core/src/skills/catalog/schemas/handlers.rs b/crates/openhuman-core/src/skills/catalog/schemas/handlers.rs
index 4bae8763db..7d194cb758 100644
--- a/crates/openhuman-core/src/skills/catalog/schemas/handlers.rs
+++ b/crates/openhuman-core/src/skills/catalog/schemas/handlers.rs
@@ -50,15 +50,15 @@ async fn catalog(method: &'static str, params: Map<String, Value>) -> Result<Val
to_json(Outcome::new(page, Vec::new()))
}
-pub(super) fn handle_browse(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_browse(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(catalog("browse", params))
}
-pub(super) fn handle_search(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_search(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(catalog("search", params))
}
-pub(super) fn handle_sources(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_sources(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let _ = params;
let facets = ops::catalog_facets().await.map_err(registry_error)?;
@@ -73,7 +73,7 @@ pub(super) fn handle_sources(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_categories(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_categories(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let _ = params;
let facets = ops::catalog_facets().await.map_err(registry_error)?;
@@ -88,7 +88,7 @@ pub(super) fn handle_categories(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_detail(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_detail(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<EntryParams>(params)?;
tracing::debug!(entry_id = %p.entry_id, "[skill_registry][rpc] detail");
@@ -99,7 +99,7 @@ pub(super) fn handle_detail(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_install(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_install(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<InstallParams>(params)?;
tracing::info!(
@@ -126,7 +126,7 @@ pub(super) fn handle_install(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_schemas(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_schemas(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let _ = params;
to_json(Outcome::new(
@@ -138,7 +138,7 @@ pub(super) fn handle_schemas(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_uninstall(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_uninstall(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<UninstallParams>(params)?;
tracing::info!(
diff --git a/crates/openhuman-core/src/skills/runtime/schemas.rs b/crates/openhuman-core/src/skills/runtime/schemas.rs
index c4d31516d0..9c138a4549 100644
--- a/crates/openhuman-core/src/skills/runtime/schemas.rs
+++ b/crates/openhuman-core/src/skills/runtime/schemas.rs
@@ -263,7 +263,7 @@ pub fn skill_runtime_schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_run(params: Map<String, Value>) -> ControllerFuture {
+fn handle_run(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<RunParams>(params)?;
tracing::info!(skill_id = %payload.skill_id, "[skill_runtime][rpc] run");
@@ -286,7 +286,7 @@ fn handle_run(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_cancel(params: Map<String, Value>) -> ControllerFuture {
+fn handle_cancel(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<CancelParams>(params)?;
let cancelled = run_log::cancel_run(&payload.run_id);
@@ -298,7 +298,7 @@ fn handle_cancel(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_recent_runs(params: Map<String, Value>) -> ControllerFuture {
+fn handle_recent_runs(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<RecentRunsParams>(params)?;
let limit = payload.limit.unwrap_or(20).min(100) as usize;
@@ -317,7 +317,7 @@ fn handle_recent_runs(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_read_run_log(params: Map<String, Value>) -> ControllerFuture {
+fn handle_read_run_log(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<ReadRunLogParams>(params)?;
let workspace = resolve_workspace_dir().await;
@@ -335,7 +335,7 @@ fn handle_read_run_log(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_resolve_runtimes(params: Map<String, Value>) -> ControllerFuture {
+fn handle_resolve_runtimes(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<ResolveRuntimesParams>(params)?;
let requirement = RuntimeRequirement::from_optional(payload.runtime.as_deref())?;
@@ -347,7 +347,7 @@ fn handle_resolve_runtimes(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_schemas(params: Map<String, Value>) -> ControllerFuture {
+fn handle_schemas(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let _ = params;
to_json(Outcome::new(
diff --git a/crates/openhuman-core/src/skills/schemas/handlers.rs b/crates/openhuman-core/src/skills/schemas/handlers.rs
index c9d8348b0c..e1b80ee8ba 100644
--- a/crates/openhuman-core/src/skills/schemas/handlers.rs
+++ b/crates/openhuman-core/src/skills/schemas/handlers.rs
@@ -30,7 +30,7 @@ use super::wire_types::{
WorkflowsRunParams, WorkflowsUninstallResult,
};
-pub(super) fn handle_skills_list(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let params = deserialize_params::<WorkflowsListParams>(params)?;
let include_skills = params.include_skills;
@@ -73,7 +73,7 @@ pub(super) fn handle_skills_list(params: Map<String, Value>) -> ControllerFuture
/// predates `[[inputs]]`); on the user picking one we fetch the full
/// `WorkflowDefinition` (which carries inputs) and project the small,
/// FE-shaped subset they need.
-pub(super) fn handle_skills_describe(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_describe(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkflowsDescribeParams>(params)?;
let workspace = resolve_workspace_dir().await;
@@ -111,7 +111,7 @@ pub(super) fn handle_skills_describe(params: Map<String, Value>) -> ControllerFu
/// FE Skills Runner panel uses this to render the streaming log inline
/// when the user clicks a Recent Runs row, and tails it every 2s while
/// `complete` is false.
-pub(super) fn handle_skills_read_run_log(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_read_run_log(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkflowsReadRunLogParams>(params)?;
let workspace = resolve_workspace_dir().await;
@@ -133,7 +133,7 @@ pub(super) fn handle_skills_read_run_log(params: Map<String, Value>) -> Controll
/// (most-recent first), optionally filtered to one skill, capped by `limit`.
/// Powers the Skills Runner panel's "Recent runs" section + future live-log
/// tail. Delegates the actual scan + parse to `run_log::scan_runs`.
-pub(super) fn handle_skills_recent_runs(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_recent_runs(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkflowsRecentRunsParams>(params)?;
let limit = payload.limit.unwrap_or(20).min(100) as usize;
@@ -149,7 +149,7 @@ pub(super) fn handle_skills_recent_runs(params: Map<String, Value>) -> Controlle
})
}
-pub(super) fn handle_skills_run(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_run(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkflowsRunParams>(params)?;
let origin = crate::agent::turn_origin::current()
@@ -179,7 +179,7 @@ pub(super) fn handle_skills_run(params: Map<String, Value>) -> ControllerFuture
/// Fires the run's cancellation token; the run stops at its next await and
/// writes a `CANCELLED` footer. Returns `cancelled: false` when the run id is
/// unknown (already finished or never existed).
-pub(super) fn handle_skills_cancel(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_cancel(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkflowsCancelParams>(params)?;
let cancelled = run_log::cancel_run(&payload.run_id);
@@ -191,7 +191,7 @@ pub(super) fn handle_skills_cancel(params: Map<String, Value>) -> ControllerFutu
})
}
-pub(super) fn handle_skills_read_resource(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_read_resource(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkflowsReadResourceParams>(params)?;
tracing::debug!(
@@ -225,7 +225,7 @@ pub(super) fn handle_skills_read_resource(params: Map<String, Value>) -> Control
})
}
-pub(super) fn handle_skills_create(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_create(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkflowsCreateParams>(params)?;
tracing::debug!(
@@ -259,7 +259,7 @@ pub(super) fn handle_skills_create(params: Map<String, Value>) -> ControllerFutu
/// `openhuman.skills_update` — edit an existing workflow. Same payload as
/// create, but overwrites the workflow at the resolved slug (frontmatter +
/// workflow.toml rewritten; the hand-authored body is preserved).
-pub(super) fn handle_skills_update(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_update(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WorkflowsCreateParams>(params)?;
tracing::debug!(
@@ -285,7 +285,7 @@ pub(super) fn handle_skills_update(params: Map<String, Value>) -> ControllerFutu
})
}
-pub(super) fn handle_skills_install_from_url(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_install_from_url(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let wire = deserialize_params::<WorkflowsInstallFromUrlParamsWire>(params)?;
tracing::debug!(
@@ -318,7 +318,7 @@ pub(super) fn handle_skills_install_from_url(params: Map<String, Value>) -> Cont
})
}
-pub(super) fn handle_skills_uninstall(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_skills_uninstall(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<UninstallWorkflowParams>(params)?;
tracing::debug!(name = %payload.name, "[skills][rpc] uninstall");
diff --git a/crates/openhuman-core/src/skills/webhooks/schemas.rs b/crates/openhuman-core/src/skills/webhooks/schemas.rs
index 8cb69a2ad4..ad736f659d 100644
--- a/crates/openhuman-core/src/skills/webhooks/schemas.rs
+++ b/crates/openhuman-core/src/skills/webhooks/schemas.rs
@@ -237,22 +237,22 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_list_registrations(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_registrations(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(crate::skills::webhooks::ops::list_registrations().await?) })
}
-fn handle_list_logs(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list_logs(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WebhookListLogsParams>(params)?;
to_json(crate::skills::webhooks::ops::list_logs(payload.limit).await?)
})
}
-fn handle_clear_logs(_params: Map<String, Value>) -> ControllerFuture {
+fn handle_clear_logs(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async { to_json(crate::skills::webhooks::ops::clear_logs().await?) })
}
-fn handle_register_echo(params: Map<String, Value>) -> ControllerFuture {
+fn handle_register_echo(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WebhookRegisterEchoParams>(params)?;
to_json(
@@ -266,14 +266,14 @@ fn handle_register_echo(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_unregister_echo(params: Map<String, Value>) -> ControllerFuture {
+fn handle_unregister_echo(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WebhookUnregisterEchoParams>(params)?;
to_json(crate::skills::webhooks::ops::unregister_echo(&payload.tunnel_uuid).await?)
})
}
-fn handle_register_agent(params: Map<String, Value>) -> ControllerFuture {
+fn handle_register_agent(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WebhookRegisterAgentParams>(params)?;
to_json(
@@ -288,7 +288,7 @@ fn handle_register_agent(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_trigger_agent(params: Map<String, Value>) -> ControllerFuture {
+fn handle_trigger_agent(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let payload = deserialize_params::<WebhookTriggerAgentParams>(params)?;
let source = payload.source.as_deref().unwrap_or("external");
diff --git a/crates/openhuman-core/src/threads/schemas/handlers.rs b/crates/openhuman-core/src/threads/schemas/handlers.rs
index 1b0c388a59..5dcfb231ca 100644
--- a/crates/openhuman-core/src/threads/schemas/handlers.rs
+++ b/crates/openhuman-core/src/threads/schemas/handlers.rs
@@ -17,11 +17,11 @@ use crate::threads::{
use super::super::ops;
-pub(super) fn handle_list(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { to_json(ops::threads_list(EmptyRequest {}).await?) })
}
-pub(super) fn handle_upsert(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_upsert(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<UpsertConversationThreadRequest>(params)?;
// A SaaS user picks thread ids for their own threads only; reserved
@@ -34,7 +34,7 @@ pub(super) fn handle_upsert(params: Map<String, Value>) -> ControllerFuture {
})
}
-pub(super) fn handle_create_new(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_create_new(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<CreateConversationThreadRequest>(params)?;
// A SaaS user acts only in their own sandbox; a caller-chosen working
@@ -44,141 +44,141 @@ pub(super) fn handle_create_new(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_messages_list(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_messages_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ConversationMessagesRequest>(params)?;
to_json(ops::messages_list(p).await?)
})
}
-pub(super) fn handle_message_append(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_message_append(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<AppendConversationMessageRequest>(params)?;
to_json(ops::message_append(p).await?)
})
}
-pub(super) fn handle_generate_title(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_generate_title(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<GenerateConversationThreadTitleRequest>(params)?;
to_json(ops::thread_generate_title(p).await?)
})
}
-pub(super) fn handle_update_labels(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_labels(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<UpdateConversationThreadLabelsRequest>(params)?;
to_json(ops::thread_update_labels(p).await?)
})
}
-pub(super) fn handle_update_title(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_title(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<UpdateConversationThreadTitleRequest>(params)?;
to_json(ops::thread_update_title(p).await?)
})
}
-pub(super) fn handle_update_working_dir(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_update_working_dir(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<UpdateConversationThreadWorkingDirRequest>(params)?;
to_json(ops::thread_update_working_dir(p).await?)
})
}
-pub(super) fn handle_message_update(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_message_update(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<UpdateConversationMessageRequest>(params)?;
to_json(ops::message_update(p).await?)
})
}
-pub(super) fn handle_delete(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_delete(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<DeleteConversationThreadRequest>(params)?;
to_json(ops::thread_delete(p).await?)
})
}
-pub(super) fn handle_purge(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_purge(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { to_json(ops::threads_purge(EmptyRequest {}).await?) })
}
-pub(super) fn handle_turn_state_get(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_turn_state_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<GetTurnStateRequest>(params)?;
to_json(ops::turn_state_get(p).await?)
})
}
-pub(super) fn handle_turn_state_list(_params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_turn_state_list(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move { to_json(ops::turn_state_list(EmptyRequest {}).await?) })
}
-pub(super) fn handle_turn_state_history(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_turn_state_history(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<GetTurnStateRequest>(params)?;
to_json(ops::turn_state_history(p).await?)
})
}
-pub(super) fn handle_turn_state_get_turn(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_turn_state_get_turn(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<GetTurnStateForRequestRequest>(params)?;
to_json(ops::turn_state_get_turn(p).await?)
})
}
-pub(super) fn handle_turn_state_clear(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_turn_state_clear(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ClearTurnStateRequest>(params)?;
to_json(ops::turn_state_clear(p).await?)
})
}
-pub(super) fn handle_token_usage(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_token_usage(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ops::ThreadTokenUsageRequest>(params)?;
to_json(ops::token_usage(p).await?)
})
}
-pub(super) fn handle_transcript_get(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_transcript_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ops::TranscriptGetRequest>(params)?;
to_json(ops::transcript_get(p).await?)
})
}
-pub(super) fn handle_goal_get(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_goal_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ops::ThreadLiveStateRequest>(params)?;
to_json(ops::goal_get(p).await?)
})
}
-pub(super) fn handle_todos_get(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_todos_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ops::ThreadLiveStateRequest>(params)?;
to_json(ops::todos_get(p).await?)
})
}
-pub(super) fn handle_search(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_search(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ops::ThreadSearchRequest>(params)?;
to_json(ops::thread_search(p).await?)
})
}
-pub(super) fn handle_edit_message(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_edit_message(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ops::EditMessageRequest>(params)?;
to_json(ops::edit_message(p).await.map_err(|e| e.to_string())?)
})
}
-pub(super) fn handle_regenerate(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_regenerate(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = parse::<ops::RegenerateRequest>(params)?;
to_json(ops::regenerate(p).await.map_err(|e| e.to_string())?)
diff --git a/crates/openhuman-core/src/tools/registry/schemas.rs b/crates/openhuman-core/src/tools/registry/schemas.rs
index 0700f7e758..fa03960f73 100644
--- a/crates/openhuman-core/src/tools/registry/schemas.rs
+++ b/crates/openhuman-core/src/tools/registry/schemas.rs
@@ -86,7 +86,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_list(params: Map<String, Value>) -> ControllerFuture {
+fn handle_list(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!(
"[tool_registry] rpc list requested param_count={}",
@@ -96,7 +96,7 @@ fn handle_list(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_get(params: Map<String, Value>) -> ControllerFuture {
+fn handle_get(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let tool_id = required_tool_id(&params)?;
log::debug!("[tool_registry] rpc get requested tool_id={tool_id}");
@@ -104,7 +104,7 @@ fn handle_get(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_diagnostics(params: Map<String, Value>) -> ControllerFuture {
+fn handle_diagnostics(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
log::debug!(
"[tool_registry] rpc diagnostics requested param_count={}",
diff --git a/crates/openhuman-core/src/tools/schemas/composio.rs b/crates/openhuman-core/src/tools/schemas/composio.rs
index 1877237f3c..ec0481730c 100644
--- a/crates/openhuman-core/src/tools/schemas/composio.rs
+++ b/crates/openhuman-core/src/tools/schemas/composio.rs
@@ -6,7 +6,7 @@ use crate::config::rpc as config_rpc;
use crate::core::all::ControllerFuture;
use crate::core::Outcome;
-pub(super) fn handle_composio_execute(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_composio_execute(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let action = params
.get("action")
diff --git a/crates/openhuman-core/src/tools/schemas/web_search.rs b/crates/openhuman-core/src/tools/schemas/web_search.rs
index db45c39362..9ca4c89297 100644
--- a/crates/openhuman-core/src/tools/schemas/web_search.rs
+++ b/crates/openhuman-core/src/tools/schemas/web_search.rs
@@ -150,14 +150,14 @@ fn search_arguments(params: &Map<String, Value>, provider: Option<&str>) -> Resu
Ok(arguments)
}
-pub(super) fn handle_web_search(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_web_search(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let arguments = search_arguments(&params, None)?;
run_role_tool(tinysearch_bus::tools::WEB_SEARCH, arguments, "web_search").await
})
}
-pub(super) fn handle_searxng_search(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_searxng_search(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let arguments = search_arguments(&params, Some("searxng"))?;
run_role_tool(
@@ -169,7 +169,7 @@ pub(super) fn handle_searxng_search(params: Map<String, Value>) -> ControllerFut
})
}
-pub(super) fn handle_web_answer(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_web_answer(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let query = required_text(&params, "query")?;
let mut arguments = json!({ "query": query });
@@ -190,7 +190,7 @@ pub(super) fn handle_web_answer(params: Map<String, Value>) -> ControllerFuture
})
}
-pub(super) fn handle_web_contents(params: Map<String, Value>) -> ControllerFuture {
+pub(super) fn handle_web_contents(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let urls = optional_string_array(&params, "urls")?;
if urls.is_empty() {
diff --git a/crates/openhuman-core/src/web_chat/schemas.rs b/crates/openhuman-core/src/web_chat/schemas.rs
index 8c29b664a8..41b338a1b3 100644
--- a/crates/openhuman-core/src/web_chat/schemas.rs
+++ b/crates/openhuman-core/src/web_chat/schemas.rs
@@ -154,7 +154,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
}
}
-fn handle_chat(params: Map<String, Value>) -> ControllerFuture {
+fn handle_chat(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<WebChatParams>(params)?;
// Recorded before the turn starts so it reads the new choice.
@@ -189,28 +189,28 @@ fn handle_chat(params: Map<String, Value>) -> ControllerFuture {
})
}
-fn handle_queue_status(params: Map<String, Value>) -> ControllerFuture {
+fn handle_queue_status(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<WebQueueParams>(params)?;
to_json(channel_web_queue_status(&p.thread_id).await?)
})
}
-fn handle_queue_clear(params: Map<String, Value>) -> ControllerFuture {
+fn handle_queue_clear(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<WebQueueParams>(params)?;
to_json(channel_web_queue_clear(&p.thread_id).await?)
})
}
-fn handle_queue_remove(params: Map<String, Value>) -> ControllerFuture {
+fn handle_queue_remove(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<WebQueueRemoveParams>(params)?;
to_json(channel_web_queue_remove(&p.client_id, &p.thread_id, &p.item_id).await?)
})
}
-fn handle_cancel(params: Map<String, Value>) -> ControllerFuture {
+fn handle_cancel(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<WebCancelParams>(params)?;
to_json(channel_web_cancel(&p.client_id, &p.thread_id, p.request_id.as_deref()).await?)