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
fix(accessors): use DialectRole instead of Role for transcript matching
Steven Enamakel6dece2e034e8
diff --git a/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs b/crates/openhuman-core/src/agent/session_host/runtime/accessors.rsindex d92cfc0787..96959402ca 100644--- a/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs@@ -267,7 +267,7 @@ impl OpenHumanSessionHost {.into_iter().map(|entry| match entry {TranscriptEntry::Chat(message)- if message.role == tinytools_agent::dialect::Role::User =>+ if message.role == tinytools_agent::dialect::DialectRole::User =>{match parse_replayed_results(&message.content) {Some(results) => TranscriptEntry::ToolResults(results),diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex a20ab1a4a1..e96142dd30 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -3541,7 +3541,6 @@ async fn json_rpc_workflow_run_definitions_and_runs_roundtrip() {}#[tokio::test]-#[ignore = "TODO(#6380): agent_team_message_member answers `unknown member: member-...` for ids returned by agent_team_create; run: cargo test -p openhuman-cli --features <product> --test json_rpc_e2e json_rpc_agent_team_coordination_roundtrip -- --ignored"]async fn json_rpc_agent_team_coordination_roundtrip() {let _env_lock = json_rpc_e2e_env_lock();let tmp = tempdir().expect("tempdir");@@ -3774,6 +3773,38 @@ async fn json_rpc_agent_team_coordination_roundtrip() {Some("completed"));+ // Message bob from alice (still live), then list messages. The shutdown+ // below must come after: a stopped member cannot send or receive.+ let message = post_json_rpc(+ &rpc_base,+ 9347,+ "openhuman.agent_team_message_member",+ json!({+ "teamId": team_id,+ "fromMemberId": alice_id,+ "toMemberId": bob_id,+ "content": "task A done, you are unblocked"+ }),+ )+ .await;+ assert_no_jsonrpc_error(&message, "agent_team_message_member");++ let messages = post_json_rpc(+ &rpc_base,+ 9348,+ "openhuman.agent_team_list_messages",+ json!({ "teamId": team_id }),+ )+ .await;+ let messages_outer = assert_no_jsonrpc_error(&messages, "agent_team_list_messages");+ assert_eq!(+ messages_outer+ .get("messages")+ .and_then(serde_json::Value::as_array)+ .map(|m| m.len()),+ Some(1)+ );+// Shut alice down → member stopped (her task A is already done, so nothing// is released back to the queue).let shutdown_alice = post_json_rpc(@@ -3802,35 +3833,27 @@ async fn json_rpc_agent_team_coordination_roundtrip() {Some(0));- // Message bob from alice, then list messages.- let message = post_json_rpc(+ // A stopped member is no longer part of the live roster, so it can neither+ // send nor receive team messages (`TeamService::ensure_member`).+ let message_from_stopped = post_json_rpc(&rpc_base,- 9347,+ 9363,"openhuman.agent_team_message_member",json!({"teamId": team_id,"fromMemberId": alice_id,"toMemberId": bob_id,- "content": "task A done, you are unblocked"+ "content": "sent after shutdown"}),).await;- assert_no_jsonrpc_error(&message, "agent_team_message_member");-- let messages = post_json_rpc(- &rpc_base,- 9348,- "openhuman.agent_team_list_messages",- json!({ "teamId": team_id }),- )- .await;- let messages_outer = assert_no_jsonrpc_error(&messages, "agent_team_list_messages");- assert_eq!(- messages_outer- .get("messages")- .and_then(serde_json::Value::as_array)- .map(|m| m.len()),- Some(1)+ let stopped_err = assert_jsonrpc_error(+ &message_from_stopped,+ "agent_team_message_member from stopped member",+ );+ assert!(+ stopped_err.to_string().contains("unknown member"),+ "stopped member must be rejected: {stopped_err}");// Get the team — 2 members, 2 tasks.@@ -11110,7 +11133,7 @@ async fn json_rpc_flows_full_arc_discover_build_create_run_inner() {let proposal = build_out.get("proposal").filter(|p| !p.is_null())- .expect("flows_build returns a non-null proposal");+ .unwrap_or_else(|| panic!("flows_build returns a non-null proposal: {build_out}"));assert_eq!(proposal.get("type").and_then(Value::as_str),Some("workflow_proposal")