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): update provider docs for module runtime
Steven Enamakel5cf89ab80049
diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.tomlindex aa75e258a5..a0b5ec9302 100644--- a/crates/openhuman-core/Cargo.toml+++ b/crates/openhuman-core/Cargo.toml@@ -863,8 +863,8 @@ crash-reporting = ["dep:sentry"]# `DomainSet::Channels` flag (#4796): this feature narrows the compile-time# surface, `DomainSet` gates it at runtime.#-# Provider runtime remains an audited implementation exception until its bus-# cutover. Channels-backed operations require the process-wide module loader;+# Provider runtime executes inside the compiled TinyChannels module.+# Channels-backed operations require the process-wide module loader;# serialized configuration/messages come from the always-on bus contract.channels = ["modules"]# Retained only to gate legacy provider test fixtures; production channeldiff --git a/crates/openhuman-core/src/channels/providers/README.md b/crates/openhuman-core/src/channels/providers/README.mdindex 243b8f065a..92f3342fab 100644--- a/crates/openhuman-core/src/channels/providers/README.md+++ b/crates/openhuman-core/src/channels/providers/README.md@@ -1,53 +1,26 @@# Providers-Implementations live in [`vendor/tinychannels/src/providers/`](../../../../../vendor/tinychannels/src/providers/), not here. [`mod.rs`](./mod.rs) re-exports each provider module from `tinychannels::providers`, which keeps the stable `crate::channels::providers::<name>` path, and via [`channels/mod.rs`](../mod.rs) the shorter `crate::channels::<name>` path. Provider construction is upstream too: `runtime/startup.rs` calls `tinychannels::build_channels` with a credential-hydrated config and the `channels::host` capability surface.--## Providers--| Provider | Re-exported struct | Feature gate |-| --------------- | -------------------- | -------------------------------------------------------- |-| `dingtalk` | `DingTalkChannel` | `channels` |-| `discord` | `DiscordChannel` | `channels` |-| `email_channel` | `EmailChannel` | `channels` |-| `imessage` | `IMessageChannel` | `channels` |-| `irc` | `IrcChannel` | `channels` |-| `lark` | `LarkChannel` | `channels` |-| `linq` | `LinqChannel` | `channels` |-| `mattermost` | `MattermostChannel` | `channels` |-| `qq` | `QQChannel` | `channels` |-| `signal` | `SignalChannel` | `channels` |-| `slack` | `SlackChannel` | `channels` |-| `telegram` | `TelegramChannel` | `channels` |-| `whatsapp` | `WhatsAppChannel` | `channels` |-| `whatsapp_web` | `WhatsAppWebChannel` | `whatsapp-web` (forwards to `tinychannels/whatsapp-web`) |-| `yuanbao` | `YuanbaoChannel` | `channels` |--The local CLI REPL is OpenHuman orchestration and does not import a TinyChannels CLI provider.+Provider transports and construction live in [`vendor/tinychannels`](../../../../../vendor/tinychannels/) and execute inside its separately loaded TinyBus module. OpenHuman sends credential-hydrated configuration through `modules::channel_runtime`, receives scoped callbacks, and owns product policy and turn orchestration. The provider re-exports in [`mod.rs`](./mod.rs) are test-only compatibility fixtures.++The `channels` feature enables the module loader. It exposes Telegram, Discord, Slack, Signal, WhatsApp, iMessage, IRC, email and the other providers declared by the module. `whatsapp-web` also enables `channels`; its local provider export is used only by tests. The local CLI REPL is OpenHuman orchestration.## 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.+[`relay/`](./relay/README.md) is the host entry for messages a gateway relays from a hosted platform (`openhuman.channel_relay_inbound`). OpenHuman applies its dispatch policy and publishes replies as `channel_outbound` events; relay configuration, pairing and provider delivery execute through the module.-## Capabilities, not provider special cases+## Provider capabilities-What 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:+The contract declares `remote_control`, `chat_approvals`, `progressive_edits` and `history_key_ignores_thread` in `tinychannels_bus::capabilities_for`. The host uses these flags to select product behavior:-- `routes.rs` offers `/status`, `/sessions`, `/new` and `/help` (`tinychannels::remote`) where `remote_control` is set, backed by `host/remote_control.rs`.-- `runtime/dispatch/processor/approval.rs` scopes turns in an `ApprovalChatContext` and intercepts `yes`/`no` replies where `chat_approvals` is set; `host/channel_events.rs::ChannelApprovalSurfaceSubscriber` sends the prompt (`tinychannels::approvals`).-- `host/channel_events.rs::ChannelTurnStateSubscriber` records busy state for `/status`.-- `bus/`'s progressive reply shows draft, thinking and filler bubbles only where `progressive_edits` is set.+- `routes.rs` dispatches remote-control commands through the module and supplies host callbacks for session operations.+- `runtime/dispatch/processor/approval.rs` scopes approval turns; `host/channel_events.rs` presents approval prompts and turn state.+- `bus/` orchestrates progressive replies through module-owned delivery handles.-Ported providers reach host capabilities (voice, approvals, conversation history, shutdown, event sink) through the `tinychannels::host::ProviderContext` built in `channels::host` instead of calling OpenHuman internals directly; see [`channels/host/mod.rs`](../host/mod.rs).+Module requests carrying configuration, credentials or message content use confidential calls. Private runtime handles retain their scoped host callbacks until stop is acknowledged; cancelled or failed cleanup transfers to the process-lifetime reaper.## Adding a provider-Provider transport, registration (`ChannelDefinition` metadata in `tinychannels::controllers`) and its capability entry belong upstream in [`vendor/tinychannels`](../../../../../vendor/tinychannels/). Once a provider exists there:--1. Add it to the `pub use tinychannels::providers::{...}` list in `providers/mod.rs`.-2. Add the matching `pub use providers::<name>` / `pub use <name>::<Name>Channel` pair to `channels/mod.rs`.-3. If the provider's secret lives outside `config.toml` (keyring or env), extend `hydrate_channel_credentials` in `runtime/startup/credentials.rs` the way `email` and `yuanbao` do; `tinychannels::build_channels` expects an already-hydrated config.--Do not reimplement provider transport logic, or branch on a provider name for behaviour a capability flag describes; add the flag upstream instead.+Implement provider transport, contract declarations and registration in the canonical TinyChannels repository first. Consume a released module artifact with verified digests, then extend OpenHuman's configuration and credential hydration where needed. Provider secrets outside `config.toml` are hydrated in `runtime/startup/credentials.rs` before the module receives configuration.## Further readingdiff --git a/crates/openhuman-core/src/channels/providers/mod.rs b/crates/openhuman-core/src/channels/providers/mod.rsindex 060784a66d..52918229c2 100644--- a/crates/openhuman-core/src/channels/providers/mod.rs+++ b/crates/openhuman-core/src/channels/providers/mod.rs@@ -1,4 +1,4 @@-//! Portable provider exports.+//! Hosted relay entry and test-only provider exports.//!//! Provider transports, and the provider-independent remote control and//! in-chat approvals that used to be Telegram glue, belong to `tinychannels`.