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
chore: files changed crates/openhuman-core/src/cron/client.rs,crates/openhuman-core/src/cron/mod.rs,
Steven Enamakel0eda456f24bb
diff --git a/crates/openhuman-core/src/cron/client.rs b/crates/openhuman-core/src/cron/client.rsindex 2a1f89573b..4d527188da 100644--- a/crates/openhuman-core/src/cron/client.rs+++ b/crates/openhuman-core/src/cron/client.rs@@ -16,11 +16,11 @@ use anyhow::{anyhow, Result};use chrono::{DateTime, Duration, Utc};use serde::{de::DeserializeOwned, Serialize};use serde_json::Value;+use tinyflows_bus::schedule::CronJob;use tinyflows_bus::schedule::{members, CheckOriginRequest, DeliveryConfig, JobOrigin, RunsCloserThanRequest, Schedule,SessionTarget, StoreBackend, StoreConfig, StoreOperation, StoreRequest, TooFrequent,};-use tinyflows_bus::schedule::CronJob;use super::documents_port::{self, DocScope};use crate::config::Config;diff --git a/crates/openhuman-core/src/cron/mod.rs b/crates/openhuman-core/src/cron/mod.rsindex 021112ea38..74c77a2ebe 100644--- a/crates/openhuman-core/src/cron/mod.rs+++ b/crates/openhuman-core/src/cron/mod.rs@@ -43,10 +43,10 @@ pub use schemas::{};#[allow(unused_imports)]pub use store::{- add_agent_job_from_spec, add_agent_job_with_definition, add_flow_schedule_job,- add_job, add_shell_job, clear_all_jobs, dedup_named_jobs, delete_queued_runs,- find_flow_schedule_job, get_job, list_jobs, list_runs, record_last_run, record_run,- record_run_with_delivery, remove_job, update_job,+ add_agent_job_from_spec, add_agent_job_with_definition, add_flow_schedule_job, add_job,+ add_shell_job, clear_all_jobs, dedup_named_jobs, delete_queued_runs, find_flow_schedule_job,+ get_job, list_jobs, list_runs, record_last_run, record_run, record_run_with_delivery,+ remove_job, update_job,};// The job, run and schedule records are the tinyflows bus contract's; the// host re-exports them so `cron::Schedule` etc. keep their paths and no type isdiff --git a/crates/openhuman-core/src/cron/ops_delivery_tests.rs b/crates/openhuman-core/src/cron/ops_delivery_tests.rsindex 0224acea91..9d4a3ca970 100644--- a/crates/openhuman-core/src/cron/ops_delivery_tests.rs+++ b/crates/openhuman-core/src/cron/ops_delivery_tests.rs@@ -148,4 +148,3 @@ async fn run_job_now_pairs_trigger_and_completion_after_delivery() {let runs = cron::list_runs(&config, &job.id, 10).unwrap();assert_eq!(runs[0].delivery_status, Some(DeliveryStatus::NotRequested));}-diff --git a/crates/openhuman-core/src/cron/scheduler/shell_job.rs b/crates/openhuman-core/src/cron/scheduler/shell_job.rsindex d3ad2b408b..c41d6987e0 100644--- a/crates/openhuman-core/src/cron/scheduler/shell_job.rs+++ b/crates/openhuman-core/src/cron/scheduler/shell_job.rs@@ -18,12 +18,11 @@ pub(crate) async fn authorize_shell_command() -> Result<(), String> {#[cfg(feature = "modules")]{- let analysis = match crate::modules::tinybox::analyze_command(config, command.to_owned())- .await- {- Ok(analysis) => analysis,- Err(_) => return Err("Command analysis is unavailable.".to_owned()),- };+ let analysis =+ match crate::modules::tinybox::analyze_command(config, command.to_owned()).await {+ Ok(analysis) => analysis,+ Err(_) => return Err("Command analysis is unavailable.".to_owned()),+ };security.check_gated_command_analysis(&analysis).map_err(|_| "blocked by security policy: command rejected".to_owned())?;diff --git a/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs b/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rsindex c7f4996948..b611a8f861 100644--- a/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs@@ -568,4 +568,3 @@ async fn deliver_if_configured_skips_non_announce_mode() {.await.is_ok());}-diff --git a/crates/openhuman-core/src/cron/tools/update_tests.rs b/crates/openhuman-core/src/cron/tools/update_tests.rsindex d8becc583c..521cfa8af5 100644--- a/crates/openhuman-core/src/cron/tools/update_tests.rs+++ b/crates/openhuman-core/src/cron/tools/update_tests.rs@@ -176,10 +176,7 @@ async fn rejects_tightening_an_agent_job_below_five_minutes() {let tmp = TempDir::new().unwrap();let cfg = test_config(&tmp).await;- let mut spec = AgentJobSpec::new(- Schedule::Every { every_ms: 600_000 },- "check my inbox",- );+ let mut spec = AgentJobSpec::new(Schedule::Every { every_ms: 600_000 }, "check my inbox");spec.name = Some("inbox".into());spec.session_target = SessionTarget::Isolated;let job = cron::add_agent_job_from_spec(&cfg, spec).unwrap();diff --git a/crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rs b/crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rsindex b71394b1dc..08ad3c71a2 100644--- a/crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rs+++ b/crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rs@@ -13,7 +13,8 @@ async fn cron_completion_owner_is_event_data_and_survives_repeated_reads() {}async fn handle(&self, event: &DomainEvent) {- if matches!(event, DomainEvent::CronJobCompleted { job_id, .. } if job_id == "shared-completion-id") {+ if matches!(event, DomainEvent::CronJobCompleted { job_id, .. } if job_id == "shared-completion-id")+ {let _ = self.0.send(event.clone());}}@@ -26,18 +27,15 @@ async fn cron_completion_owner_is_event_data_and_survives_repeated_reads() {.unwrap();let context_for = |agent: &str| {- crate::core::runtime::CoreContext::for_test(- crate::core::runtime::DomainSet::full(),- None,- )- .derive_with(- crate::core::runtime::ContextOverlay::new(- crate::config::Config::default(),- crate::core::runtime::DomainSet::full(),- Default::default(),+ crate::core::runtime::CoreContext::for_test(crate::core::runtime::DomainSet::full(), None)+ .derive_with(+ crate::core::runtime::ContextOverlay::new(+ crate::config::Config::default(),+ crate::core::runtime::DomainSet::full(),+ Default::default(),+ )+ .session_agent(agent),)- .session_agent(agent),- )};let mut job = crate::cron::scheduler::run_delivery::stand_in_for_test("unused");job.id = "shared-completion-id".into();@@ -79,8 +77,14 @@ async fn cron_completion_owner_is_event_data_and_survives_repeated_reads() {..} if agent == "completion-owner-b"));- assert_eq!(event_owner(&events[0]).as_deref(), Some("completion-owner-a"));- assert_eq!(event_owner(&events[1]).as_deref(), Some("completion-owner-b"));+ assert_eq!(+ event_owner(&events[0]).as_deref(),+ Some("completion-owner-a")+ );+ assert_eq!(+ event_owner(&events[1]).as_deref(),+ Some("completion-owner-b")+ );assert_eq!(event_owner(&events[0]).as_deref(),Some("completion-owner-a"),