Skip to content

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

docs: standardize punctuation in README files

Steven Enamakel53851b07f493
diff --git a/crates/openhuman-core/src/cron/README.md b/crates/openhuman-core/src/cron/README.md
index a6bf463c4b..b7ac61f192 100644
--- a/crates/openhuman-core/src/cron/README.md
+++ b/crates/openhuman-core/src/cron/README.md
@@ -4,22 +4,22 @@ Scheduled-job runtime. Owns cron-expression and human-delay parsing, the persist
## Public surface
-- `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 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.
-- `pub mod bus` — `bus.rs` — `CronDeliverySubscriber` (`cron::delivery`) consumes `CronDeliveryRequested` and sends through the named `tinychannels_bus::Channel`.
-- `pub mod tools` — `tools.rs` + `tools/` — agent-facing tools: `CronAddTool`, `CronListTool`, `CronUpdateTool`, `CronRemoveTool`, `CronRunTool`, `CronRunsTool`, and the collapsed `CronTool` / `CRON_TOOL_NAME`. `tools/collapsed.rs` explains why the six stay registered as hidden schemas behind the one advertised tool; see also [tools/README.md](tools/README.md).
-- RPC namespace `cron`: `add`, `list`, `update`, `remove`, `run`, `runs` — `schemas.rs` (aggregated as `all_cron_controller_schemas` / `all_cron_registered_controllers`).
+- `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 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.
+- `pub mod bus`: `bus.rs`: `CronDeliverySubscriber` (`cron::delivery`) consumes `CronDeliveryRequested` and sends through the named `tinychannels_bus::Channel`.
+- `pub mod tools`: `tools.rs` + `tools/`: agent-facing tools: `CronAddTool`, `CronListTool`, `CronUpdateTool`, `CronRemoveTool`, `CronRunTool`, `CronRunsTool`, and the collapsed `CronTool` / `CRON_TOOL_NAME`. `tools/collapsed.rs` explains why the six stay registered as hidden schemas behind the one advertised tool; see also [tools/README.md](tools/README.md).
+- RPC namespace `cron`: `add`, `list`, `update`, `remove`, `run`, `runs`: `schemas.rs` (aggregated as `all_cron_controller_schemas` / `all_cron_registered_controllers`).
## Job types
-- **`shell`** — `run_job_command_with_timeout` refuses the command unless the `SecurityPolicy` (`SecurityPolicy::from_config`, built once in `scheduler::run` and per call in `execute_job_now`) passes `can_act`, `is_rate_limited`, and `is_command_allowed`; a `blocked by security policy:` result is never retried.
-- **`agent`** — the scheduler builds an `Agent` directly and runs a turn (see below); it does not go through `agent::triage`.
-- **`flow`** — a `flows::Flow` schedule-trigger binding. `flows/ops/triggers.rs::bind_schedule_trigger` creates it via `add_flow_schedule_job` (idempotent through `find_flow_schedule_job`) from both `flows_set_enabled` and `reconcile_schedule_triggers_on_boot`. Its `command` column carries the bound flow's id; on fire `run_flow_schedule_job` publishes `DomainEvent::FlowScheduleTick { flow_id }` instead of running anything itself. `flows::bus::FlowTriggerSubscriber` does the actual dispatch. Never created via the `cron_add` agent tool, whose `job_type` enum is `shell` / `agent` only.
+- **`shell`**: `run_job_command_with_timeout` refuses the command unless the `SecurityPolicy` (`SecurityPolicy::from_config`, built once in `scheduler::run` and per call in `execute_job_now`) passes `can_act`, `is_rate_limited`, and `is_command_allowed`; a `blocked by security policy:` result is never retried.
+- **`agent`**: the scheduler builds an `Agent` directly and runs a turn (see below); it does not go through `agent::triage`.
+- **`flow`**: a `flows::Flow` schedule-trigger binding. `flows/ops/triggers.rs::bind_schedule_trigger` creates it via `add_flow_schedule_job` (idempotent through `find_flow_schedule_job`) from both `flows_set_enabled` and `reconcile_schedule_triggers_on_boot`. Its `command` column carries the bound flow's id; on fire `run_flow_schedule_job` publishes `DomainEvent::FlowScheduleTick { flow_id }` instead of running anything itself. `flows::bus::FlowTriggerSubscriber` does the actual dispatch. Never created via the `cron_add` agent tool, whose `job_type` enum is `shell` / `agent` only.
### Agent jobs
@@ -33,42 +33,42 @@ Cron publishes through `core/bus.rs` using variants declared in `core/events.rs`
## Calls into
-- `crates/openhuman-core/src/agent/` — `Agent::from_config_for_agent` for agent jobs and `agent::harness::definition::AgentDefinitionRegistry` to resolve `agent_id`.
-- `crates/openhuman-core/src/security/` — `SecurityPolicy::from_config` gates shell jobs.
-- `crates/openhuman-core/src/config/` — `Config` provides poll interval, workspace dir, autonomy policy, retry counts, and per-job model overrides.
-- `crates/openhuman-core/src/inference/` — `provider::create_chat_model_with_model_id` resolves workload-hint model specs on agent-definition overrides.
-- `crates/openhuman-core/src/platform/health/` — `health::bus::register_health_subscriber` on scheduler startup.
-- `crates/openhuman-core/src/core/bus.rs` / `core/events.rs` — the process-wide event bus and `DomainEvent` variants cron publishes.
+- `crates/openhuman-core/src/agent/`: `Agent::from_config_for_agent` for agent jobs and `agent::harness::definition::AgentDefinitionRegistry` to resolve `agent_id`.
+- `crates/openhuman-core/src/security/`: `SecurityPolicy::from_config` gates shell jobs.
+- `crates/openhuman-core/src/config/`: `Config` provides poll interval, workspace dir, autonomy policy, retry counts, and per-job model overrides.
+- `crates/openhuman-core/src/inference/`: `provider::create_chat_model_with_model_id` resolves workload-hint model specs on agent-definition overrides.
+- `crates/openhuman-core/src/platform/health/`: `health::bus::register_health_subscriber` on scheduler startup.
+- `crates/openhuman-core/src/core/bus.rs` / `core/events.rs`: the process-wide event bus and `DomainEvent` variants cron publishes.
## Called by
-- `crates/openhuman-core/src/core/runtime/services.rs` — spawns `cron::scheduler::run` as the `cron` background service (`ServiceSet::cron`).
-- `crates/openhuman-core/src/core/all.rs` — controller registry wires `all_cron_registered_controllers`.
-- `crates/openhuman-core/src/tools/impl/system/schedule.rs` — the `schedule` tool exposes recurring and one-shot scheduling to agents on top of `cron::{list_jobs, get_job, …}`.
-- `crates/openhuman-core/src/channels/runtime/startup/start_channels.rs` — registers `cron::bus::CronDeliverySubscriber` with the channel map; `channels::proactive::ProactiveMessageSubscriber` handles `ProactiveMessageRequested`.
-- `crates/openhuman-core/src/flows/ops/triggers.rs` — `bind_schedule_trigger` / `unbind_schedule_trigger` create and remove flow schedule jobs; `flows::bus::FlowTriggerSubscriber` consumes `FlowScheduleTick`.
-- `crates/openhuman-core/src/config/ops/ui.rs`, `desktop/app_state/`, `security/credentials/` — call `seed::seed_proactive_agents` / `seed::prune_retired_jobs`.
+- `crates/openhuman-core/src/core/runtime/services.rs`: spawns `cron::scheduler::run` as the `cron` background service (`ServiceSet::cron`).
+- `crates/openhuman-core/src/core/all.rs`: controller registry wires `all_cron_registered_controllers`.
+- `crates/openhuman-core/src/tools/impl/system/schedule.rs`: the `schedule` tool exposes recurring and one-shot scheduling to agents on top of `cron::{list_jobs, get_job, …}`.
+- `crates/openhuman-core/src/channels/runtime/startup/start_channels.rs`: registers `cron::bus::CronDeliverySubscriber` with the channel map; `channels::proactive::ProactiveMessageSubscriber` handles `ProactiveMessageRequested`.
+- `crates/openhuman-core/src/flows/ops/triggers.rs`: `bind_schedule_trigger` / `unbind_schedule_trigger` create and remove flow schedule jobs; `flows::bus::FlowTriggerSubscriber` consumes `FlowScheduleTick`.
+- `crates/openhuman-core/src/config/ops/ui.rs`, `desktop/app_state/`, `security/credentials/`: call `seed::seed_proactive_agents` / `seed::prune_retired_jobs`.
## Delivery modes
A cron job's `DeliveryConfig.mode` decides where its output ends up. `DeliveryConfig::default()` is `none`; the `cron_add` tool substitutes `proactive` when an agent job is created without a `delivery` block.
-- **`proactive`** — `deliver_if_configured` publishes
+- **`proactive`**: `deliver_if_configured` publishes
`DomainEvent::ProactiveMessageRequested`. The proactive subscriber
(`channels::proactive`) always pushes to the in-app web stream and additionally
mirrors to `channels_config.active_channel` when set. Use for jobs whose
natural surface is the desktop UI (briefings, app-pushed notifications).
-- **`announce`** — explicit channel-targeted delivery. Requires `channel` and
+- **`announce`**: explicit channel-targeted delivery. Requires `channel` and
`to`; publishes `DomainEvent::CronDeliveryRequested` and lands only in that
channel. The agent layer should pick this mode when a cron is created from a
non-web channel (Telegram, Discord, Slack, …) so the reminder ends up where
the user asked for it. The `cron_add` tool validates `to` against the
channel's `allowed_users` to reject cross-tenant targets.
-- **`none`** — silent; output is stored in `last_output` only.
+- **`none`**: silent; output is stored in `last_output` only.
The `[Channel context]` block built in `channels/runtime/dispatch/helpers.rs`
for non-web inbound turns instructs the model to default to `announce` with the
-current channel + reply target — that is the routing path for the Telegram
+current channel + reply target: that is the routing path for the Telegram
"remind me to drink water" use case in #928.
## Agent-job minimum interval
diff --git a/crates/openhuman-core/src/cron/scheduler_gate/README.md b/crates/openhuman-core/src/cron/scheduler_gate/README.md
index 7ebc4d92a1..5bd4ad5c79 100644
--- a/crates/openhuman-core/src/cron/scheduler_gate/README.md
+++ b/crates/openhuman-core/src/cron/scheduler_gate/README.md
@@ -1,6 +1,6 @@
# scheduler_gate
-Gates background AI work (memory-tree digests, embeddings, summarisation, triage, reflection, local inference) on live host conditions so the process doesn't make the machine visibly lag — especially on battery. It exposes a single process-wide decision point: background workers consult `current_policy()` for a cheap read, or `await wait_for_capacity()` to cooperatively block until the host is ready and hold a slot in a one-permit LLM semaphore. A background sampler refreshes host signals every 30s and recomputes the policy. A separate "signed out" override trumps everything to halt LLM work the moment the app session goes away.
+Gates background AI work (memory-tree digests, embeddings, summarisation, triage, reflection, local inference) on live host conditions so the process doesn't make the machine visibly lag: especially on battery. It exposes a single process-wide decision point: background workers consult `current_policy()` for a cheap read, or `await wait_for_capacity()` to cooperatively block until the host is ready and hold a slot in a one-permit LLM semaphore. A background sampler refreshes host signals every 30s and recomputes the policy. A separate "signed out" override trumps everything to halt LLM work the moment the app session goes away.
## Responsibilities
@@ -31,7 +31,7 @@ From `mod.rs`:
## RPC / controllers
-None. This module exposes no JSON-RPC controllers, schemas, or `handle_*` functions — it is consulted in-process via direct function calls.
+None. This module exposes no JSON-RPC controllers, schemas, or `handle_*` functions: it is consulted in-process via direct function calls.
## Agent tools
@@ -47,7 +47,7 @@ None. State is process-memory only (`OnceLock<Arc<RwLock<State>>>` + a process-w
## Dependencies
-- `crate::config` — reads `Config`, `SchedulerGateConfig` (the `[scheduler_gate]` block: `mode`, `battery_floor`, `cpu_busy_threshold_pct`, `cpu_severe_pct`, `throttled_backoff_ms`, `paused_poll_ms`, `require_ac_power`) and `SchedulerGateMode` (`Auto` / `AlwaysOn` / `Off`).
+- `crate::config`: reads `Config`, `SchedulerGateConfig` (the `[scheduler_gate]` block: `mode`, `battery_floor`, `cpu_busy_threshold_pct`, `cpu_severe_pct`, `throttled_backoff_ms`, `paused_poll_ms`, `require_ac_power`) and `SchedulerGateMode` (`Auto` / `AlwaysOn` / `Off`).
- External crates: `parking_lot` (RwLock/Mutex), `tokio::sync::Semaphore`, `sysinfo` (CPU), `starship_battery` (power probe), `once_cell` (lazy CPU `System`).
No dependency on any other `openhuman` domain or on `crate::core::*`.
@@ -64,9 +64,9 @@ Consumed in-process across the codebase (discoverable via `grep scheduler_gate`)
## Notes / gotchas
- **Single LLM slot is deliberate** (`LLM_SLOTS = 1`): concurrent local Ollama / bge-m3 calls (~1.3 GB resident each) have crashed the user's laptop. Cloud-backend calls bypass this semaphore at the worker layer because they're bandwidth-bound, not RAM-bound.
-- **Backoff happens before semaphore acquisition** so a `Paused`/`Throttled` mode doesn't pile tasks into the semaphore wait queue — they sit in the policy poll loop instead.
+- **Backoff happens before semaphore acquisition** so a `Paused`/`Throttled` mode doesn't pile tasks into the semaphore wait queue: they sit in the policy poll loop instead.
- **`current_policy()` defaults to `Normal` and `wait_for_capacity()` acquires directly when `STATE` is uninitialised** (unit tests / pre-`init_global` bootstrap) so callers never deadlock on a sampler that will never start.
-- **Signed-out override is gated on `STATE.get().is_some()`** on both the reader (`current_policy`/`wait_for_capacity`) and writer (`set_signed_out`) sides. Without this, a stale per-test `signed_out=true` flag (from `clear_session` / 401 / `SessionExpiredSubscriber` tests) would make every later `wait_for_capacity` caller poll forever — the source of the post-#1516 triage-evaluator hangs.
+- **Signed-out override is gated on `STATE.get().is_some()`** on both the reader (`current_policy`/`wait_for_capacity`) and writer (`set_signed_out`) sides. Without this, a stale per-test `signed_out=true` flag (from `clear_session` / 401 / `SessionExpiredSubscriber` tests) would make every later `wait_for_capacity` caller poll forever: the source of the post-#1516 triage-evaluator hangs.
- **Test isolation**: in `cfg(test)` the semaphore and signed-out flag are keyed per tokio runtime ID (`test_state`) so parallel cargo workers and libtest thread reuse don't leak state across `#[tokio::test]`s. `SignedOutTestGuard` snapshots/restores the flag and bypasses the writer-side `STATE` gate.
- **`init_global` is idempotent** (`std::sync::Once`); live config changes go through `update_config`, which recomputes the policy immediately.
- **Server-mode detection** never infers server from "no battery" alone (desktops have none); it requires Linux + no battery + no `DISPLAY`/`WAYLAND_DISPLAY`, or explicit env / k8s / docker signals.
diff --git a/crates/openhuman-core/src/memory/README.md b/crates/openhuman-core/src/memory/README.md
index 0cc28ea27a..e0158395e6 100644
--- a/crates/openhuman-core/src/memory/README.md
+++ b/crates/openhuman-core/src/memory/README.md
@@ -75,7 +75,7 @@ host's own use of the crate: they are not the same set.
`core/all.rs` registers the nine schema families behind the `all_memory_*_registered_controllers`
aliases re-exported from [`mod.rs`](mod.rs): `core_recall`, `documents`,
-`ingest`, `files`, `kv_graph`, `sync`, `learn`, `provider`, `tool_memory` —
+`ingest`, `files`, `kv_graph`, `sync`, `learn`, `provider`, `tool_memory`,
plus [`goals`](goals/)'s, [`people`](people/)'s, and
[`tree`](tree/)'s own `all_memory_tree_*`, `all_retrieval_*`, and
`all_tree_summarizer_*` registered-controller functions,
diff --git a/crates/openhuman-core/src/memory/tools/README.md b/crates/openhuman-core/src/memory/tools/README.md
index fc439688d7..040a3b29b2 100644
--- a/crates/openhuman-core/src/memory/tools/README.md
+++ b/crates/openhuman-core/src/memory/tools/README.md
@@ -2,8 +2,8 @@
Agent-facing memory tools: `Tool` implementations the model can call directly
(as opposed to [`memory/ops/`](../ops/), the RPC handlers used by the app and
-CLI). The module file for this directory is [`memory/tools.rs`](../tools.rs)
-— there is no `tools/mod.rs`: so start there when tracing what is declared
+CLI). The module file for this directory is [`memory/tools.rs`](../tools.rs).
+There is no `tools/mod.rs`, so start there when tracing what is declared
where.
## Layout
diff --git a/crates/openhuman-core/src/memory/tree/README.md b/crates/openhuman-core/src/memory/tree/README.md
index 5149446b14..c81fc234fb 100644
--- a/crates/openhuman-core/src/memory/tree/README.md
+++ b/crates/openhuman-core/src/memory/tree/README.md
@@ -36,7 +36,7 @@ from them (they cannot live in the extracted crate alongside the rest of
namespace deliberately, "to keep the tool surface tightly grouped with the
Phase 1-3 ingest controllers"): `query_source`, `cover_window`,
`search_entities`, `drill_down`, `fetch_leaves`.
-- `all_tree_summarizer_registered_controllers` (`tree_runtime/schemas.rs`) —
+- `all_tree_summarizer_registered_controllers` (`tree_runtime/schemas.rs`):
the `tree_summarizer` namespace: `ingest`, `run`, `query`, `status`,
`rebuild`.