liminal-cli 0.3.1

The liminal command: serve the network, maintain its stores, or serve its discovery MCP over stdio
Documentation
//! Service terminal outcomes must survive the ticket's tap decoder.

use super::notifications::Batch;
use serde_json::json;

fn service_outcome(outcome: &str) -> Result<(), String> {
    Batch::read(json!({"type": "tap.batch", "target": "jobs.studio", "seq": 1, "sampled": 1, "dropped": 0,
        "messages": [{"id": "local:call:7:1", "subject": "jobs.studio", "size": 2, "outcome": outcome,
            "t": 1_791_881_244_000_u64, "from": "7", "from_station": "caller", "to": "local",
            "to_stations": ["studio"], "hops": [{"node": "local", "at_ms": 0}], "fields": {"latency_ms": 17}}]
    }), "jobs.studio").map(|_| ())
}

#[test]
fn tap_notification_accepts_answered_service_calls() -> Result<(), String> {
    service_outcome("answered")
}

#[test]
fn tap_notification_accepts_unanswered_service_calls() -> Result<(), String> {
    service_outcome("unanswered")
}

#[test]
fn tap_notification_still_accepts_named_service_refusals() -> Result<(), String> {
    service_outcome("refused")
}