obol-core 0.2.1

Read AI-agent transcripts (Claude Code, Codex, Pi) and estimate their USD cost.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::path::PathBuf;

#[derive(Debug, thiserror::Error)]
pub enum ObolError {
    #[error("pricing tables not found at {0} — run `obol refresh`")]
    PricingTablesMissing(PathBuf),
    #[error("could not determine transcript dialect")]
    UnknownDialect,
    #[error("malformed transcript at line {line}: {msg}")]
    MalformedTranscript { line: usize, msg: String },
    #[error("network error during refresh: {0}")]
    Network(String),
    #[error(transparent)]
    Io(#[from] std::io::Error),
    #[error("json error: {0}")]
    Json(#[from] serde_json::Error),
}