You can put those pieces in one process or several processes. The protocol does not require a specific language or framework.
StateProvider
The StateProvider is the endpoint the Adapter Host calls when it needs current target state before a decision can proceed.
You implement:
- one HTTP callback endpoint
- target binding checks
- a bounded state response for the requested target and scope
You do not implement:
- final decision logic
- WorkOrder creation
- host-side hashing rules beyond returning the required public fields
The point is not to mirror your whole backend. The point is to return the governed state view that the decision path actually needs.
Minimal shape:
Minimal pseudo implementation:
PolicyBoundary
The PolicyBoundary is the endpoint the Adapter Host calls to ask for a candidate decision.
You implement:
- one HTTP callback endpoint
- your local policy rules
- a candidate response that matches the public contract
You do not implement:
- final admission
- direct work creation
- fail-open shortcuts that bypass the host
Policy participates, but it is not the final authority by itself. Core still validates the candidate before admitted work can exist.
Minimal shape:
Minimal pseudo implementation:
Worker
The worker is the code that claims admitted work, performs the bounded target-side operation, and posts the outcome.
You implement:
- the claim loop
- target-side materialization
- outcome submission with the required bindings
You do not implement:
- browser-facing intent ingestion
- policy-only write authorization
- a replacement for host-side claim and lease semantics
Minimal shape:
Minimal pseudo implementation:
What this means in plain terms
If you can answer these three questions, you can build an adapter:
- How do we read the current target state we care about?
- How do we decide whether that action should proceed?
- How do we perform the final target-side effect and report the result?
Everything else stays with the bundle. That is what makes the integration surface relatively small.
Three concrete examples
| Adapter example | StateProvider | PolicyBoundary | Worker |
|---|---|---|---|
| Repository adapter | read branch or pull-request state | allow or block one repository change | open one pull request or post one bounded update |
| Ticket adapter | read ticket workflow state | allow or block one transition | move one ticket or add one note |
| ImpactRoom-style reference adapter | read room or turn state | allow or block one room-side effect | materialize one room-side effect after claim |
The shipped minimal target adapter is the smallest inspectable version of these three parts. It is generic on purpose, so you can map it onto your own target instead of inheriting someone else's demo logic.