An adapter is a process Blossom launches, and both sides exchange JSON-RPC 2.0 messages over stdio.
Names and shapes follow the Agent Client Protocol where they overlap: Blossom is the client, the adapter the agent.
camelCase, discriminator values snake_case, request identifiers unsigned integers.protocolVersion is a single integer that changes only on a breaking change, and it is 1 today. The host sends the latest version it supports, the adapter answers with the same version or the latest it does, and on a mismatch the host kills it and marks it stopped. One that has not answered within thirty seconds of its launch is killed.
An addition never changes the version: every new field is optional, and a host that does not know one skips it.
| Method | Direction | Kind | Origin |
|---|---|---|---|
initialize | host → adapter | request | ACP |
session/started | adapter → host | notification | Blossom |
session/update | adapter → host | notification | ACP |
session/closed | adapter → host | notification | Blossom |
session/request_permission | adapter → host | request | ACP |
elicitation/create | adapter → host | request | ACP |
$/cancel_request | adapter → host | notification | ACP |
session/new | host → adapter | request | ACP |
session/prompt | host → adapter | request | ACP |
session/cancel | host → adapter | notification | ACP |
session/close | host → adapter | request | ACP |
A session identifier only has to be unique within its adapter, which reaches only the sessions it started and the agents it announced. limits/read and changes/read are Blossom's own, asked only of an agent whose manifest offers them.
A permission request, and the answer Blossom writes back:
{ "jsonrpc": "2.0", "id": 1, "method": "session/request_permission", "params": { "sessionId": "codex-tests", "toolCall": { "toolCallId": "codex-tests-run", "title": "bun run test --filter notch" }, "options": [ { "optionId": "allow", "name": "Allow", "kind": "allow_once" }, { "optionId": "reject", "name": "Reject", "kind": "reject_once" } ] } }
{ "jsonrpc": "2.0", "id": 1, "result": { "outcome": { "outcome": "selected", "optionId": "allow" } } }A request that stops being pending without the user resolving it gets the other outcome ACP defines, cancelled.
Note
What a request would do, its kind and content, stays in memory only while the request waits, and is shown only in the panel of that request.
The last four methods go from the host to the adapter, and only when the agent declared the capability and the user turned acting on for it, which is off by default.
| Capability | The adapter takes |
|---|---|
start | session/new, and session/prompt, session/cancel and session/close for the sessions it started that way |
prompt | session/prompt for a session of this agent that Blossom did not start |
cancel | session/cancel for any session of this agent, also one begun in a terminal |
session/close is never sent for a session Blossom did not start. An adapter that cannot do what it was asked answers with a JSON-RPC error: -32601, -32002 for an unknown session, -32010 when another process holds it.
bun run generate writes the schema of every message to crates/protocol/generated/schema.json, and sdks/adapter writes the same messages from serve(manifest, onReady).
Tip
Why Blossom acts on sessions is in ../decisions/acting.md; the packages the app includes are in adapters.md.