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: import shared types directly from their source crates
Steven Enamakel031ba5bbe1ab
diff --git a/crates/openhuman-core/src/desktop/app_state/ops/types.rs b/crates/openhuman-core/src/desktop/app_state/ops/types.rsindex 49f18a0a06..6fdd1f01ae 100644--- a/crates/openhuman-core/src/desktop/app_state/ops/types.rs+++ b/crates/openhuman-core/src/desktop/app_state/ops/types.rs@@ -1,10 +1,10 @@//! Serde types exchanged with the frontend: the persisted local app-state//! blob, the patch applied to it, and the polled `app_state_snapshot` shape.-use crate::inference::LocalAiStatus;use crate::platform::service::ServiceStatus;use serde::{Deserialize, Serialize};use serde_json::Value;+use tinyinference_local::status::LocalAiStatus;#[derive(Debug, Clone, Serialize, Deserialize, Default)]#[serde(rename_all = "camelCase")]diff --git a/crates/openhuman-core/src/inference/host_runtime/core.rs b/crates/openhuman-core/src/inference/host_runtime/core.rsindex d04799e3a9..d425e6b7c9 100644--- a/crates/openhuman-core/src/inference/host_runtime/core.rs+++ b/crates/openhuman-core/src/inference/host_runtime/core.rs@@ -2,7 +2,7 @@ use std::sync::Arc;use crate::config::Config;-use super::service::LocalAiService;+use tinyinference_local::service::LocalAiService;static LOCAL_AI: once_cell::sync::OnceCell<Arc<LocalAiService>> = once_cell::sync::OnceCell::new();diff --git a/crates/openhuman-core/src/inference/host_runtime/mod.rs b/crates/openhuman-core/src/inference/host_runtime/mod.rsindex c6e42f8ef3..6e8f409972 100644--- a/crates/openhuman-core/src/inference/host_runtime/mod.rs+++ b/crates/openhuman-core/src/inference/host_runtime/mod.rs@@ -36,4 +36,4 @@ pub use schemas::{all_controller_schemas as all_local_inference_controller_schemas,all_registered_controllers as all_local_inference_registered_controllers,};-pub use service::LocalAiService;+pub use tinyinference_local::service::LocalAiService;diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/runtime_ops.rs b/crates/openhuman-core/src/inference/host_runtime/ops/runtime_ops.rsindex fe3f402f89..ff3a50e47a 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops/runtime_ops.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops/runtime_ops.rs@@ -7,7 +7,10 @@ use chrono::Utc;use crate::config::Config;use crate::core::Outcome;use crate::inference::host_runtime as local_ai;-use crate::inference::{LocalAiSpeechResult, LocalAiStatus, LocalAiTtsResult};+use {+ tinyinference_local::status::LocalAiSpeechResult, tinyinference_local::status::LocalAiStatus,+ tinyinference_local::status::LocalAiTtsResult,+};use super::turn_guards::enforce_user_prompt_or_reject;diff --git a/crates/openhuman-core/src/inference/host_runtime/service/mod.rs b/crates/openhuman-core/src/inference/host_runtime/service/mod.rsindex 7bf5890975..b2a74bd45c 100644--- a/crates/openhuman-core/src/inference/host_runtime/service/mod.rs+++ b/crates/openhuman-core/src/inference/host_runtime/service/mod.rs@@ -3,4 +3,4 @@mod speech;pub use speech::{transcribe, transcribe_with_prompt, tts};-pub use tinyinference_local::service::LocalAiService;+use tinyinference_local::service::LocalAiService;diff --git a/crates/openhuman-core/src/inference/host_runtime/service/speech.rs b/crates/openhuman-core/src/inference/host_runtime/service/speech.rsindex e35bbdb6e3..5ddb202710 100644--- a/crates/openhuman-core/src/inference/host_runtime/service/speech.rs+++ b/crates/openhuman-core/src/inference/host_runtime/service/speech.rs@@ -9,7 +9,7 @@ use crate::voice::{create_stt_provider, effective_stt_provider};use tinyinference_local::models as model_ids;use tinyinference_local::status::{LocalAiSpeechResult, LocalAiTtsResult};-use super::LocalAiService;+use tinyinference_local::service::LocalAiService;const LOG_PREFIX: &str = "[speech]";diff --git a/crates/openhuman-core/src/inference/mod.rs b/crates/openhuman-core/src/inference/mod.rsindex 4c3cb2e1fe..bd51f4715b 100644--- a/crates/openhuman-core/src/inference/mod.rs+++ b/crates/openhuman-core/src/inference/mod.rs@@ -45,7 +45,7 @@ pub use schemas::{pub use host_runtime::all_local_inference_controller_schemas;pub use host_runtime::all_local_inference_registered_controllers;pub use model_context::context_window_for_model;-pub use tinyinference_local::status::{+use tinyinference_local::status::{LocalAiEmbeddingResult, LocalAiSpeechResult, LocalAiStatus, LocalAiTtsResult,};diff --git a/crates/openhuman-core/src/inference/ops.rs b/crates/openhuman-core/src/inference/ops.rsindex e56029829f..35133aa629 100644--- a/crates/openhuman-core/src/inference/ops.rs+++ b/crates/openhuman-core/src/inference/ops.rs@@ -5,11 +5,11 @@ use crate::config::Config;use crate::core::Outcome;use crate::inference::host_runtime as local_runtime;use crate::inference::provider as providers;-use crate::inference::LocalAiStatus;use serde_json::{json, Value};use tinyinference_llm::message::Message;use tinyinference_llm::model::ModelRequest;use tinyinference_llm::sentiment::{parse_sentiment_response, SentimentResult};+use tinyinference_local::status::LocalAiStatus;use tracing::{debug, error, warn};const LOG_PREFIX: &str = "[inference::ops]";diff --git a/crates/openhuman-core/src/voice/types.rs b/crates/openhuman-core/src/voice/types.rsindex 7cbbbcdb7a..4f640b3d9f 100644--- a/crates/openhuman-core/src/voice/types.rs+++ b/crates/openhuman-core/src/voice/types.rs@@ -2,7 +2,9 @@use serde::{Deserialize, Serialize};-use crate::inference::{LocalAiSpeechResult, LocalAiTtsResult};+use {+ tinyinference_local::status::LocalAiSpeechResult, tinyinference_local::status::LocalAiTtsResult,+};/// Result of a speech-to-text transcription.#[derive(Debug, Clone, Serialize, Deserialize)]diff --git a/crates/openhuman-core/src/web3/wallet/ops.rs b/crates/openhuman-core/src/web3/wallet/ops.rsindex 18adadf11d..fcce15dfd0 100644--- a/crates/openhuman-core/src/web3/wallet/ops.rs+++ b/crates/openhuman-core/src/web3/wallet/ops.rs@@ -9,9 +9,12 @@ mod types;use types::StoredWalletState;pub(crate) use types::WalletSecretMaterial;-pub use types::{- RevealRecoveryPhraseResult, WalletAccount, WalletChain, WalletSetupParams, WalletSetupSource,- WalletStatus, WALLET_NOT_CONFIGURED_MESSAGE,+pub use {+ tinywallet_web3::crypto::wallet::WalletAccount, tinywallet_web3::crypto::wallet::WalletChain,+ tinywallet_web3::crypto::wallet::WalletSetupSource,+ tinywallet_web3::crypto::wallet::WalletStatus,+ tinywallet_web3::quote::WALLET_NOT_CONFIGURED_MESSAGE, types::RevealRecoveryPhraseResult,+ types::WalletSetupParams,};use log::debug;diff --git a/crates/openhuman-core/src/web3/wallet/ops/types.rs b/crates/openhuman-core/src/web3/wallet/ops/types.rsindex fc39daf778..15fe462504 100644--- a/crates/openhuman-core/src/web3/wallet/ops/types.rs+++ b/crates/openhuman-core/src/web3/wallet/ops/types.rs@@ -4,14 +4,14 @@ use serde::{Deserialize, Serialize};// The wallet's vocabulary lives in `tinywallet-web3`, which the engine and the// tools share; the host keeps only the persisted shape and the setup params.-pub use tinywallet_web3::crypto::wallet::{+use tinywallet_web3::crypto::wallet::{WalletAccount, WalletChain, WalletSetupSource, WalletStatus,};/// Error message returned when the wallet has not been set up yet. Downstream/// boundaries match against it to classify the condition as an expected user/// state, so it stays out of Sentry; it is defined once in `tinywallet-web3`/// so the producer and any classifier cannot drift apart.-pub use tinywallet_web3::quote::WALLET_NOT_CONFIGURED_MESSAGE;+use tinywallet_web3::quote::WALLET_NOT_CONFIGURED_MESSAGE;#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]#[serde(rename_all = "camelCase")]diff --git a/crates/openhuman-embed/src/cron.rs b/crates/openhuman-embed/src/cron.rsindex 6151708471..88b8ca58de 100644--- a/crates/openhuman-embed/src/cron.rs+++ b/crates/openhuman-embed/src/cron.rs@@ -62,8 +62,8 @@ use openhuman_core::config::Config;use openhuman_core::cron::policy::{self, JobPolicy};use openhuman_core::cron::system_jobs::SYSTEM_COMMAND_PREFIX;use {- openhuman_core::cron::CronJob, openhuman_core::cron::CronJobPatch,- openhuman_core::cron::JobType, openhuman_core::cron::Schedule,+ tinyflows_schedule::types::CronJob, tinyflows_schedule::types::CronJobPatch,+ tinyflows_schedule::types::JobType, tinyflows_schedule::types::Schedule,};pub use openhuman_core::cron::system_job_handlers::SystemJobContext;@@ -531,7 +531,7 @@ fn create(Some(name.to_string()),schedule,prompt,- openhuman_core::cron::SessionTarget::Isolated,+ tinyflows_schedule::types::SessionTarget::Isolated,None,None,false,