crates/edge/api/src/lib.rs 787 B 22 lines Raw
1 //! inf3r-api — wire JSON and SSE framing.2 //!3 //! This crate is the only place where the client's vocabulary is written. The4 //! event object crosses every hop (spec section 11), and the SSE framing is5 //! exact (requirement R18). Both are functions of a value here, so the web and6 //! the goldens call the same code.7 //!8 //! The refusal codes of this crate are the client's codes from spec section 12.9 //! They are not the wire codes of `inf3r-proto`: a socket fault is not a 404,10 //! and a 429 is not a frame error. `code::from_wire` is the only bridge.11 12 pub use inf3r_json::b64;13 14 pub mod clock;15 pub mod code;16 pub mod event;17 pub mod openai;18 pub mod sse;19 20 pub use code::{Code, Refusal};21 pub use event::{Body, Event, Seq};22 pub use sse::{DONE, write_comment, write_done, write_event};