tinyhumansai/openhuman · error · anyhow::Error

file not found: {}

Error message

file not found: {}

What it means

Error "file not found: {}" thrown in tinyhumansai/openhuman.

Source

Thrown at src/core/memory_cli.rs:464

fn next_arg(args: &[String], i: &mut usize, flag: &str) -> Result<String> {
    let value = args
        .get(*i + 1)
        .ok_or_else(|| anyhow::anyhow!("missing value for {flag}"))?
        .clone();
    *i += 2;
    Ok(value)
}

fn read_input(path: &str) -> Result<String> {
    if path == "-" {
        let mut buf = String::new();
        std::io::stdin().read_to_string(&mut buf)?;
        Ok(buf)
    } else {
        let path = PathBuf::from(path);
        if !path.exists() {
            return Err(anyhow::anyhow!("file not found: {}", path.display()));
        }
        Ok(std::fs::read_to_string(&path)?)
    }
}

/// Resolve the memory client for a subcommand, refusing first when the bound
/// driver cannot serve it.
///
/// Two gates run here, both *config facts* naming the driver rather than silent
/// absence (`docs/specs/kernel.md` §3.3 makes the CLI its one exception, because
/// a human reads silence as a typo — same reasoning as the retained `mcp` /
/// `tui` arms in `src/core/cli.rs`):
///
/// 1. **Capability gate** — when the subcommand maps to a gated controller, the
///    bound driver must advertise that family.
/// 2. **Legacy-client gate** — every subcommand below operates on the embedded
///    store directly (via `memory::global::init`), so the bound driver must be
///    the embedded engine. This is what makes `driver = "null"` (or a fallback)

View on GitHub (pinned to a221052e0d)

When it happens

Trigger: Thrown at src/core/memory_cli.rs:464 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/ffbe07e9ed39d32e. Report an issue: GitHub.