Skip to main content

Crate txcript

Crate txcript 

Source
Expand description

Typed conversion for coding-agent session transcripts.

Claude Code, Claude Chat, Cowork, Codex, OpenCode, pi, Campfire, Cursor, Grok, Hermes, Amp, and Antigravity record similar conversation data in different stores. 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).
text
A compact, one-way text projection of the canonical transcript model.

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.
Span
A half-open range of message indices: the primitive for pointing at part of a session. Owned and serializable, so it crosses process and wire boundaries (search results, CLI arguments, MCP responses); resolution against a loaded transcript is Transcript::fragment.
Transcript
A transcript in some representation H.

Enums§

CropError
Why a Transcript<Common> could not be cropped to a requested Span.
HarnessId
Runtime tag for the harnesses this crate implements — string-keyed dispatch, where the type-level Harness markers select 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. Store layers location on top of it; the WASM bindings use it directly.

Functions§

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