Skip to content

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

Merge remote-tracking branch 'upstream/main' into tinywallet-release-0192

Steven Enamakel7afdb5ced761
diff --cc crates/openhuman-core/src/storage/blob_sweep_tests.rs
index 2623258c39,d1da109ea5..824efb6fab
--- a/crates/openhuman-core/src/storage/blob_sweep_tests.rs
+++ b/crates/openhuman-core/src/storage/blob_sweep_tests.rs
@@@ -55,7 -55,7 +55,11 @@@ async fn sweep_all_visits_the_local_sco
#[tokio::test(start_paused = true)]
async fn spawned_sweeper_waits_for_its_first_delay_then_keeps_ticking() {
- let handle = spawn(Duration::from_secs(10), Duration::from_secs(20));
- let handle = spawn(&crate::core::runtime::DispatchCtx::ambient(), Duration::from_secs(10), Duration::from_secs(20));
++ let handle = spawn(
++ &crate::core::runtime::DispatchCtx::ambient(),
++ Duration::from_secs(10),
++ Duration::from_secs(20),
++ );
tokio::time::sleep(Duration::from_secs(65)).await;
assert!(!handle.is_finished(), "the sweeper keeps running");
handle.abort();
diff --cc crates/openhuman-core/src/tinymemes/callbacks.rs
index 83bb8da9eb,32725231dd..cf2a2b9c64
--- a/crates/openhuman-core/src/tinymemes/callbacks.rs
+++ b/crates/openhuman-core/src/tinymemes/callbacks.rs
@@@ -264,10 -257,7 +264,11 @@@ async fn search
async fn load_index(session: &Session, request: LoadIndexRequest) -> HostResult<Option<String>> {
let config = session.config.clone();
let kind: IndexKind = request.kind;
- match crate::core::runtime::DispatchCtx::ambient()
- match session.dispatch_ctx().spawn_blocking(move || docs::load(&config, kind)).await {
++ match session
++ .dispatch_ctx()
+ .spawn_blocking(move || docs::load(&config, kind))
+ .await
+ {
Ok(Ok(document)) => Ok(document),
Ok(Err(error)) => {
log::warn!("[tinymemes] cannot read index: {error}");
@@@ -282,9 -272,10 +283,10 @@@
async fn save_index(session: &Session, request: SaveIndexRequest) -> HostResult<()> {
let config = session.config.clone();
- match crate::core::runtime::DispatchCtx::ambient()
- match session.dispatch_ctx().spawn_blocking(move || {
- docs::save(&config, request.kind, request.json)
- })
- .await
++ match session
++ .dispatch_ctx()
+ .spawn_blocking(move || docs::save(&config, request.kind, request.json))
+ .await
{
Ok(Ok(())) => Ok(()),
Ok(Err(error)) => {
diff --cc crates/openhuman-core/src/web_chat/turn_activity_tests.rs
index 419c9e232d,807d1d97fa..ad55b85e86
--- a/crates/openhuman-core/src/web_chat/turn_activity_tests.rs
+++ b/crates/openhuman-core/src/web_chat/turn_activity_tests.rs
@@@ -173,7 -173,7 +173,12 @@@ async fn a_long_tool_call_holds_off_the
async fn tap_records_and_forwards_in_order() {
let activity = TurnActivity::new();
let (tx, rx) = mpsc::channel(4);
- let mut bridge_rx = tap(activity.clone(), rx, 4);
- let mut bridge_rx = tap(&crate::core::runtime::DispatchCtx::ambient(), activity.clone(), rx, 4);
++ let mut bridge_rx = tap(
++ &crate::core::runtime::DispatchCtx::ambient(),
++ activity.clone(),
++ rx,
++ 4,
++ );
tx.send(tool_started("a")).await.unwrap();
tx.send(text("x")).await.unwrap();
drop(tx);
diff --cc crates/openhuman-core/src/web_chat/turn_close.rs
index 78f0fcc3b2,3013d9aedf..69c966387c
--- a/crates/openhuman-core/src/web_chat/turn_close.rs
+++ b/crates/openhuman-core/src/web_chat/turn_close.rs
@@@ -289,12 -290,10 +290,12 @@@ async fn read_snapshot
request_id: &str,
) -> Option<TurnState> {
let (thread_id, request_id) = (thread_id.to_string(), request_id.to_string());
- let read = crate::core::runtime::DispatchCtx::ambient()
- let read = ctx.spawn_blocking(move || {
- crate::agent::session_store::turn_states_for(&workspace).get_turn(&thread_id, &request_id)
- })
- .await;
++ let read = ctx
+ .spawn_blocking(move || {
+ crate::agent::session_store::turn_states_for(&workspace)
+ .get_turn(&thread_id, &request_id)
+ })
+ .await;
match read {
Ok(Ok(snapshot)) => snapshot,
Ok(Err(error)) => {