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 README for providers module
Steven Enamakela8afef8686dc
diff --git a/crates/openhuman-core/src/channels/providers/README.md b/crates/openhuman-core/src/channels/providers/README.mdindex 8cc246434e..4be3cf3815 100644--- a/crates/openhuman-core/src/channels/providers/README.md+++ b/crates/openhuman-core/src/channels/providers/README.md@@ -1,6 +1,6 @@# Providers-Implementations live in `vendor/tinychannels/crates/tinychannels/src/providers/`, not here. Every file in this directory except `mod.rs` is a one-line `pub use tinychannels::providers::<name>::*;` (or a narrower named re-export) that keeps the stable `crate::channels::providers::<name>` path — and, via `channels/mod.rs`, the even shorter `crate::channels::<name>` path — resolving after the extraction. Verify with `grep -L 'tinychannels::providers' providers/*.rs`, which should print only `mod.rs`.+Implementations live in `vendor/tinychannels/crates/tinychannels/src/providers/`, not here. Every flat file in this directory except `mod.rs` is a one-line `pub use tinychannels::providers::<name>::*;` (or a narrower named re-export: `signal`, `slack`, `whatsapp`, `whatsapp_web`) that keeps the stable `crate::channels::providers::<name>` path — and, via `channels/mod.rs`, the shorter `crate::channels::<name>` path — resolving after the extraction. Verify with `grep -L 'tinychannels::providers' providers/*.rs`, which should print only `mod.rs`. Provider construction is upstream too: `runtime/startup.rs` calls `tinychannels::build_channels` with a credential-hydrated config and the `channels::host` capability surface.## Providers@@ -22,24 +22,25 @@ Implementations live in `vendor/tinychannels/crates/tinychannels/src/providers/`| `whatsapp_web` | `WhatsAppWebChannel` | `whatsapp-web` (forwards to `tinychannels/whatsapp-web`) || `yuanbao` | `YuanbaoChannel` | `channels` |-`CliChannel` is not a provider re-export: it lives in the ungated `channels/cli.rs` as a dependency-free local implementation.+`CliChannel` is not a provider re-export: it lives in the ungated `channels/cli.rs` as a local `impl Channel`.## Telegram is the exception`providers/telegram/mod.rs` re-exports the transport (`session_store`, `TelegramChannel`) from `tinychannels::providers::telegram`, but keeps three pieces here because they depend on the OpenHuman event bus and runtime rather than on transport:-- `remote_control` — `/status /sessions /new` command handling, using the agent runtime context and web-session invalidation.-- `bus::TelegramRemoteSubscriber` — busy-state event handler, registered against the process bus in `channels/runtime/startup_part_01.rs`.-- `approval_surface::TelegramApprovalSurfaceSubscriber` (+ `TELEGRAM_APPROVAL_CLIENT_ID`) — approval-reply routing for Telegram, also registered in `channels/runtime/startup_part_01.rs`.+- `remote_control` — `/status /sessions /new` command handling (`TelegramRemoteCommand`), using the `ChannelRuntimeContext` and `web_chat::invalidate_thread_sessions`.+- `bus::TelegramRemoteSubscriber` — busy-state handler for `DomainEvent::ChannelMessageReceived` / `ChannelMessageProcessed`, subscribed to the process bus in `channels/runtime/startup_part_01.rs`.+- `approval_surface::TelegramApprovalSurfaceSubscriber` (+ `TELEGRAM_APPROVAL_CLIENT_ID`) — the approval surface for Telegram, subscribed in the same place. `runtime/dispatch/processor.rs::channel_has_approval_surface` returns `true` only for `TELEGRAM_APPROVAL_CLIENT_ID`, so Telegram is currently the only channel whose yes/no replies reach the `ApprovalGate`.-Ported providers reach host capabilities (voice, approvals, conversation history, shutdown, event sink) through `channels::host::ProviderContext` instead of calling OpenHuman internals directly; see `channels/host/mod.rs`. Lean providers that don't need the host ignore it.+Ported providers reach host capabilities (voice, approvals, conversation history, shutdown, event sink) through the `tinychannels::host::ProviderContext` built by `channels::host::build_provider_context` instead of calling OpenHuman internals directly; see `channels/host/mod.rs`.## Adding a providerProvider transport and registration (`ChannelDefinition` metadata in `tinychannels::controllers`) belong upstream in `vendor/tinychannels`. Once a provider exists there:-1. Add the one-line `pub use tinychannels::providers::<name>::*;` re-export here.+1. Add `pub mod <name>;` to `providers/mod.rs` and the one-line `pub use tinychannels::providers::<name>::*;` file here.2. Add the matching `pub use providers::<name>` / `pub use <name>::<Name>Channel` pair to `channels/mod.rs`.-3. If the provider needs host-coupled glue that must stay in OpenHuman (event bus subscribers, runtime-context command handling), follow the Telegram pattern: keep the glue in a submodule here and re-export the transport from `tinychannels`.+3. If the provider's secret lives outside `config.toml` (keyring or env), extend `hydrate_channel_credentials` in `runtime/startup_part_02.rs` the way `email` and `yuanbao` do; `tinychannels::build_channels` expects an already-hydrated config.+4. If the provider needs host-coupled glue that must stay in OpenHuman (event bus subscribers, runtime-context command handling), follow the Telegram pattern: keep the glue in a submodule here and re-export the transport from `tinychannels`.-Do not reimplement provider transport logic in this crate — it is out of scope and will not be picked up by the shared config schema or `tinychannels::host` capability checks.+Do not reimplement provider transport logic in this crate; `tinychannels::build_channels` and the shared config schema will not pick it up.