bctx-forge 0.1.28

bctx-forge — OS execution substrate, signal capture, BPE tokenizer, SQLite tracker
Documentation
pub mod awareness;
pub mod budget;
pub mod intercept;
pub mod signal;
pub mod substrate;
pub mod tracker;

/// Returns the user's home directory. Checks `HOME` first (Unix), then
/// `USERPROFILE` (Windows), then falls back to `"."`. Use this everywhere a
/// `~/.bctx` path is resolved so the data dir works on Windows too.
pub fn home_dir() -> String {
    std::env::var("HOME")
        .or_else(|_| std::env::var("USERPROFILE"))
        .unwrap_or_else(|_| ".".into())
}

pub use budget::estimator::TokenEstimator;
pub use signal::capture::RawSignal;
pub use signal::SignalKind;
pub use substrate::local::LocalSubstrate;
pub use substrate::Substrate;
pub use tracker::store::ExecutionRecord;