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
docs(flows): add README documentation for cron and tinyflows modules
Steven Enamakel5b1d528316fc
diff --git a/crates/openhuman-core/src/cron/README.md b/crates/openhuman-core/src/cron/README.mdindex 8b542b9994..0cd20941ad 100644--- a/crates/openhuman-core/src/cron/README.md+++ b/crates/openhuman-core/src/cron/README.md@@ -7,7 +7,7 @@ Scheduled-job runtime. Owns cron-expression and human-delay parsing, the persist- `pub struct CronJob` / `pub struct CronJobPatch` / `pub struct CronRun` / `pub struct ActiveHours` / `pub enum JobType` / `pub enum Schedule` (`Cron` / `At` / `Every`) / `pub enum SessionTarget` / `pub struct DeliveryConfig`: `types.rs`: durable job + run model.- `pub fn add_once` / `pub fn add_once_at` / `pub fn parse_human_delay` / `pub fn pause_job` / `pub fn resume_job` / `pub fn update_cron_job`: `ops.rs` (also re-exported as `pub use ops as rpc`).- `pub fn schedule_cron_expression` / `pub fn next_run_for_schedule` / `pub fn normalize_expression` / `pub fn validate_schedule` / `pub fn validate_agent_schedule` / `pub fn runs_closer_than` / `pub struct TooFrequent` / `pub const MIN_AGENT_JOB_INTERVAL`: `schedule.rs`.-- `pub fn add_job` / `pub fn add_agent_job` / `pub fn add_agent_job_with_definition` / `pub fn add_shell_job` / `pub fn add_flow_schedule_job` / `pub fn find_flow_schedule_job` / `pub fn due_jobs` / `pub fn get_job` / `pub fn list_jobs` / `pub fn list_runs` / `pub fn record_last_run` / `pub fn record_run` / `pub fn remove_job` / `pub fn reschedule_after_run` / `pub fn update_job`: `store.rs`, split into submodules `store/jobs.rs`, `store/runs.rs`, `store/schema.rs`.+- `pub fn add_job` / `pub fn add_agent_job` / `pub fn add_agent_job_with_definition` / `pub fn add_shell_job` / `pub fn add_flow_schedule_job` / `pub fn find_flow_schedule_job` / `pub fn due_jobs` / `pub fn get_job` / `pub fn list_jobs` / `pub fn list_runs` / `pub fn record_last_run` / `pub fn record_run` / `pub fn remove_job` / `pub fn reschedule_after_run` / `pub fn update_job`: `store.rs`, a thin `Config` -> `CronStoreOptions` wrapper over `tinyflows_sqlite::schedule` (schema, job CRUD and run history live upstream).- `pub mod scheduler` (`pub async fn run(config: Config)`, `pub async fn execute_job_now` for the `cron.run` "Run Now" path): `scheduler.rs`, split into submodules `scheduler/failure_classification.rs` (failure classifiers), `scheduler/retry.rs` (`execute_job_now`, `execute_job_with_retry`), `scheduler/agent_run.rs` (`run_agent_job`, `build_agent_for_cron_job`, `run_flow_schedule_job`), `scheduler/delivery.rs` (`deliver_if_configured`), `scheduler/shell_job.rs` (`run_job_command_with_timeout`), and `scheduler/run_record.rs`; the poll loop and `run` stay in `scheduler.rs` itself.- `pub mod scheduler_gate`: throttles *background* LLM work (memory digests, embeddings, summarisation) on host power / CPU signals via `current_policy()` / `wait_for_capacity()`. It lives here for historical reasons; the cron poll loop does not consult it, and its consumers are `modules/memory_host.rs` and `security/credentials/`. See its own [README](scheduler_gate/README.md).- `pub mod seed`: `seed.rs`: `seed_proactive_agents` installs the built-in proactive jobs when onboarding flips to completed (`config/ops/ui.rs`); `prune_retired_jobs` removes rows for removed features on boot and workspace activation.@@ -91,6 +91,6 @@ that evidence on each run instead (#6158).## Tests-- Unit: `ops_tests.rs`, `scheduler_tests.rs` (shared fixtures; `#[path]`-includes `scheduler_profile_and_shell_tests.rs`, `scheduler_halt_and_persist_tests.rs`, `scheduler_classifier_and_delivery_tests.rs`, `scheduler_frequency_tests.rs`), `store_tests.rs` (+ `store_agent_floor_tests.rs`), `schedule_tests.rs`, `types_tests.rs`, `seed_tests.rs`, `bus_tests.rs`.+- Unit: `ops_tests.rs`, `scheduler_tests.rs` (shared fixtures; `#[path]`-includes `scheduler_profile_and_shell_tests.rs`, `scheduler_halt_and_persist_tests.rs`, `scheduler_classifier_and_delivery_tests.rs`, `scheduler_frequency_tests.rs`), `store_tests.rs` (Config-to-options mapping; the store itself is tested in `tinyflows-sqlite`), `schedule_tests.rs`, `types_tests.rs`, `seed_tests.rs`, `bus_tests.rs`.- Schema/parsing coverage lives in `schemas_tests.rs`.- Tool coverage: `tools/{add,list,remove,run,runs,update}_tests.rs` (announce-mode `allowed_users` checks live in `add_tests.rs`) and `tools/collapsed_tests.rs` (action enum, merged schema, per-action permission resolution).diff --git a/crates/openhuman-core/src/flows/mod.rs b/crates/openhuman-core/src/flows/mod.rsindex 75851b30f5..ee230dac22 100644--- a/crates/openhuman-core/src/flows/mod.rs+++ b/crates/openhuman-core/src/flows/mod.rs@@ -4,7 +4,7 @@//!//! Business logic lives in [`ops`]; persistence in `store` (private, with a//! handful of functions re-exported below for the capability seam's-//! [`crate::flows::tinyflows::caps::FlowStateStore`]); the RPC/CLI+//! `tinyflows_sqlite::flows::SqliteStateStore`); the RPC/CLI//! controller surface in `schemas` (private, re-exported below).//!//! # Gate shape — leaf, not facade@@ -57,8 +57,8 @@ pub use schemas::{all_registered_controllers as all_flows_registered_controllers,};// `kv_get`/`kv_set` are re-exported (not just `pub(crate)`-visible within this-// domain's own module tree) because `tinyflows::caps::FlowStateStore`-// (`crates/openhuman-core/src/flows/tinyflows/caps/state.rs`) lives in a sibling module and needs+// domain's own module tree) because `tinyflows_sqlite::flows::SqliteStateStore`+// (built in `crates/openhuman-core/src/flows/tinyflows/caps/ops.rs`) lives in a sibling module and needs// them to implement `tinyflows::caps::StateStore` without duplicating the// `flow_state` table's persistence logic.// `upsert_flow_run_step` is likewise re-exported for the tinyflows seam: thediff --git a/crates/openhuman-core/src/flows/tinyflows/README.md b/crates/openhuman-core/src/flows/tinyflows/README.mdindex 003ca9b522..8f3226d9dd 100644--- a/crates/openhuman-core/src/flows/tinyflows/README.md+++ b/crates/openhuman-core/src/flows/tinyflows/README.md@@ -45,9 +45,9 @@ security model); this README covers only the host seam.graph, output, or logs.- `code.rs`: `OpenHumanCode` (`CodeRunner`); runs JS/Python through`sandbox::execute_in_sandbox` under `CODE_RUN_TIMEOUT_SECS`.- - `state.rs`: `FlowStateStore` (`StateStore`) over- `flows::{kv_get,kv_set}`, namespaced per flow (`"flow:<id>"`) so saved- flows never collide on a state key.+ - `StateStore` is `tinyflows_sqlite::flows::SqliteStateStore` (built in+ `ops.rs`), namespaced per flow (`"flow:<id>"`) so saved flows never+ collide on a state key.- `resolver.rs`: `OpenHumanWorkflowResolver` (`WorkflowResolver`);resolves a `sub_workflow` node's id to a stored workflow.- `tier.rs`: `enforce_node_tier_gate` / `gate_call_for_tier`: the