haematite-cli 0.21.3

The haematite command: serve a store, its door and Studio, answer MCP, query with jq, and host the store's assistant seat
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::ToolStatus;
use serde_json::json;

#[test]
fn round4_10_interrupted_is_a_declared_terminal_wire_status() -> anyhow::Result<()> {
    let status: ToolStatus = serde_json::from_value(json!("interrupted"))?;
    assert!(status.terminal());
    assert_eq!(serde_json::to_value(status)?, "interrupted");
    for word in ["pending", "in_progress", "completed", "failed"] {
        let status: ToolStatus = serde_json::from_value(json!(word))?;
        assert_eq!(status.terminal(), matches!(word, "completed" | "failed"));
    }
    assert!(serde_json::from_value::<ToolStatus>(json!("imaginary")).is_err());
    Ok(())
}