Skip to content

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

refactor(openhuman-embed): drop name method from LearningSink impls

Steven Enamakel3a75c9c89f06
diff --git a/crates/openhuman-embed/examples/hooks.rs b/crates/openhuman-embed/examples/hooks.rs
index 820ab00741..7752ca5b06 100644
--- a/crates/openhuman-embed/examples/hooks.rs
+++ b/crates/openhuman-embed/examples/hooks.rs
@@ -42,9 +42,6 @@ async fn run() -> anyhow::Result<()> {
struct Counter(std::sync::Arc<std::sync::atomic::AtomicUsize>);
#[async_trait::async_trait]
impl openhuman_embed::seams::LearningSink for Counter {
- fn name(&self) -> &str {
- "example-counter"
- }
async fn on_turn_complete(
&self,
_: &openhuman_embed::seams::TurnSummary,
diff --git a/crates/openhuman-embed/examples/runtime_events.rs b/crates/openhuman-embed/examples/runtime_events.rs
index 62e33484ba..afe79edcbf 100644
--- a/crates/openhuman-embed/examples/runtime_events.rs
+++ b/crates/openhuman-embed/examples/runtime_events.rs
@@ -73,9 +73,6 @@ async fn run() -> anyhow::Result<()> {
struct Counter(Arc<AtomicUsize>);
#[async_trait::async_trait]
impl openhuman_embed::seams::LearningSink for Counter {
- fn name(&self) -> &str {
- "live-counter"
- }
async fn on_turn_complete(
&self,
_: &openhuman_embed::seams::TurnSummary,
diff --git a/crates/openhuman-embed/tests/runtime_observation.rs b/crates/openhuman-embed/tests/runtime_observation.rs
index add4d0a2da..48e802c8c2 100644
--- a/crates/openhuman-embed/tests/runtime_observation.rs
+++ b/crates/openhuman-embed/tests/runtime_observation.rs
@@ -25,16 +25,12 @@ impl ChatModel<()> for Model {
}
}
struct Hook {
- name: &'static str,
seen: tokio::sync::mpsc::UnboundedSender<String>,
}
#[async_trait]
impl LearningSink for Hook {
- fn name(&self) -> &str {
- self.name
- }
async fn on_turn_complete(&self, ctx: &TurnSummary) -> anyhow::Result<()> {
- self.seen.send(ctx.agent_id.clone().unwrap_or_default())?;
+ self.seen.send(ctx.agent_id.clone())?;
Ok(())
}
}
@@ -64,7 +60,7 @@ fn custom_models_local_hooks_session_stores_and_events_stay_scoped() {
..Default::default()
})
.post_turn_hook(Arc::new(Hook {
- name: "global",
+
seen: global_tx,
}))
.build()
@@ -84,7 +80,7 @@ fn custom_models_local_hooks_session_stores_and_events_stay_scoped() {
.definition(definition())
.session_store(store_a.clone())
.post_turn_hook(Arc::new(Hook {
- name: "local",
+
seen: hook_tx,
})),
)