Adding a New Host
This page consolidates the checklists from the Adapter Playbook and the Adapters README.
Design First
From the Adapter Playbook:
- Can the host rewrite requests before model execution?
- Can the host rewrite responses after model execution?
- Does the host expose streaming chunks, final responses, or both?
- Does the host expose transcript history directly, or must it be reconstructed?
- Is integration file-based, hook-based, plugin-based, or API-based?
Required Surfaces
From the adapters/README.md checklist:
- Install surface — where the host extension or plugin lives, how config is written, how to enable/disable/remove.
- Session bridge — how session IDs, turn IDs, and workspace roots are resolved.
- Transcript bridge — how raw host messages are decoded into shared envelopes and rewritten envelopes encoded back.
- Request / response lifecycle — before-call rewriting, after-call reduction, tool-result persistence, streaming/non-streaming handling.
- State roots — state dir, archive dir, debug trace dir.
- Product surface —
status,report,doctor,visual, mode switching. - Verification — adapter unit tests, one smoke install path, one end-to-end session check.
Recommended Development Order
From the adapters/README.md:
- Start with the shared host envelope bridge in
packages/host-adapter/. - Wire one minimal request path through the host.
- Make
statusanddoctorwork first. - Add reduction and persistence hooks.
- Add visual and richer command surfaces last.