mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
feat(agent): expose async subagent control refs (#4138)
This commit is contained in:
@@ -2795,7 +2795,7 @@ async fn agent_runtime_policy_cost_and_triage_helpers_cover_public_edges() {
|
||||
);
|
||||
let estimated =
|
||||
openhuman_core::openhuman::agent::cost::estimate_call_cost_usd("agentic-v1", &usage);
|
||||
assert!((estimated - 18.3).abs() < 1e-6, "got {estimated}");
|
||||
assert!((estimated - 1.308625).abs() < 1e-6, "got {estimated}");
|
||||
let charged = UsageInfo {
|
||||
charged_amount_usd: 0.42,
|
||||
..usage.clone()
|
||||
@@ -2812,7 +2812,7 @@ async fn agent_runtime_policy_cost_and_triage_helpers_cover_public_edges() {
|
||||
assert_eq!(turn_cost.cached_input_tokens, 2_000_000);
|
||||
assert_eq!(turn_cost.charged_usd, 0.42);
|
||||
assert_eq!(turn_cost.call_count, 2);
|
||||
assert!(turn_cost.total_usd() > 18.7);
|
||||
assert!((turn_cost.total_usd() - 1.728625).abs() < 1e-6);
|
||||
|
||||
let composio = TriggerEnvelope::from_composio(
|
||||
"gmail",
|
||||
@@ -4701,6 +4701,7 @@ async fn agent_subagent_public_types_cover_task_local_and_error_display_paths()
|
||||
mode: SubagentMode::Typed,
|
||||
status: SubagentRunStatus::Completed,
|
||||
final_history: Vec::new(),
|
||||
usage: Default::default(),
|
||||
};
|
||||
assert_eq!(outcome.mode.as_str(), "typed");
|
||||
assert_eq!(outcome.elapsed.as_millis(), 12);
|
||||
|
||||
@@ -771,7 +771,7 @@ async fn memory_thread_tree_and_sync_controller_schemas_execute_public_handlers(
|
||||
|
||||
let thread_schemas = all_threads_controller_schemas();
|
||||
let thread_controllers = all_threads_registered_controllers();
|
||||
assert_eq!(thread_schemas.len(), 16);
|
||||
assert_eq!(thread_schemas.len(), 17);
|
||||
assert_eq!(thread_schemas.len(), thread_controllers.len());
|
||||
assert_eq!(
|
||||
openhuman_core::openhuman::threads::schemas::schemas("missing").function,
|
||||
@@ -794,6 +794,7 @@ async fn memory_thread_tree_and_sync_controller_schemas_execute_public_handlers(
|
||||
"turn_state_clear",
|
||||
"task_board_get",
|
||||
"task_board_put",
|
||||
"token_usage",
|
||||
] {
|
||||
assert!(thread_schemas
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user