kaeru 0.1.0

Reopens your terminal tabs, and the coding agent sessions in them, after the terminal closes or the computer restarts.
//! The thin layer that calls the OS directly. It holds the only `unsafe` code
//! in kaeru, and every `unsafe` block has a `SAFETY` comment.

#[cfg(windows)]
mod windows;

#[cfg(windows)]
pub use windows::session_id;

/// Returns an id for the current boot, which stays the same until the
/// computer restarts.
///
/// # Errors
///
/// Never fails here. The signature matches the Windows version, which can.
#[cfg(not(windows))]
pub fn session_id() -> anyhow::Result<String> {
    Ok(format!("boot-{}", sysinfo::System::boot_time()))
}