Skip to content

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

fix(rust): satisfy post-migration clippy gate

Steven Enamakel424d7d9c2a62
diff --git a/crates/openhuman-core/src/agent/harness/subagent_runner/extract_tool.rs b/crates/openhuman-core/src/agent/harness/subagent_runner/extract_tool.rs
index 37e36e4476..51f43038b2 100644
--- a/crates/openhuman-core/src/agent/harness/subagent_runner/extract_tool.rs
+++ b/crates/openhuman-core/src/agent/harness/subagent_runner/extract_tool.rs
@@ -559,7 +559,7 @@ fn write_extract_transcript(
Err(err) => (format!("[error] {err}"), true),
};
- let messages = vec![
+ let messages = [
ChatMessage {
id: None,
role: "system".into(),
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/tool.rs b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/tool.rs
index e44304c983..65a4813ed3 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/tool.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/tool.rs
@@ -250,7 +250,7 @@ impl AgentPrepareContextTool {
"[agent_prepare_context] skipped because agent context is already prepared for this turn"
);
return Ok(ToolResult::success(already_prepared_context_bundle(
- &prepared_sources,
+ prepared_sources,
)));
}
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
index abe020c66b..7220ae6aa1 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
@@ -445,7 +445,7 @@ impl SpawnSubagentTool {
let title: String = prompt.chars().take(60).collect();
super::worker_thread::create_worker_thread(
p.workspace_dir.clone(),
- &parent_thread_id,
+ parent_thread_id,
&definition.id,
&title,
&prompt,
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/cancel.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/cancel.rs
index 435f9ed35d..1a2922046c 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/cancel.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/cancel.rs
@@ -74,9 +74,9 @@ pub(super) fn lookup_cancel_signal(run_id: &str) -> Option<WorkflowCancelSignal>
/// losing stop cannot cancel a successor installed by resume.
pub(super) fn cancel_signal_if_current(run_id: &str, signal: &WorkflowCancelSignal) -> bool {
let current = lookup_cancel_signal(run_id);
- if !current
+ if current
.as_ref()
- .is_some_and(|current| current.generation == signal.generation)
+ .is_none_or(|current| current.generation != signal.generation)
{
return false;
}
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/experience_store.rs b/crates/openhuman-core/src/agent/tinyagents/host/experience_store.rs
index cc6b04be3b..98bb8bc398 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/experience_store.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/experience_store.rs
@@ -374,7 +374,7 @@ impl ExperienceStore for OpenHumanExperienceStore {
max_hits: self.candidate_hits(),
};
- let hits = retrieve_across_stores(&[self.store.clone()], query)
+ let hits = retrieve_across_stores(std::slice::from_ref(&self.store), query)
.await
.map_err(|e| TinyAgentsError::Memory(format!("recall agent experience: {e}")))?;
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
index cc16309ff1..12d6f6049d 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
@@ -664,7 +664,7 @@ async fn run_turn_via_tinyagents_inner(
..
}) = run_context.origin.as_ref()
{
- journal::register_request_journal_run(&request_id, journal_run_id.as_str());
+ journal::register_request_journal_run(request_id, journal_run_id.as_str());
}
}