pub enum OpenCodeStorageSurface {
Sqlite,
JsonTreeB,
JsonTreeA,
}Expand description
Which on-disk OpenCode storage surface is present under a data root
(docs/interop/opencode-pi-spec.md §1.2/S9a): SQLite opencode*.db (or
$OPENCODE_DB), legacy JSON tree generation B, or legacy JSON tree
generation A. This is a filesystem classifier only — it answers
“which generation is this?” for a corpus-discovery tool; it does not
itself read/parse the surface. See Session::from_opencode_str’s docs
for the envelope form any of these three surfaces synthesizes into, and
Session::from_opencode_sqlite (PARITY-3/PARITY-16) for the rusqlite
reader that reconstructs that same envelope form from Sqlite’s rows —
JsonTreeA/JsonTreeB remain classifier-only (their session_diff
round-trips via the JSON store per upstream’s own behavior even on a
SQLite install, so nothing is silently lost by not reading the legacy
trees directly).
Variants§
Sqlite
SQLite <data>/opencode*.db (or $OPENCODE_DB override). Read by
Session::from_opencode_sqlite / opencode_sqlite_store_stats /
opencode_sqlite_corpus_envelope_text.
JsonTreeB
Legacy JSON tree, generation B: <data>/storage/{session,message,part,session_diff}/…,
marker file storage/migration.
JsonTreeA
Legacy JSON tree, generation A: <data>/project/<slug>/storage/session/{info,message,part}/….
Trait Implementations§
Source§impl Clone for OpenCodeStorageSurface
impl Clone for OpenCodeStorageSurface
Source§fn clone(&self) -> OpenCodeStorageSurface
fn clone(&self) -> OpenCodeStorageSurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more