quotch 0.5.1

Fast cross-platform CLI for AI coding-agent usage limits
pub mod antigravity;
pub mod claude;
pub mod codex;
pub mod copilot;

use crate::model::{Account, Snapshot};

pub trait Provider: Sync {
    fn id(&self) -> &'static str;
    fn discover(&self) -> Vec<Account>; // offline, cheap, no network
    fn fetch(&self, acct: &Account) -> Result<Snapshot, FetchError>; // blocking, provider handles its own network timeout
}

#[derive(Debug, thiserror::Error)]
pub enum FetchError {
    #[error("credentials missing or expired")]
    AuthMissing,
    #[error("network: {0}")]
    Network(String),
    #[error("unexpected response: {0}")]
    Parse(String),
    #[error("rate limited by provider")]
    RateLimited,
}