# car-server-types
Shared substrate types for the CAR daemon, lifted out of `car-server-core` so the
messaging / parslee / coder surfaces can later extract into their own crates
without a dependency cycle back to the dispatcher (#418).
## What's here
- **`host`** — `HostState` (agents, approvals, host events, subscribers) and the
`EventSubscriber` trait. `HostState` broadcasts `host.event` JSON-RPC frames to
subscribers *through* `EventSubscriber::send_text(String)`, so it no longer
depends on the concrete WebSocket type (`WsChannel`) or `tokio-tungstenite`.
The WS connection in `car-server-core`'s `session.rs` implements the trait.
- **`channel`** — `ChannelId` / `ChannelConfig` / `SlackTokenRef` plus the
`InboundChannel` / `InboundSink` traits and `ChannelRegistryHandles` (the
transport-neutral messaging abstraction; the iMessage/Slack adapter impls stay
in `car-server-core`, headed for `car-messaging`).
- **`approval_core`** — `ApprovalCore` / `ResolveOutcome`: the approval-resolution
logic driven through `HostState`.
## Why it's a separate crate
`car-server-core` is the JSON-RPC dispatcher + WS server + coder + MCP + Parslee
auth + both messaging adapters, with ~30 heavy test binaries that overflow CI
link/disk. Decomposing it (#418) requires these shared types to live *below* the
surfaces that depend on them. This crate is Phase 0 of that decomposition; the
WS-coupled `RunTraceSubscriber` and the dispatcher remain in `car-server-core`.