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(channels): add READMEs for channels, providers, and runtime
Steven Enamakel05ebe78485be
diff --git a/crates/openhuman-core/src/channels/README.md b/crates/openhuman-core/src/channels/README.mdindex 6cb9b38d04..e72f8fe03e 100644--- a/crates/openhuman-core/src/channels/README.md+++ b/crates/openhuman-core/src/channels/README.md@@ -71,6 +71,10 @@ The subscriber derives a thread id from (channel, sender, reply target, thread)BackendProgressiveSender --> backend REST```+### Path 3: gateway-relayed inbound (`channel_relay_inbound`)++A gateway that owns a hosted platform's webhook (the SaaS cloud gateway for Telegram, iMessage and Discord) relays each message in as its user with `openhuman.channel_relay_inbound` ([`providers/relay/`](./providers/relay/README.md)). The message is recorded on the caller's `channel:<channel>/<sender>/<chat>` thread (`derive_inbound_thread_id`), then runs through the Path 1 pipeline (`process_channel_message`, `ExternalChannel` origin) with a runtime context built from the caller's own config. Replies go to `RelayChannel`, which publishes them as `channel_outbound` events on the caller's `/events` stream for the gateway to deliver, and are recorded on the thread.+### Outbound: proactive messages[`proactive.rs`](./proactive.rs) subscribes to `DomainEvent::ProactiveMessageRequested`. Every proactive message goes to the web channel (`web_chat::publish_web_channel_event`). If the user has set an active external channel and that channel is in the started channel map, it is sent there too. The always-on boot registers a web-only variant (`register_web_only_proactive_subscriber`); the full runtime registers one with the real channel map and publishes its active-channel handle, so `channels.set_default` (through `set_runtime_active_channel`) takes effect without a restart.diff --git a/crates/openhuman-core/src/channels/providers/README.md b/crates/openhuman-core/src/channels/providers/README.mdindex 3a9ff1c493..99fb27896c 100644--- a/crates/openhuman-core/src/channels/providers/README.md+++ b/crates/openhuman-core/src/channels/providers/README.md@@ -24,6 +24,10 @@ Implementations live in [`vendor/tinychannels/src/providers/`](../../../../../ve`CliChannel` is not a provider re-export: `channels/mod.rs` takes it from the ungated `tinychannels-runtime` crate.+## Relay++[`relay/`](./relay/README.md) is not a provider transport. It is the host entry for messages a gateway relays in from a hosted platform (`openhuman.channel_relay_inbound`), answered through the dispatch pipeline with replies published as `channel_outbound` events.+## Capabilities, not provider special casesWhat a provider can do beyond send/receive is declared once, upstream, in `tinychannels_bus::capabilities_for` (`ChannelCapabilities`): `remote_control`, `chat_approvals`, `progressive_edits` and `history_key_ignores_thread`. The host reads those flags instead of comparing channel names:diff --git a/crates/openhuman-core/src/channels/runtime/README.md b/crates/openhuman-core/src/channels/runtime/README.mdindex 12d94f7c86..b480cecb42 100644--- a/crates/openhuman-core/src/channels/runtime/README.md+++ b/crates/openhuman-core/src/channels/runtime/README.md@@ -6,7 +6,7 @@ Boots every enabled channel, keeps their listeners alive, and dispatches inbound| Path | Purpose || --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| [`startup.rs`](./startup.rs) (+ `startup/`: `start_channels.rs`, `credentials.rs`, `chat_workload.rs`, `prompt.rs`, `relay.rs`) | `start_channels` builds the `channels::host` capability surface, hydrates secrets that live outside `config.toml` (`hydrate_channel_credentials`: email password, Yuanbao app secret, via `security::credentials::AuthService`), calls `tinychannels::build_channels`, registers the startup bus subscribers, spawns a supervised listener per channel and the optional relay runtime, then runs the dispatch loop |+| [`startup.rs`](./startup.rs) (+ `startup/`: `start_channels.rs`, `credentials.rs`, `chat_workload.rs`, `prompt.rs`, `relay.rs`, `turn_parts.rs`) | `start_channels` builds the `channels::host` capability surface, hydrates secrets that live outside `config.toml` (`hydrate_channel_credentials`: email password, Yuanbao app secret, via `security::credentials::AuthService`), calls `tinychannels::build_channels`, registers the startup bus subscribers, spawns a supervised listener per channel and the optional relay runtime, then runs the dispatch loop. `turn_parts.rs` (`build_channel_turn_parts`, `runtime_context`) builds the model, tools, prompt and `ChannelRuntimeContext` from a config without installing any process-global state; `start_channels` and the hosted-channel relay (`providers/relay/`) share it || [`supervision.rs`](./supervision.rs) | `spawn_supervised_listener` re-runs `Channel::listen` in a loop with exponential backoff plus full jitter, publishing `DomainEvent::ChannelConnected` / `ChannelDisconnected` / `HealthRestarted`; re-exports `tinychannels::runtime::compute_max_in_flight_messages` || `dispatch/` | The inbound pipeline that turns a `RuntimeChannelMessage` into an agent turn and a reply || [`test_support.rs`](./test_support.rs) | `#[cfg(any(test, debug_assertions))]` dispatch harness (`run_dispatch_harness`, `DispatchHarnessOptions`) used by `channels/tests/` and raw coverage |