Expand description
Unofficial Rust SDK for the OpenCode server.
This crate is not affiliated with or endorsed by the OpenCode project.
The root client tracks OpenCode’s legacy/current HTTP surface. Preview
OpenCode V2 APIs are isolated under v2.
Modules§
- current
- Current (legacy/root) OpenCode API surface.
- generated
- Contract-derived constants.
- v2
- Preview client surface for OpenCode’s
/api/*V2 contract.
Structs§
- ApiError
- A non-success HTTP response returned by OpenCode.
- Client
- Client
Builder - Create
Session Request - Body accepted by
POST /sessionat the pinned OpenCode snapshot. - Event
Stream - Events
Api - Known
Event - Message
With Parts - Prompt/message response shape. Message info and parts are intentionally retained losslessly until the full upstream union generator is proven.
- Model
Ref - Open
Code Event - Prompt
Request - Body accepted by
POST /session/{id}/message. - Session
- A session returned by the legacy/current
/sessionAPI. - Session
Api - Session
Time - SseDecoder
- SseFrame