haematite-cli 0.22.0

The haematite command: serve a store, its door and Studio, answer MCP, query with jq, and host the store's assistant seat
Documentation
//! HAEMNET-004 R3: the hosts on which an origin may be plain HTTP.
//!
//! The same three for every caller: the seat's Lys issuer,
//! `mcp --lys-agent`, `mcp --remote` and the installer.

/// Whether `host`, as `http::uri::Authority::host` gives it (an IPv6
/// literal keeps its brackets), is loopback for plain HTTP.
#[must_use]
pub fn host(host: &str) -> bool {
    matches!(host, "127.0.0.1" | "localhost" | "[::1]")
}

/// The origins every caller's own test reads: which plain-HTTP origins are
/// loopback, and that an https origin is always allowed.
#[cfg(test)]
pub const CASES: &[(&str, bool)] = &[
    ("http://127.0.0.1:8080", true),
    ("http://localhost:8080", true),
    ("http://[::1]:8080", true),
    ("https://lys.example", true),
    ("http://lys.example", false),
    ("http://10.0.0.1:8080", false),
    ("http://127.0.0.2:8080", false),
];