Skip to content

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

refactor(agent): hand-write Debug for OpenHumanRunExt

Steven Enamakela34564b4a13b
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/operation_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/operation_context.rs
index 985ab9e0fd..c484d7a878 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/operation_context.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/operation_context.rs
@@ -11,7 +11,7 @@ use std::{sync::Arc, time::Duration};
/// [`OpenHumanRunContext::into_tinyagents`] with `RunContext::with_host`.
/// It replaces the former per-value task-locals, which do not cross a module
/// boundary.
-#[derive(Debug, Clone, Default, PartialEq, Eq)]
+#[derive(Clone, Default, PartialEq, Eq)]
pub struct OpenHumanRunExt {
/// Recency window narrowing integration task-fetch tools (morning
/// briefing only); `None` leaves them unbounded.
@@ -20,6 +20,15 @@ pub struct OpenHumanRunExt {
pub command_environment: Option<Arc<std::collections::BTreeMap<String, String>>>,
}
+impl std::fmt::Debug for OpenHumanRunExt {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.debug_struct("OpenHumanRunExt")
+ .field("task_recency_window", &self.task_recency_window)
+ .field("command_environment", &self.command_environment.is_some())
+ .finish()
+ }
+}
+
/// Reads the explicit command environment from a tool's run context.
pub(crate) fn command_environment_for_tool(
context: Option<&dyn tinytools::ToolRunContext>,