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
refactor(test_support): thread dispatch context into schema handlers
Steven Enamakeldb956bb1804a
diff --git a/crates/openhuman-core/src/test_support/schemas.rs b/crates/openhuman-core/src/test_support/schemas.rsindex 3b498b5b1a..cc955fd05e 100644--- a/crates/openhuman-core/src/test_support/schemas.rs+++ b/crates/openhuman-core/src/test_support/schemas.rs@@ -2,6 +2,7 @@ use serde_json::{Map, Value};use crate::core::all::{ControllerFuture, RegisteredController};use crate::core::Outcome;+use crate::core::DispatchCtx;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use crate::test_support::{introspect, rpc};@@ -269,15 +270,15 @@ pub fn schemas(function: &str) -> ControllerSchema {}}-fn handle_reset(_params: Map<String, Value>) -> ControllerFuture {+fn handle_reset(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {Box::pin(async move { to_json(rpc::reset().await?) })}-fn handle_workspace_root(_params: Map<String, Value>) -> ControllerFuture {+fn handle_workspace_root(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {Box::pin(async move { to_json(introspect::workspace_root().await?) })}-fn handle_list_workspace_files(params: Map<String, Value>) -> ControllerFuture {+fn handle_list_workspace_files(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {let rel_root = params.get("rel_root")@@ -291,7 +292,7 @@ fn handle_list_workspace_files(params: Map<String, Value>) -> ControllerFuture {})}-fn handle_read_workspace_file(params: Map<String, Value>) -> ControllerFuture {+fn handle_read_workspace_file(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {let rel_path = params.get("rel_path")@@ -303,11 +304,11 @@ fn handle_read_workspace_file(params: Map<String, Value>) -> ControllerFuture {})}-fn handle_in_flight_chats(_params: Map<String, Value>) -> ControllerFuture {+fn handle_in_flight_chats(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {Box::pin(async move { to_json(introspect::in_flight_chats().await?) })}-fn handle_wallet_prepared_quotes(_params: Map<String, Value>) -> ControllerFuture {+fn handle_wallet_prepared_quotes(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {Box::pin(async move { to_json(introspect::wallet_prepared_quotes().await?) })}