Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-core/src/agent/orchestration/ops_tests.rs,crates/openhuman-cor

Steven Enamakele0ec001f50c7
diff --git a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/ops_tests.rs
index 531ea62051..79ec577144 100644
--- a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/ops_tests.rs
@@ -1,5 +1,4 @@
use super::*;
-use tinyagents_tasks::OrchestrationTaskStatus;
use crate::agent::harness::definition::AgentDefinitionRegistry;
use crate::agent::harness::fork_context::{with_parent_context, ParentExecutionContext};
use crate::agent::prompts::ToolCallFormat;
@@ -11,6 +10,7 @@ use std::sync::{
atomic::{AtomicUsize, Ordering},
Arc,
};
+use tinyagents_tasks::OrchestrationTaskStatus;
use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};
use tinytools::Tool;
use tokio::time::Duration;
diff --git a/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs b/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs
index 3e19210624..fa0a287c00 100644
--- a/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs
+++ b/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs
@@ -2,7 +2,7 @@ use super::*;
#[tokio::test]
async fn edit_workflow_rejects_a_result_that_is_structurally_invalid() {
- use {tinyflows_catalog::DraftOrigin};
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
let draft = ops::flows_draft_create(
@@ -38,7 +38,7 @@ async fn edit_workflow_rejects_a_result_that_is_structurally_invalid() {
#[tokio::test]
async fn edit_workflow_rejects_an_engine_incompatible_result() {
- use {tinyflows_catalog::DraftOrigin};
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
let safe_graph = json!({
@@ -99,7 +99,7 @@ async fn edit_workflow_rejects_an_engine_incompatible_result() {
#[tokio::test]
async fn edit_workflow_does_not_persist_an_incompatible_saved_child_reference() {
- use {tinyflows_catalog::DraftOrigin};
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
let legacy_child = json!({
@@ -185,7 +185,7 @@ async fn edit_workflow_does_not_persist_an_incompatible_saved_child_reference()
#[tokio::test]
async fn edit_workflow_preserves_non_engine_gate_edits_in_the_draft() {
- use {tinyflows_catalog::DraftOrigin};
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
let draft = ops::flows_draft_create(
@@ -332,7 +332,7 @@ fn validate_workflow_report_not_ok_when_gate_errors_present() {
#[tokio::test]
async fn edit_workflow_edits_a_draft_and_writes_back() {
- use {tinyflows_catalog::DraftOrigin};
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
@@ -372,8 +372,8 @@ async fn edit_workflow_edits_a_draft_and_writes_back() {
#[cfg(unix)]
#[tokio::test]
async fn edit_workflow_surfaces_draft_write_back_failure() {
- use {tinyflows_catalog::DraftOrigin};
use std::os::unix::fs::PermissionsExt;
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
diff --git a/crates/openhuman-core/src/flows/bus/run_digest.rs b/crates/openhuman-core/src/flows/bus/run_digest.rs
index 5a7526b4d5..b2dc892af0 100644
--- a/crates/openhuman-core/src/flows/bus/run_digest.rs
+++ b/crates/openhuman-core/src/flows/bus/run_digest.rs
@@ -6,13 +6,13 @@
use crate::config::Config;
use crate::core::events::DomainEvent;
use crate::flows::store;
-use {crate::flows::flow_meta, crate::flows::flow_tag, tinyflows_catalog::FlowRun};
use crate::memory::types::{ForgetParams, ItemsListParams, MAX_LIMIT};
use crate::memory::{MemoryError, MemoryResult};
use async_trait::async_trait;
use std::sync::Arc;
use tinybus::EventHandler;
use tinymemory_api::{ItemKind, MetaFilter, StoreItem};
+use {crate::flows::flow_meta, crate::flows::flow_tag, tinyflows_catalog::FlowRun};
/// Bounds a post-run memory digest to a compact, LLM-cheap size — a single
/// run's summary must never dominate a later `flow_memory_recall`.
diff --git a/crates/openhuman-core/src/flows/bus/trigger.rs b/crates/openhuman-core/src/flows/bus/trigger.rs
index 61f2ae5ea8..bd2328ef12 100644
--- a/crates/openhuman-core/src/flows/bus/trigger.rs
+++ b/crates/openhuman-core/src/flows/bus/trigger.rs
@@ -6,13 +6,13 @@
use crate::config::Config;
use crate::core::events::DomainEvent;
use crate::flows::store;
-use {tinyflows_catalog::Flow};
use async_trait::async_trait;
use serde_json::Value;
use std::collections::HashSet;
use std::sync::{Arc, Mutex};
use tinybus::EventHandler;
use tinyflows::model::TriggerKind;
+use tinyflows_catalog::Flow;
/// Reads `trigger_kind` from a flow's trigger node config, deserializing into
/// `tinyflows::model::TriggerKind`. Returns `None` when the flow doesn't have
diff --git a/crates/openhuman-core/src/flows/bus_subscriber_tests.rs b/crates/openhuman-core/src/flows/bus_subscriber_tests.rs
index 005787c9e1..6b420053a2 100644
--- a/crates/openhuman-core/src/flows/bus_subscriber_tests.rs
+++ b/crates/openhuman-core/src/flows/bus_subscriber_tests.rs
@@ -1,6 +1,6 @@
use super::*;
-use tinyflows_catalog::types::FlowRun;
use tinyflows::model::TriggerKind;
+use tinyflows_catalog::types::FlowRun;
#[test]
fn pinned_trigger_inputs_reads_values_an_author_fixed_for_unattended_runs() {
diff --git a/crates/openhuman-core/src/flows/bus_tests.rs b/crates/openhuman-core/src/flows/bus_tests.rs
index 51f900ccf3..e4bdfa74c0 100644
--- a/crates/openhuman-core/src/flows/bus_tests.rs
+++ b/crates/openhuman-core/src/flows/bus_tests.rs
@@ -1,7 +1,7 @@
use super::*;
-use {tinyflows_catalog::Flow};
use serde_json::json;
use tinyflows::model::{Node, NodeKind, WorkflowGraph};
+use tinyflows_catalog::Flow;
/// Binds a fresh in-memory reference engine to `config`'s workspace and
/// returns it, so the digest tests write and read back through one store.
diff --git a/crates/openhuman-core/src/flows/catalogue_tests.rs b/crates/openhuman-core/src/flows/catalogue_tests.rs
index 4929e9b4ac..0bd41db747 100644
--- a/crates/openhuman-core/src/flows/catalogue_tests.rs
+++ b/crates/openhuman-core/src/flows/catalogue_tests.rs
@@ -1,8 +1,8 @@
//! Tests for the flow → catalogue-entry mapping.
use super::*;
-use tinyflows_catalog::types::Flow;
use tinyflows::model::{Node, NodeKind, WorkflowGraph};
+use tinyflows_catalog::types::Flow;
fn node(id: &str, kind: NodeKind, config: serde_json::Value) -> Node {
Node {
diff --git a/crates/openhuman-core/src/flows/discovery_tools_tests.rs b/crates/openhuman-core/src/flows/discovery_tools_tests.rs
index 2143bf3b5b..5ffcd67a03 100644
--- a/crates/openhuman-core/src/flows/discovery_tools_tests.rs
+++ b/crates/openhuman-core/src/flows/discovery_tools_tests.rs
@@ -1,10 +1,10 @@
use super::*;
use crate::config::Config;
use crate::flows::store;
-use tinyflows_catalog::types::SuggestionStatus;
use serde_json::json;
use std::sync::Arc;
use tempfile::TempDir;
+use tinyflows_catalog::types::SuggestionStatus;
fn test_config(tmp: &TempDir) -> Arc<Config> {
let config = Config {
diff --git a/crates/openhuman-core/src/flows/mod.rs b/crates/openhuman-core/src/flows/mod.rs
index 808c7246c4..631f1fac55 100644
--- a/crates/openhuman-core/src/flows/mod.rs
+++ b/crates/openhuman-core/src/flows/mod.rs
@@ -43,14 +43,7 @@ mod store;
pub mod tinyflows;
pub mod tools;
-// The saved-flow model, the cancellation registries and the format importers
-// are `tinyflows-catalog`'s, not this host's — a graph's identity, revision
-// history, runs, drafts and suggestions are the same shapes for anyone keeping
-// a library of workflows. These aliases keep the existing
-// `flows::types::…` / `flows::run_registry::…` / `flows::n8n_import::…` call
-// sites resolving unchanged while the definitions live upstream.
-use tinyflows_catalog::import::n8n as n8n_import;
-use {tinyflows_catalog::build_registry, tinyflows_catalog::run_registry, tinyflows_catalog::types};
+// Portable catalog vocabulary is imported directly from `tinyflows-catalog`.
pub use schemas::{
all_controller_schemas as all_flows_controller_schemas,
@@ -66,7 +59,6 @@ pub use schemas::{
// lives in the sibling `tinyflows` domain and persists each finished step onto
// the `flow_runs` row through this function as the run executes.
pub use store::{kv_get, kv_set, upsert_flow_run_step};
-use {tinyflows_catalog::DraftOrigin, tinyflows_catalog::Flow, tinyflows_catalog::FlowConnection, tinyflows_catalog::FlowDraft, tinyflows_catalog::FlowImport, tinyflows_catalog::FlowRevision, tinyflows_catalog::FlowRun, tinyflows_catalog::FlowRunStep, tinyflows_catalog::FlowRunTrigger, tinyflows_catalog::FlowSuggestion, tinyflows_catalog::FlowValidation, tinyflows_catalog::FlowValidationError, tinyflows_catalog::SuggestionStatus};
pub use {
node_contracts::all_node_kind_contracts, node_contracts::node_kind_contract,
node_contracts::render_node_kinds_line, node_contracts::render_node_kinds_required,
diff --git a/crates/openhuman-core/src/flows/ops.rs b/crates/openhuman-core/src/flows/ops.rs
index a75bc65893..64697ff6e9 100644
--- a/crates/openhuman-core/src/flows/ops.rs
+++ b/crates/openhuman-core/src/flows/ops.rs
@@ -54,17 +54,17 @@ use crate::config::Config;
use crate::core::Outcome;
use crate::flows::bus;
use crate::flows::draft_store;
-use {tinyflows_catalog::run_registry};
use crate::flows::store;
-use tinyflows_catalog::types::{
- FlowConnection, FlowRunStep, FlowRunTrigger, FlowSuggestion, SuggestionStatus,
-};
-use {tinyflows_catalog::Flow, tinyflows_catalog::FlowRun};
use crate::security::approval::{
ApprovalChatContext, FlowRunContext, APPROVAL_CHAT_CONTEXT, APPROVAL_COPILOT_STREAM_CONTEXT,
APPROVAL_FLOW_RUN_CONTEXT,
};
use tinyflows_catalog::build_registry;
+use tinyflows_catalog::run_registry;
+use tinyflows_catalog::types::{
+ FlowConnection, FlowRunStep, FlowRunTrigger, FlowSuggestion, SuggestionStatus,
+};
+use {tinyflows_catalog::Flow, tinyflows_catalog::FlowRun};
/// Overall safety bound on a single `flows_run` / `flows_resume`. Individual
/// capabilities have their own timeouts (HTTP, sandbox), but a hung LLM/tool
diff --git a/crates/openhuman-core/src/flows/ops/drafts.rs b/crates/openhuman-core/src/flows/ops/drafts.rs
index feced646c9..bcd567bc46 100644
--- a/crates/openhuman-core/src/flows/ops/drafts.rs
+++ b/crates/openhuman-core/src/flows/ops/drafts.rs
@@ -43,7 +43,9 @@ pub fn flows_draft_update(
}
/// Lists all drafts, newest-updated first.
-pub fn flows_draft_list(config: &Config) -> Result<Outcome<Vec<tinyflows_catalog::FlowDraft>>, String> {
+pub fn flows_draft_list(
+ config: &Config,
+) -> Result<Outcome<Vec<tinyflows_catalog::FlowDraft>>, String> {
let drafts = draft_store::list_drafts(config).map_err(|e| e.to_string())?;
Ok(Outcome::single_log(drafts, "drafts listed"))
}
diff --git a/crates/openhuman-core/src/flows/ops/validation.rs b/crates/openhuman-core/src/flows/ops/validation.rs
index e4a07ccf03..f95523650c 100644
--- a/crates/openhuman-core/src/flows/ops/validation.rs
+++ b/crates/openhuman-core/src/flows/ops/validation.rs
@@ -138,7 +138,7 @@ pub(crate) fn config_aware_engine_compatibility_errors(
/// result, NOT an `Err`; `Err` is reserved for internal serialization faults
/// (there are none on this path today).
pub fn flows_validate(graph_json: Value) -> Outcome<tinyflows_catalog::FlowValidation> {
- use {tinyflows_catalog::FlowValidation};
+ use tinyflows_catalog::FlowValidation;
tracing::debug!(target: "flows", "[flows] flows_validate: validating candidate graph");
// Split migrate/deserialize (a genuinely single failure) from structural
// validation (which can surface many problems at once). A pre-validation
@@ -236,7 +236,7 @@ pub fn flows_validate(graph_json: Value) -> Outcome<tinyflows_catalog::FlowValid
/// - `"native"` — a tinyflows `WorkflowGraph` JSON (the same shape
/// `flows_create` accepts). Run straight through [`validate_and_migrate_graph`].
/// - `"n8n"` — an n8n workflow export, mapped best-effort by
-/// [`crate::flows::n8n_import`] into a `WorkflowGraph` (unmapped
+/// [`tinyflows_catalog::import::n8n`] into a `WorkflowGraph` (unmapped
/// node types become annotated placeholders, expressions translated where
/// trivial) and THEN run through the same migrate + validate path, so the
/// host engine is the authority on the result's validity.
@@ -255,7 +255,7 @@ pub fn flows_import(
graph_json: Value,
format: Option<String>,
) -> Result<Outcome<tinyflows_catalog::FlowImport>, String> {
- use {crate::flows::n8n_import, tinyflows_catalog::FlowImport};
+ use tinyflows_catalog::{import::n8n as n8n_import, FlowImport};
let requested = format
.as_deref()
diff --git a/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs b/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs
index 5625e601de..d7b84730a6 100644
--- a/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs
@@ -457,7 +457,7 @@ fn referenced_child_compatibility_stops_at_saved_workflow_cycles() {
#[tokio::test]
async fn draft_promote_creates_a_new_flow_and_removes_the_draft() {
- use {tinyflows_catalog::DraftOrigin};
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
@@ -484,7 +484,7 @@ async fn draft_promote_creates_a_new_flow_and_removes_the_draft() {
#[tokio::test]
async fn draft_promote_with_flow_id_updates_the_existing_flow() {
- use {tinyflows_catalog::DraftOrigin};
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
@@ -517,7 +517,7 @@ async fn draft_promote_with_flow_id_updates_the_existing_flow() {
#[tokio::test]
async fn draft_promote_of_invalid_graph_is_rejected_and_keeps_the_draft() {
- use {tinyflows_catalog::DraftOrigin};
+ use tinyflows_catalog::DraftOrigin;
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
diff --git a/crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs b/crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs
index 2a01bc9aaf..559ef60179 100644
--- a/crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs
@@ -29,8 +29,8 @@ use tinyagents_harness::{LangfuseAuth, LangfuseClient, LangfuseTraceConfig};
use tinyflows::engine::GraphObservation as FlowObservation;
use crate::config::Config;
-use {tinyflows_catalog::FlowRunTrigger};
use crate::security::credentials::session_support::direct_backend_credential;
+use tinyflows_catalog::FlowRunTrigger;
const LOG_TARGET: &str = "flows::langfuse";
/// Backend proxy route for Langfuse ingestion (relative to the backend
diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs
index ff61db3208..d51c185abe 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs
@@ -21,12 +21,16 @@ async fn the_module_defers_a_summary_until_requested() {
);
return;
}
- let seen = std::sync::Arc::new(std::sync::Mutex::new(None::<tinyjuice_bus::wire::GenerateRequest>));
+ let seen = std::sync::Arc::new(std::sync::Mutex::new(
+ None::<tinyjuice_bus::wire::GenerateRequest>,
+ ));
let sink = seen.clone();
- let ticket = generate::register(Box::new(move |request: tinyjuice_bus::wire::GenerateRequest| {
- *sink.lock().unwrap() = Some(request);
- Box::pin(async { Ok("the rate limit is 60 requests a minute".to_string()) })
- }));
+ let ticket = generate::register(Box::new(
+ move |request: tinyjuice_bus::wire::GenerateRequest| {
+ *sink.lock().unwrap() = Some(request);
+ Box::pin(async { Ok("the rate limit is 60 requests a minute".to_string()) })
+ },
+ ));
// Over the default 4000-token threshold the test config installs.
let content = "Rate limiting. Requests are limited per key. ".repeat(500);
@@ -277,7 +281,10 @@ async fn released_queries_keep_cached_originals_in_the_module_and_accept_artifac
.call(
"tinyjuice",
methods::COMPRESS,
- (content.clone(), tinyjuice_bus::types::ContentHint::default()),
+ (
+ content.clone(),
+ tinyjuice_bus::types::ContentHint::default(),
+ ),
)
.await
.unwrap();
diff --git a/crates/openhuman-core/src/modules/wallet_service.rs b/crates/openhuman-core/src/modules/wallet_service.rs
index 0db893dafc..34a43cc241 100644
--- a/crates/openhuman-core/src/modules/wallet_service.rs
+++ b/crates/openhuman-core/src/modules/wallet_service.rs
@@ -224,8 +224,12 @@ async fn signing_secret(
let local_chain = match chain {
tinywallet_bus::wire::WalletChain::Evm => tinywallet_web3::crypto::wallet::WalletChain::Evm,
tinywallet_bus::wire::WalletChain::Btc => tinywallet_web3::crypto::wallet::WalletChain::Btc,
- tinywallet_bus::wire::WalletChain::Solana => tinywallet_web3::crypto::wallet::WalletChain::Solana,
- tinywallet_bus::wire::WalletChain::Tron => tinywallet_web3::crypto::wallet::WalletChain::Tron,
+ tinywallet_bus::wire::WalletChain::Solana => {
+ tinywallet_web3::crypto::wallet::WalletChain::Solana
+ }
+ tinywallet_bus::wire::WalletChain::Tron => {
+ tinywallet_web3::crypto::wallet::WalletChain::Tron
+ }
};
let stored = crate::web3::wallet::secret_material(local_chain)
.await
@@ -344,12 +348,18 @@ fn native_wallet_config_request() -> NativeWalletConfigRequest {
}
}
for (chain, key) in [
- (tinywallet_web3::crypto::wallet::WalletChain::Btc, RpcEndpointKey::Btc),
+ (
+ tinywallet_web3::crypto::wallet::WalletChain::Btc,
+ RpcEndpointKey::Btc,
+ ),
(
tinywallet_web3::crypto::wallet::WalletChain::Solana,
RpcEndpointKey::Solana,
),
- (tinywallet_web3::crypto::wallet::WalletChain::Tron, RpcEndpointKey::Tron),
+ (
+ tinywallet_web3::crypto::wallet::WalletChain::Tron,
+ RpcEndpointKey::Tron,
+ ),
] {
let name = crate::web3::wallet::endpoints::env_var_for_chain(chain);
if nonempty_env(name) {
diff --git a/crates/openhuman-core/src/web3/wallet/mod.rs b/crates/openhuman-core/src/web3/wallet/mod.rs
index e3e8c67b37..499e928299 100644
--- a/crates/openhuman-core/src/web3/wallet/mod.rs
+++ b/crates/openhuman-core/src/web3/wallet/mod.rs
@@ -75,16 +75,11 @@ pub use schemas::{
all_wallet_registered_controllers, schemas, wallet_schemas,
};
#[cfg(feature = "web3")]
-use {tinywallet_web3::crypto::abi::encode_erc20_transfer};
-#[cfg(feature = "web3")]
-use {tinywallet_web3::crypto::defaults::evm_asset_catalog, tinywallet_web3::crypto::defaults::explorer_tx_url, tinywallet_web3::crypto::defaults::EvmNetwork, tinywallet_web3::crypto::defaults::RpcSource, tinywallet_web3::crypto::defaults::SolanaCluster, tinywallet_web3::crypto::defaults::WalletAssetDefinition, tinywallet_web3::crypto::defaults::WalletNetworkDefaults};
-#[cfg(feature = "web3")]
pub use {
ops::reveal_recovery_phrase, ops::setup, ops::status, ops::RevealRecoveryPhraseResult,
ops::WalletSetupParams,
};
-
// Retained for the always-on RPC/observability boundary until #7406 exposes
// this shared producer error through the released TinyWallet bus contract.
// Embed must not acquire an implementation dependency for this sentinel.