Skip to main content

Crate txcript

Crate txcript 

Source
Expand description

Typed conversion for coding-agent session transcripts.

Claude Code, Codex, OpenCode, pi, Campfire, Cursor, and Grok record similar conversation data in different on-disk formats. This crate maps each format through Transcript<Common> and converts with convert::<A, B>: A -> Common -> B.

§Fidelity

Stores preserve native disk shape. Common preserves resumable conversation semantics, not byte identity.

§Shape

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

common
Canonical model used as the conversion hub.
error
The crate’s error type.
harness
Per-harness implementations.
local
Local sessions across every harness.
search
Fuzzy and substring search over transcripts (feature search).

Structs§

Common
The canonical hub representation. Every cross-harness conversion routes through Transcript<Common>.
Discovered
A transcript found by Store::discover: its metadata and how to load it.
Saved
The outcome of Store::save: the id the harness will resume by, and where it landed.
Transcript
A transcript in some representation H.

Enums§

HarnessId
Runtime tag for the harnesses this crate implements. Distinct from the type-level Harness markers — this is for dispatch on a string the user typed (--with codex), not for selecting a Body.

Traits§

Codec
Maps a harness’s native representation to and from Common.
Harness
A transcript representation. Implemented by Common and by each harness marker. The marker is a zero-size type; the representation is its Body.
Store
Reading and writing native transcripts against a real backend (a session directory, a SQLite database, an import subprocess).
TextCodec
Parsing and rendering a harness’s native session text — free of any filesystem or database. This is the format layer: Store is location built on top of it (read a file, then from_text; to_text, then write a file), and the WASM bindings use it directly so the browser/Bun side owns the I/O.

Functions§

convert
Convert a transcript from one harness to another through the Common hub.