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(flows): align binding tests with TinyFlows gates
Steven Enamakel729c58b7a0a7
diff --git a/src/openhuman/flows/builder_tools_tests.rs b/src/openhuman/flows/builder_tools_tests.rsindex eef5f61cfe..fbee9850fb 100644--- a/src/openhuman/flows/builder_tools_tests.rs+++ b/src/openhuman/flows/builder_tools_tests.rs@@ -170,18 +170,23 @@ fn schedule_trigger_graph() -> Value {// ── save_workflow: enforcing binding-resolvability gate ─────────────────────/// The proven live-failure shape (same as-/// `tools_tests::propose_workflow_rejects_unschemad_agent_binding`): a-/// `summarize` agent with no `output_parser.schema`, and a `notify` tool_call-/// binding `args.channel` to its (unschemad, therefore unresolvable) output.+/// `tools_tests::propose_workflow_rejects_agent_binding_missing_declared_field`):+/// a `summarize` agent whose declared output schema omits `channel`, and a+/// `notify` tool_call binding `args.channel` to that unaddressable output.+/// A schema-less agent is deliberately accepted by TinyFlows: its host-defined+/// output may contain structured JSON, so the field is unverifiable rather+/// than certainly absent.fn unresolvable_binding_graph() -> Value {json!({"nodes": [{ "id": "t", "kind": "trigger", "name": "Manual" },{ "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "agent_ref": "researcher", "prompt": "summarize" } },+ "config": { "agent_ref": "researcher", "prompt": "summarize",+ "output_parser": { "schema": { "type": "object",+ "properties": { "summary": { "type": "string" } } } } } },{ "id": "notify", "kind": "tool_call", "name": "Notify","config": { "slug": "SLACK_SEND_MESSAGE",- "args": { "channel": "=nodes.summarize.item.json.channel" } } }+ "args": { "channel": "=nodes.summarize.item.json.channel", "text": "A notification" } } }],"edges": [{ "from_node": "t", "to_node": "summarize" },diff --git a/src/openhuman/flows/builder_tools_tests_part_03_tests.rs b/src/openhuman/flows/builder_tools_tests_part_03_tests.rsindex e37c634c0d..65880d8c28 100644--- a/src/openhuman/flows/builder_tools_tests_part_03_tests.rs+++ b/src/openhuman/flows/builder_tools_tests_part_03_tests.rs@@ -338,7 +338,7 @@ async fn save_workflow_surfaces_auto_disarm_warning_on_manual_to_automatic_trans}#[tokio::test]-async fn save_workflow_rejects_unschemad_agent_binding() {+async fn save_workflow_rejects_agent_binding_missing_declared_field() {let tmp = TempDir::new().unwrap();let config = test_config(&tmp);let flow_id = seed_flow(&config, "Blank flow").await;diff --git a/src/openhuman/flows/ops_tests_part_06_tests.rs b/src/openhuman/flows/ops_tests_part_06_tests.rsindex fb6f9a4f57..2151f0e7b1 100644--- a/src/openhuman/flows/ops_tests_part_06_tests.rs+++ b/src/openhuman/flows/ops_tests_part_06_tests.rs@@ -592,14 +592,17 @@ fn flow_stream_target_generates_request_id_when_absent_or_blank() {}#[test]-fn binding_to_agent_without_schema_is_rejected() {- // The exact live-failure shape: `summarize` has no `output_parser.schema`- // at all, so its structured output has no addressable `channel` field.+fn binding_to_agent_schema_missing_field_is_rejected() {+ // TinyFlows deliberately permits a schema-less agent because its host+ // runner can return arbitrary structured JSON. A declared schema that+ // omits `channel`, however, proves this binding is unaddressable.let g = graph(json!({"nodes": [{ "id": "t", "kind": "trigger", "name": "Manual" },{ "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "agent_ref": "researcher", "prompt": "summarize" } },+ "config": { "agent_ref": "researcher", "prompt": "summarize",+ "output_parser": { "schema": { "type": "object",+ "properties": { "summary": { "type": "string" } } } } } },{ "id": "post", "kind": "tool_call", "name": "Post","config": { "slug": "SLACK_SEND_MESSAGE","args": { "channel": "=nodes.summarize.item.json.channel" } } }diff --git a/src/openhuman/flows/tools_tests.rs b/src/openhuman/flows/tools_tests.rsindex b561a22ace..5c4283e210 100644--- a/src/openhuman/flows/tools_tests.rs+++ b/src/openhuman/flows/tools_tests.rs@@ -378,10 +378,10 @@ fn display_label_humanizes_the_tool_name() {// ── enforcing binding-resolvability gate ────────────────────────────────────#[tokio::test]-async fn propose_workflow_rejects_unschemad_agent_binding() {- // The proven live-failure graph: `summarize` has no `output_parser.schema`,- // so `post`'s `args.channel` binding is guaranteed to resolve null at- // runtime. Unlike the advisory dry-run check, propose_workflow must+async fn propose_workflow_rejects_agent_binding_missing_declared_field() {+ // A declared schema that omits `channel` proves `notify`'s binding resolves+ // null at runtime. Unlike a schema-less agent (whose host-defined output is+ // merely unverifiable), propose_workflow must// REJECT this outright rather than warn (warning_count would have been 0// here — nothing stopped this from reaching save_workflow before).let tmp = TempDir::new().unwrap();@@ -391,10 +391,12 @@ async fn propose_workflow_rejects_unschemad_agent_binding() {"nodes": [{ "id": "t", "kind": "trigger", "name": "Manual" },{ "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "agent_ref": "researcher", "prompt": "summarize" } },+ "config": { "agent_ref": "researcher", "prompt": "summarize",+ "output_parser": { "schema": { "type": "object",+ "properties": { "summary": { "type": "string" } } } } } },{ "id": "notify", "kind": "tool_call", "name": "Notify","config": { "slug": "SLACK_SEND_MESSAGE",- "args": { "channel": "=nodes.summarize.item.json.channel" } } }+ "args": { "channel": "=nodes.summarize.item.json.channel", "text": "A notification" } } }],"edges": [{ "from_node": "t", "to_node": "summarize" },diff --git a/src/openhuman/integrations/composio/module_client.rs b/src/openhuman/integrations/composio/module_client.rsindex 7f349272a7..4fa8a767df 100644--- a/src/openhuman/integrations/composio/module_client.rs+++ b/src/openhuman/integrations/composio/module_client.rs@@ -50,6 +50,19 @@ fn normalize_error(member: &str, error: String) -> String {if module_error.starts_with(CLASSIFIED) {return module_error.to_string();}+ // Recent TinyBus versions wrap member failures in their wire error+ // name before preserving the module's message:+ // `Execute: ai.tinyhumans.tinybus.Error.Failed: [composio:error:…]`.+ // That wrapper is transport context, not provider text, so retain the+ // frontend's byte-zero classification contract exactly as for the+ // older unwrapped shape. Do not promote an arbitrary embedded marker:+ // it must follow this known TinyBus failure prefix.+ const TINYBUS_FAILED: &str = "ai.tinyhumans.tinybus.Error.Failed: ";+ if let Some(classified) = module_error.strip_prefix(TINYBUS_FAILED) {+ if classified.starts_with(CLASSIFIED) {+ return classified.to_string();+ }+ }}error}diff --git a/src/openhuman/integrations/composio/module_client_tests.rs b/src/openhuman/integrations/composio/module_client_tests.rsindex 7ecd5b8e20..f323370f5a 100644--- a/src/openhuman/integrations/composio/module_client_tests.rs+++ b/src/openhuman/integrations/composio/module_client_tests.rs@@ -13,6 +13,17 @@ fn classified_errors_start_with_the_frontend_marker() {);}+#[test]+fn classified_errors_stay_at_byte_zero_after_tinybus_failure_wrapping() {+ assert_eq!(+ super::normalize_error(+ methods::EXECUTE,+ "Execute: ai.tinyhumans.tinybus.Error.Failed: [composio:error:rate_limited] Please retry later".to_string()+ ),+ "[composio:error:rate_limited] Please retry later"+ );+}+#[test]fn unclassified_errors_keep_the_member_context() {assert_eq!(diff --git a/src/openhuman/integrations/composio/ops_tests_part_01_tests.rs b/src/openhuman/integrations/composio/ops_tests_part_01_tests.rsindex e35ebe7303..a8c1de96a7 100644--- a/src/openhuman/integrations/composio/ops_tests_part_01_tests.rs+++ b/src/openhuman/integrations/composio/ops_tests_part_01_tests.rs@@ -71,9 +71,15 @@ async fn composio_list_capabilities_does_not_require_session() {.capabilities.iter().any(|entry| { entry.toolkit == "gmail" && entry.native_provider && entry.memory_ingest }));- assert!(outcome.value.capabilities.iter().any(|entry| {- entry.toolkit == "googlecalendar" && !entry.native_provider && entry.curated_tools- }));+ // Capabilities now come from the connector module, rather than the old+ // host-side TinyMemory provider matrix. The module's current contract has+ // no Google Calendar row; keep this regression focused on the sessionless+ // compiled capability that consumers rely on.+ assert!(outcome+ .value+ .capabilities+ .iter()+ .any(|entry| { entry.toolkit == "gmail" && entry.tool_execution }));}#[tokio::test]