Skip to content

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

chore(embed): reexport AgentTurnOrigin and tidy test formatting

Steven Enamakelfa2642a37734
diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rs
index 2d2e312e5b..05db090897 100644
--- a/crates/openhuman-embed/src/lib.rs
+++ b/crates/openhuman-embed/src/lib.rs
@@ -193,9 +193,9 @@ pub use openhuman_core::cron::host_delivery::{CronDelivery, CronReply};
pub use openhuman_core::cron::JobOrigin;
#[cfg(feature = "profiles")]
pub use profiles::{
- ChatReply, CronSweepReport, DirectProfileProvider,
- OpenError, ProfileError, ProfileEvents, ProfileHandle, ProfileId, ProfileIdMode,
- ProfileRuntime, ProfileRuntimeBuilder, ProfileSummary, Provisioned, SaasConfig,
+ ChatReply, CronSweepReport, DirectProfileProvider, OpenError, ProfileError, ProfileEvents,
+ ProfileHandle, ProfileId, ProfileIdMode, ProfileRuntime, ProfileRuntimeBuilder, ProfileSummary,
+ Provisioned, SaasConfig,
};
#[cfg(all(feature = "profiles", feature = "channels"))]
pub use profiles::{RelayAccepted, RelayMessage};
diff --git a/crates/openhuman-embed/tests/cron_host_delivery.rs b/crates/openhuman-embed/tests/cron_host_delivery.rs
index 2af2f6ed1f..a819e9b4c9 100644
--- a/crates/openhuman-embed/tests/cron_host_delivery.rs
+++ b/crates/openhuman-embed/tests/cron_host_delivery.rs
@@ -14,8 +14,8 @@ use std::time::Duration;
use common::{offline_config, runtime, scripted_provider, stub_backend, tool_call_completion};
use openhuman_embed::{
- AgentDefinitionSpec, AgentSpec, CronDelivery, CronReply, HostTurnTools, InMemorySessionStores,
- JobOrigin, Runtime, ServiceSet, ToolScopeSpec, Workspace,
+ AgentDefinitionSpec, AgentSpec, AgentTurnOrigin, CronDelivery, CronReply, HostTurnTools,
+ InMemorySessionStores, JobOrigin, Runtime, ServiceSet, ToolScopeSpec, Workspace,
};
#[derive(Default)]
@@ -92,6 +92,12 @@ fn a_library_agents_scheduled_reply_is_handed_to_the_host() {
agent
.turn("remind me to stretch")
.session("t-stretch")
+ // The host's conversation: what a job made in it returns to.
+ .origin(AgentTurnOrigin::WebChat {
+ thread_id: "t-stretch".into(),
+ client_id: "teeny-host".into(),
+ request_id: None,
+ })
.send()
.await
.expect("the stretch turn runs");
diff --git a/crates/openhuman-embed/tests/profile_cron_sweep.rs b/crates/openhuman-embed/tests/profile_cron_sweep.rs
index c6d8ac4430..7ebc76d6ee 100644
--- a/crates/openhuman-embed/tests/profile_cron_sweep.rs
+++ b/crates/openhuman-embed/tests/profile_cron_sweep.rs
@@ -139,7 +139,12 @@ async fn scenario() {
.collect();
delivered.sort_by(|x, y| x.0.cmp(&y.0));
assert!(
- recorder.0.lock().unwrap().iter().all(|r| r.agent_id.is_none()),
+ recorder
+ .0
+ .lock()
+ .unwrap()
+ .iter()
+ .all(|r| r.agent_id.is_none()),
"a profile's default agent is not named"
);
let web = |user: &str| {