[package]
name = "honya"
version = "0.5.0"
edition = "2024"
description = "A terminal app for AI-assisted Japanese→Thai light-novel translation (EPUB import + a three-agent LLM pipeline over an OpenRouter-compatible API)."
license = "Apache-2.0"
repository = "https://github.com/altqx/honya"
homepage = "https://honya.altqx.com"
readme = "README.md"
keywords = ["epub", "translation", "tui", "japanese", "light-novel"]
categories = ["command-line-utilities", "text-processing", "localization"]
# Keep the published crate lean: ship only what a `cargo install honya` build needs.
exclude = ["web/", "CLAUDE.md", "AGENTS.md", ".github/", ".remember/"]

[dependencies]
# --- TUI (single crossterm 0.29.0 in tree, verified via `cargo tree -i crossterm`) ---
ratatui = "0.30.1" # 0.30.0; re-exports crossterm via ratatui-crossterm 0.1
crossterm = { version = "0.29.0", features = [
  "event-stream",
] } # added directly ONLY for EventStream; unifies with ratatui's copy
unicode-width = "0.2" # column width for CJK/Thai layout
unicode-segmentation = "1" # grapheme-safe truncation
termimad = "0.34.1" # Markdown parser/terminal renderer; shares crossterm 0.29 via crokey

# --- async runtime + HTTP ---
tokio = { version = "1.52", features = [
  "full",
] } # rt-multi-thread, macros, time, fs, sync, io-util
reqwest = { version = "0.13", default-features = false, features = [
  "json",
  "rustls",
  "http2",
  "stream",
] } # NOTE: feature is "rustls", NOT "rustls-tls"
futures = "0.3" # FutureExt::fuse, StreamExt::next for select!
async-trait = "0.1" # dyn-compatible async LlmClient / ToolExecutor traits
tokio-tungstenite = { version = "0.24", default-features = false, features = [
  "connect",
  "rustls-tls-webpki-roots",
] } # WebSocket client for the remote-control relay. NOTE: webpki-roots variant to
    # match reqwest's "rustls" (bundled CA roots) choice — NOT "native-tls", NOT
    # "rustls-tls-native-roots"; keeps a single rustls/webpki-roots in the tree.

# --- serialization ---
serde = { version = "1", features = ["derive"] }
serde_json = "1"

# --- EPUB / XML / HTML ---
zip = { version = "8.6", default-features = false, features = [
  "deflate",
  "deflate64",
  "bzip2",
  "lzma",
] } # 8.6.0 stable on rustc 1.95 (NOT 9.x prerelease, NOT 4.x)
roxmltree = "0.21" # namespace-aware OPF/NCX/nav parsing
scraper = "0.27" # html5ever 0.39 XHTML->markdown walk
ego-tree = "0.11" # MUST be direct: scraper does not re-export it; needed for NodeRef recursion

# --- document import / text processing ---
pdf-extract = "0.10" # MarkItDown's pure-Rust PDF text extractor
htmd = "0.5"         # MarkItDown-style HTML -> Markdown for non-EPUB HTML imports
csv = "1.4"          # Text-based MarkItDown import format
chardetng = "1"
encoding_rs = "0.8"
regex = "1.12"
once_cell = "1.21.4" # Lazy statics for compiled regexes + response_format payloads

# --- infra ---
anyhow = "1"
thiserror = "2" # 2.x
sha2 = "0.11" # in-process SHA-256 for self-update
walkdir = "2.5"
chrono = { version = "0.4.45", features = [
  "clock",
  "serde",
] } # timestamps in PROJECT.md/run logs
