The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
style: apply rustfmt formatting to trace export code
Steven Enamakeled333c63893a
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_trace_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_trace_tests.rsindex 8e9ed39b97..b8c8314648 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_trace_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_trace_tests.rs@@ -52,8 +52,8 @@ impl ChatModel<()> for GatedRepairModel {async fn cancellation_during_required_output_repair_finalizes_native_run() {use tinyagents_harness::events::AgentEvent;use tinyagents_harness::ids::ExecutionStatus;- use tinyagents_harness::HarnessStatusStore;use tinyagents_harness::terminal::TerminalReason;+ use tinyagents_harness::HarnessStatusStore;let scratch = tempfile::tempdir().expect("isolated workspace");let workspace = scratch.path().join("workspace");diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_trace_export_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_trace_export_tests.rsindex 5a91ecd49f..5b90bf6fbb 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_trace_export_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_trace_export_tests.rs@@ -236,11 +236,12 @@ async fn prepared_child_run_is_exported_from_its_native_journal_lineage() {);let child_root = child_spans.iter()- .find(|span| {- span.kind == tinyagents_harness::observability::trace_export::SpanKind::Turn- })+ .find(|span| span.kind == tinyagents_harness::observability::trace_export::SpanKind::Turn).expect("the real durable child journal builds a distinct child root trace");- assert_eq!(child_root.trace_id, format!("subagent:{}", child_run_id.as_str()));+ assert_eq!(+ child_root.trace_id,+ format!("subagent:{}", child_run_id.as_str())+ );assert_eq!(child_root.attributes["thread.id"], "native-trace-thread");assert_eq!(child_root.attributes["agent.id"], "writer");assert_eq!(child_root.attributes["channel.source"], "subagent");diff --git a/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs b/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rsindex 0fcb62af0a..b26d93f9c5 100644--- a/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs+++ b/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs@@ -14,7 +14,9 @@ use crate::progress::AgentProgress;use tinytools::humanize_tool_name;use super::bridge_types::{ProviderUsageCarry, SubagentScope, ToolFailureMap, ToolNameMap};-use tinyagents_harness::events::{AgentEvent, CallDedupe, EventRecord, IterationCursor, OrderedSender};+use tinyagents_harness::events::{+ AgentEvent, CallDedupe, EventRecord, IterationCursor, OrderedSender,+};#[derive(Default)]pub(super) struct BridgeState {diff --git a/crates/openhuman-core/src/core/observability/progress_tracing/export.rs b/crates/openhuman-core/src/core/observability/progress_tracing/export.rsindex e88f8f678d..4247276161 100644--- a/crates/openhuman-core/src/core/observability/progress_tracing/export.rs+++ b/crates/openhuman-core/src/core/observability/progress_tracing/export.rs@@ -6,10 +6,10 @@ use crate::config::Config;use crate::config::schema::AgentTracingBackend;use std::time::Duration;-use tinyagents_harness::observability::AgentObservation;use tinyagents_harness::observability::trace_export::otlp::otlp_requests;use tinyagents_harness::observability::trace_export::serialize::{spans_to_ndjson, SpanEnvelope};use tinyagents_harness::observability::trace_export::{TraceContext, TraceSpan};+use tinyagents_harness::observability::AgentObservation;use tinyagents_harness::observability::LangfuseClient;const PUSH_TIMEOUT: Duration = Duration::from_secs(10);diff --git a/crates/openhuman-core/src/core/observability/progress_tracing/export_tests.rs b/crates/openhuman-core/src/core/observability/progress_tracing/export_tests.rsindex d493dae63a..4825cb8dde 100644--- a/crates/openhuman-core/src/core/observability/progress_tracing/export_tests.rs+++ b/crates/openhuman-core/src/core/observability/progress_tracing/export_tests.rs@@ -60,10 +60,12 @@ fn local_export_appends_valid_selected_ndjson_envelopes() {.map(|line| serde_json::from_str::<serde_json::Value>(line).expect("valid NDJSON")).collect();assert_eq!(lines.len(), 2, "each call appends exactly one span line");- assert_eq!(lines[0]["trace_id"], "writer-trace", "OTel envelope selected");assert_eq!(- lines[1]["body"]["trace_id"],- "writer-trace",+ lines[0]["trace_id"], "writer-trace",+ "OTel envelope selected"+ );+ assert_eq!(+ lines[1]["body"]["trace_id"], "writer-trace","Langfuse envelope selected");}@@ -78,7 +80,10 @@ fn disabled_local_export_and_log_only_export_are_safe() {..Default::default()};export_spans(&config, &[file_fixture_span()]);- assert!(!path.exists(), "disabled local tracing has no filesystem effect");+ assert!(+ !path.exists(),+ "disabled local tracing has no filesystem effect"+ );let config = AgentTracingConfig {enabled: true,@@ -124,7 +129,9 @@ async fn child_export_obeys_sharing_and_readiness_gates_before_reading() {config.observability.share_usage_data = true;config.api_url = Some("https://external.invalid/api".into());- assert!(!crate::backend::telemetry::langfuse::journal_push_ready(&config));+ assert!(!crate::backend::telemetry::langfuse::journal_push_ready(+ &config+ ));crate::core::observability::progress_tracing::export_subagent_journal_trace(&dispatch,&config,diff --git a/crates/openhuman-core/src/web_chat/progress_bridge_trace_tests.rs b/crates/openhuman-core/src/web_chat/progress_bridge_trace_tests.rsindex b69a4f9246..64cb71c834 100644--- a/crates/openhuman-core/src/web_chat/progress_bridge_trace_tests.rs+++ b/crates/openhuman-core/src/web_chat/progress_bridge_trace_tests.rs@@ -70,13 +70,14 @@ fn trace_context_keeps_request_session_group_and_transport_client_distinct() {},},];- let mut collector = tinyagents_harness::observability::trace_export::collector::SpanCollector::new(- context.with_run_lineage(- Some(run_id.as_str().into()),- None,- Some(run_id.as_str().into()),- ),- );+ let mut collector =+ tinyagents_harness::observability::trace_export::collector::SpanCollector::new(+ context.with_run_lineage(+ Some(run_id.as_str().into()),+ None,+ Some(run_id.as_str().into()),+ ),+ );for observation in &observations {collector.record(observation);}@@ -100,9 +101,13 @@ fn trace_context_keeps_request_session_group_and_transport_client_distinct() {tinyagents_harness::observability::trace_export::serialize::SpanEnvelope::Otel,collector.spans(),);- let serialized_root: serde_json::Value = serde_json::from_str(serialized.lines().next().unwrap())- .expect("host-built context serializes as valid trace output");- assert_eq!(serialized_root["attributes"]["client.id"], "socket-client-7");+ let serialized_root: serde_json::Value =+ serde_json::from_str(serialized.lines().next().unwrap())+ .expect("host-built context serializes as valid trace output");+ assert_eq!(+ serialized_root["attributes"]["client.id"],+ "socket-client-7"+ );assert_eq!(serialized_root["attributes"]["agent.id"], "writer");assert_eq!(serialized_root["attributes"]["run.type"], "autonomous_task");}