pub enum SessionFormat {
ClaudeCode,
Codex,
OpenCode,
Pi,
Grok,
Gemini,
Goose,
}Expand description
An on-disk session format supercode can both read and write.
Like an image editor that opens and exports several file formats, supercode
keeps one canonical in-memory model (Session) and converts to/from each
supported format on the edges.
This is a write-target / codec selector: a caller’s request, passed to
Session::load_str, Session::to_jsonl, and Session::save,
choosing which on-disk dialect to parse or emit. It answers “what format
should I read/write?” — as opposed to SessionSource, which records the
provenance fact of what actually produced a loaded file. The two enums are
intentionally kept separate (provenance fact vs. serialization choice) and
should not be unified, even though their variants currently match
one-to-one.
Variants§
ClaudeCode
Claude Code transcript JSONL.
Codex
Codex rollout JSONL.
OpenCode
OpenCode export-document / envelope JSONL (wave B; see
SessionSource::OpenCode).
Pi
Pi session JSONL (see SessionSource::Pi).
Grok
Grok chat_history.jsonl transcript.
Gemini
Gemini CLI session JSONL.
Goose
Goose native session-export JSON.
Implementations§
Source§impl SessionFormat
impl SessionFormat
Sourcepub fn source(self) -> SessionSource
pub fn source(self) -> SessionSource
The SessionSource a file of this format reports.
This is the deliberate one-way bridge between the two concepts: a file
saved in this format will, when reloaded, report this provenance (see
crates/harness/tests/session_saving.rs), making the relationship
discoverable from the method itself.
Trait Implementations§
Source§impl Clone for SessionFormat
impl Clone for SessionFormat
Source§fn clone(&self) -> SessionFormat
fn clone(&self) -> SessionFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SessionFormat
Source§impl Debug for SessionFormat
impl Debug for SessionFormat
impl Eq for SessionFormat
Source§impl From<TransferFormat> for SessionFormat
impl From<TransferFormat> for SessionFormat
Source§fn from(value: TransferFormat) -> SessionFormat
fn from(value: TransferFormat) -> SessionFormat
Source§impl PartialEq for SessionFormat
impl PartialEq for SessionFormat
impl StructuralPartialEq for SessionFormat
Auto Trait Implementations§
impl Freeze for SessionFormat
impl RefUnwindSafe for SessionFormat
impl Send for SessionFormat
impl Sync for SessionFormat
impl Unpin for SessionFormat
impl UnsafeUnpin for SessionFormat
impl UnwindSafe for SessionFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.