Skip to main content

Crate unofficial_opencode_sdk

Crate unofficial_opencode_sdk 

Source
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
ClientBuilder
CreateSessionRequest
Body accepted by POST /session at the pinned OpenCode snapshot.
EventStream
EventsApi
KnownEvent
MessageWithParts
Prompt/message response shape. Message info and parts are intentionally retained losslessly until the full upstream union generator is proven.
ModelRef
OpenCodeEvent
PromptRequest
Body accepted by POST /session/{id}/message.
Session
A session returned by the legacy/current /session API.
SessionApi
SessionTime
SseDecoder
SseFrame

Enums§

Error
EventData
KnownEventKind
PromptPart