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 mcp-server-bus-cutover

Steven Enamakela635dd79c5b2
diff --cc crates/openhuman-core/src/mcp/server/module_tests.rs
index 91bd888635,d133a35811..1689bb022f
--- a/crates/openhuman-core/src/mcp/server/module_tests.rs
+++ b/crates/openhuman-core/src/mcp/server/module_tests.rs
@@@ -209,62 -199,6 +209,62 @@@ async fn server_session_cancellation_re
assert!(port.0.lock().unwrap().cancelled);
}
+#[tokio::test]
+async fn closing_session_aborts_and_joins_a_running_host_callback() {
+ let port = Arc::new(FixturePort(Mutex::new(PortState::default())));
+ let (started_tx, started_rx) = tokio::sync::oneshot::channel();
+ let started_tx = Arc::new(Mutex::new(Some(started_tx)));
- let (dropped_tx, dropped_rx) = tokio::sync::oneshot::channel();
++ let (dropped_tx, mut dropped_rx) = tokio::sync::oneshot::channel();
+ let dropped_tx = Arc::new(Mutex::new(Some(dropped_tx)));
+ let release = CancellationToken::new();
+ let dispatch = {
+ let started_tx = Arc::clone(&started_tx);
+ let dropped_tx = Arc::clone(&dropped_tx);
+ let release = release.clone();
+ move |_call| {
+ let started = started_tx.lock().unwrap().take();
+ let dropped = dropped_tx.lock().unwrap().take();
+ let release = release.clone();
+ async move {
+ let _drop_notice = CallbackDrop(dropped);
+ if let Some(started) = started {
+ let _ = started.send(());
+ }
+ release.cancelled().await;
+ ServerHostReply::Success { value: Value::Null }
+ }
+ }
+ };
+ let session = Arc::new(
+ ServerSession::open_with_port_and_dispatch(port, dispatch)
+ .await
+ .unwrap(),
+ );
+ let submit_session = Arc::clone(&session);
+ let submit = tokio::spawn(async move {
+ submit_session
+ .submit(
+ Map::new(),
+ r#"{"jsonrpc":"2.0","id":1,"method":"resources/read"}"#.to_owned(),
+ &CancellationToken::new(),
+ )
+ .await
+ });
+ started_rx.await.expect("host callback started");
+
+ session.close().await.unwrap();
+ let callback_was_joined = dropped_rx.try_recv().is_ok();
+ // Let the pre-fix implementation finish its detached task so a RED run
+ // does not leave work running after the test returns.
+ release.cancel();
+ let _ = submit.await.unwrap();
+
+ assert!(
+ callback_was_joined,
+ "terminal session close must abort and join an in-flight host callback"
+ );
+}
+
#[tokio::test]
async fn server_session_fails_closed_when_module_is_unavailable() {
let port = Arc::new(FixturePort(Mutex::new(PortState {
diff --cc docs/module-boundary-inventory.md
index 3ac81e46ab,951bb48264..a4419cbffb
--- a/docs/module-boundary-inventory.md
+++ b/docs/module-boundary-inventory.md
@@@ -18,8 -18,8 +18,8 @@@ copying its implementation into a host
| tinymcp | tinymcp | tinymcp-bus | core MCP registry, supervisor, CLI stdio/HTTP server | Supervisor notifications, server protocol operations and callbacks for approved host tools/resources/prompts |
| tinychannels | tinychannels, tinychannels-runtime (remaining runtime callers) | tinychannels-bus | core channels, TinyHumans host, CLI REPL | Contract is pure; v0.1.18 supplies complete Discord response vocabulary provider connection preparation and health observations. Discord discovery/permission checks, credential tests and connection validation/defaults and `doctor channels` health checks use confidential module calls. Remaining runtime callers need bus cutover with inbound/status callbacks and shutdown draining |
| tinyhosts | none | tinyhosts-bus | core hosting tools | Released Execute/Providers contract consumed through the module; workspace authorization, credentials and approval policy remain in OpenHuman |
- | tinywallet | tinywallet-crypto, tinywallet-web3, tinywallet-x402 through remaining host imports | tinywallet-bus | core wallet/web3/x402 | Contract is pure at v0.13.0; native transfer preparation/execution use confidential module calls with host custody, exact approval binding and explicit close. Initialization, remaining validation, Web3 quotes/swaps, x402 payments, budgets and ledger still need host cutover |
+ | tinywallet | none in normal/build host dependencies | tinywallet-bus | core wallet/web3/x402 | Complete: v0.19.0 contract 1.13 owns mnemonic validation/derivation, native transactions, Web3 quotes/execution, ERC-20 encoding, and x402 payment parsing/budgets/ledger. OpenHuman retains encrypted-key custody, authenticated transport, explicit approval, and lifecycle orchestration |
-| tinybox | tinybox-core, tinybox-jail, tinybox-docker | tinybox-bus | core sandbox and security, desktop gateways | Pre-core gateways use the released v0.1.18 bus client. Core sandbox execution and shell analysis still require cutover |
+| tinybox | none | tinybox-bus | core sandbox and security, desktop gateways | Complete: host PR #7469 uses released v0.1.21 for sandbox lifecycle, execution, transfer, forwarding and shell analysis; pre-core gateways share the loader. The host retains path validation, approvals and the security floor |
| tinycomputer | none | tinycomputer-bus | core voice, paste/focus and permission checks | Permission, focus, paste and Globe listener operations use the module; native thread and target rules remain covered |
| tinyvoice | None | tinyvoice-bus | core voice capture/hotkeys | Module-owned devices, recording and continuous capture, bounded audio reads/batches, explicit lease cleanup; computer module permission decisions |
| tinyruntime | tinyruntime-pyserver | tinyruntime-bus | core Python worker, optional TinyJuice ML | Excluded from this migration: TinyRuntime is being removed separately |