# car-messaging

Multi-channel approval-transport adapters for the CAR daemon — the **iMessage**
and **Slack** surfaces of the opt-in approval transport. Extracted from
`car-server-core` (#418) to cut its test-binary link/disk footprint in CI.

## What's here

- **`messaging_config`** — per-channel config/allowlist/pairing store
  (`~/.car/messaging.json`); the host/local-auth-gated config channel.
- **`messaging_orchestrator`** — inbound poller + orchestrator: resolves an
  inbound message to a session/approval, applies allowlist/anti-injection, and
  drives the reply via a `MessageSender`.
- **`slack_adapter`** — Slack wire parsing (Events API / interactive / socket
  mode), the `SlackTransport` trait, and token/pairing provisioning.
- **`fanout`** — the `FanoutCoordinator` that dispatches a resolved inbound
  message across the registered channel adapters.

## Layering

Depends on `car-server-types` (`HostState`, `channel` types + inbound traits,
`approval_core`) — **not** on `car-server-core`'s dispatcher, so there is no
cycle. `car-server-core` depends on this crate and re-exports its modules
(`crate::messaging_config::*` etc.) so the JSON-RPC dispatcher keeps wiring the
`messaging.*` methods with no call-site change.

The dispatcher-coupled end-to-end tests (those that boot a `ServerState` /
`run_dispatch`) stay in `car-server-core`; the component/harness tests for the
adapters live here.
