txcript 0.13.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"]
# `cargo run` / `cargo build` with no -p target the CLI; `--workspace` still
# covers the lib.
default-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.13.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"
homepage = "https://github.com/skillsynchq/txcript"
repository = "https://github.com/skillsynchq/txcript"
readme = "README.md"
keywords = ["transcript", "claude", "codex", "agent", "wasm"]
categories = ["command-line-utilities", "wasm"]

[dependencies]
base64 = "0.22.1"
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"
futures-util = { version = "0.3.33", optional = true }
tokio = { version = "1.52.3", default-features = false, features = ["rt", "time"], optional = true }
wreq = { version = "6.0.0-rc.31", default-features = false, features = ["brotli", "deflate", "gzip", "stream", "tokio-rt", "webpki-roots", "zstd"], optional = true }
wreq-util = { version = "3.0.0-rc.14", features = ["emulation-compression"], optional = true }
uuid = { version = "1.23.4", features = ["v4", "v5"] }
wasm-bindgen = { version = "0.2.126", optional = true }

[target.'cfg(target_os = "macos")'.dependencies]
aes = { version = "0.8.4", optional = true }
cbc = { version = "0.1.2", features = ["alloc", "block-padding"], optional = true }
pbkdf2 = { version = "0.12.2", optional = true }
sha1 = { version = "0.10.6", optional = true }
sha2 = { version = "0.10.9", 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", "claude_chat", "chatgpt", "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"]
# Claude Chat is a live, read-only remote store. Its codec remains available
# featureless; the feature adds browser-compatible HTTPS access and macOS
# Claude Desktop cookie decryption.
claude_chat = [
    "dep:futures-util",
    "dep:rusqlite",
    "dep:tokio",
    "dep:wreq",
    "dep:wreq-util",
    "dep:aes",
    "dep:cbc",
    "dep:pbkdf2",
    "dep:sha1",
    "dep:sha2",
]
# ChatGPT is a live, read-only remote store. Its codec remains available
# featureless; the feature adds read-only Codex login reuse and
# browser-compatible HTTPS access to ChatGPT's private read endpoints.
chatgpt = [
    "dep:futures-util",
    "dep:tokio",
    "dep:wreq",
    "dep:wreq-util",
]
# 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