ainl-contracts 0.1.4

Shared policy contracts for repo intelligence, context freshness, and impact-first tooling (no OpenFang deps)
Documentation
//! Message visibility tiers for LLM vs user transcript filtering.

use serde::{Deserialize, Serialize};

/// Controls which consumers see a message: LLM prompt, user transcript, or both.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
#[serde(rename_all = "snake_case")]
pub enum Visibility {
    /// Visible to both the LLM and the user-facing transcript.
    #[default]
    Both,
    /// LLM-only (e.g. worker bootstrap context); hidden from user transcript.
    LlmOnly,
    /// User-only (e.g. dashboard annotations); hidden from LLM prompt assembly.
    UserOnly,
}

impl Visibility {
    /// True when this is the default variant (omitted on wire).
    pub fn is_default(&self) -> bool {
        matches!(self, Self::Both)
    }
}