haematite-cli 0.21.7

The haematite command: serve a store, its door and Studio, answer MCP, query with jq, and host the store's assistant seat
Documentation
use crate::assistant::{config::Seat, permission::Issuer, record::Record, tools::Identity};

pub(super) async fn record(
    seat: &Seat,
    identity: &Identity,
    error: &anyhow::Error,
) -> anyhow::Result<()> {
    let issuer = Issuer::new(seat, identity)?;
    let person = issuer.responsible(&identity.pass).await?;
    let seat = seat.clone();
    let identity = Identity {
        agent: identity.agent.clone(),
        launch: identity.launch.clone(),
        pass: identity.pass.clone(),
    };
    let reason = format!("the harness could not start: {error}");
    tokio::task::spawn_blocking(move || Record::startup_failure(seat, &identity, person, &reason))
        .await
        .map_err(|_| anyhow::anyhow!("assistant_startup_record_worker_failed"))?
}