yog 0.0.1

yog: a balls-oriented session manager for lernie loops (egui frontend)
Documentation
//! `attention` test harness: the shared agent builder and `Seen` closures,
//! split into [`signals`] (the per-agent predicate) and [`roster`] (rollups,
//! sort, jump).

use super::*;
use crate::git_tree::{Agent, AgentState};

mod roster;
mod signals;

/// A default agent: `Quiescent`, no marks, no mail, a per-id tip oid (so a
/// stop-watermark test can target this branch's tip).
fn agent(id: &str) -> Agent {
    Agent {
        branch_name: format!("agents/{id}"),
        agent_id: id.to_string(),
        tip_oid: format!("tip-{id}"),
        tip_short_oid: "tip".into(),
        tip_timestamp_unix: 0,
        steps: vec![],
        preview: None,
        streaming_text: None,
        tool_calls: vec![],
        state: AgentState::Quiescent,
        state_uncertain: false,
        pending_messages: 0,
        conflicted_oid: None,
        budget_oid: None,
        abandoned_oid: None,
        notify_oid: None,
        goal_ball: None,
    }
}

/// A `Seen` closure that acknowledges exactly one oid for one kind — every
/// other query is unseen.
fn acked(kind: SeenKind, oid: &'static str) -> impl Fn(SeenKind, &str, &str, &str) -> bool {
    move |k, _w, _a, o| k == kind && o == oid
}

/// The `Seen` closure that acknowledges nothing.
fn nothing(_: SeenKind, _: &str, _: &str, _: &str) -> bool {
    false
}