liminal-cli 0.3.2

The liminal command: serve the network, maintain its stores, or serve its discovery MCP over stdio
Documentation
use super::exit::{Revoke, session_end};

#[test]
fn only_an_advertised_resume_capability_leaves_a_dormant_session() {
    assert_eq!(session_end(true), "dormant");
    assert_eq!(session_end(false), "ended");
}

#[test]
fn revoke_validates_the_origin_and_never_debugs_the_run_pass() -> anyhow::Result<()> {
    let revoke = Revoke::new(
        "http://localhost:8000",
        "builder",
        "private-pass".to_owned(),
        1024,
        1000,
    )?;
    assert!(!format!("{revoke:?}").contains("private-pass"));
    for issuer in [
        "http://localhost.evil",
        "https://user:password@example.test",
        "https://example.test/path",
        "https://example.test?token=x",
    ] {
        assert!(Revoke::new(issuer, "builder", "private-pass".to_owned(), 1024, 1000).is_err());
    }
    Ok(())
}