Skip to main content

unofficial_opencode_sdk/
lib.rs

1//! Unofficial Rust SDK for the OpenCode server.
2//!
3//! This crate is not affiliated with or endorsed by the OpenCode project.
4//!
5//! The root client tracks OpenCode's legacy/current HTTP surface. Preview
6//! OpenCode V2 APIs are isolated under [`v2`].
7
8mod client;
9pub mod current;
10mod error;
11pub mod generated;
12mod models;
13mod sse;
14pub mod v2;
15
16pub use client::{Client, ClientBuilder, EventsApi, SessionApi};
17pub use error::{ApiError, Error};
18pub use models::{
19    CreateSessionRequest, MessageWithParts, ModelRef, PromptPart, PromptRequest, Session,
20    SessionTime,
21};
22pub use sse::{
23    EventData, EventStream, KnownEvent, KnownEventKind, OpenCodeEvent, SseDecoder, SseFrame,
24};