txcript 0.8.0

Convert coding-agent session transcripts between harness formats.
Documentation
# Workspace: the txcript lib (this package, at the root) plus the CLI in
# cli/. Bin-only dependencies (clap) live in the cli crate so lib consumers
# never compile them.
[workspace]
members = ["cli"]

[workspace.lints.rust]
unsafe_code = "forbid"

[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
# Regression-only denies.
exit = "deny"
dbg_macro = "deny"
todo = "deny"
unimplemented = "deny"
mem_forget = "deny"
unwrap_in_result = "deny"

# Keep overflow checks in release for untrusted transcript files.
[profile.release]
lto = "thin"
codegen-units = 1
strip = "symbols"
overflow-checks = true

[package]
name = "txcript"
version = "0.8.0"
edition = "2024"
# Policy: track the latest stable (kept in lockstep with the CI msrv job),
# not a measured feature floor — bump both together on toolchain updates.
rust-version = "1.96"
description = "Convert coding-agent session transcripts between harness formats."
license = "Apache-2.0"
repository = "https://github.com/skillsynchq/txcript"
readme = "README.md"
keywords = ["transcript", "claude", "codex", "agent", "wasm"]
categories = ["command-line-utilities", "wasm"]

[dependencies]
chrono = { version = "0.4.45", features = ["serde"] }
memchr = { version = "2.8.2", optional = true }
nucleo-matcher = { version = "0.3.1", optional = true }
rusqlite = { version = "0.40.1", features = ["bundled"], optional = true }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
thiserror = "2.0.18"
uuid = { version = "1.23.4", features = ["v4", "v5"] }
wasm-bindgen = { version = "0.2.126", optional = true }

[dev-dependencies]
criterion = "0.8.2"
proptest = "1.11.0"
tempfile = "3.27.0"

# cdylib for the WASM/C-ABI output; rlib so the cli crate and tests still
# link it. Library name follows the package: `use txcript::…`, WASM artifact
# `txcript.wasm`.
[lib]
name = "txcript"
crate-type = ["cdylib", "rlib"]

# The bench imports txcript::search; without this, --no-default-features
# builds fail on the example.
[[example]]
name = "search_bench"
required-features = ["search"]

# Criterion benches bring their own main; see tests/README.md for the
# taxonomy. The search bench needs the feature for txcript::search.
[[bench]]
name = "codec"
harness = false

[[bench]]
name = "search"
harness = false
required-features = ["search"]

[features]
default = ["opencode", "hermes", "search"]
# The OpenCode harness store reads OpenCode's SQLite database. The OpenCode
# codec itself is always available; only the on-disk store needs rusqlite.
opencode = ["dep:rusqlite"]
# Hermes Agent's canonical session store is SQLite. The JSON export codec is
# always available; only local discovery/loading needs rusqlite.
hermes = ["dep:rusqlite"]
# Fuzzy/substring search over transcripts (`txcript::search`). nucleo-matcher
# is pure Rust (helix's matcher) and compiles to wasm32; combine with `wasm`
# to expose the bindings.
search = ["dep:nucleo-matcher", "dep:memchr"]
# WASM bindings (wasm32-unknown-unknown). uuid/js gives getrandom a JS backend
# for the rare empty-id fallback; build with --no-default-features so rusqlite
# (native SQLite) is excluded.
wasm = ["dep:wasm-bindgen", "uuid/js"]

[lints]
workspace = true