Skip to main content

made_core/entities/
ceremony_agent_activity_kind.rs

1use serde::{Deserialize, Serialize};
2
3/// Public, bounded progress classification emitted from a host status report.
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
5#[serde(rename_all = "snake_case")]
6pub enum CeremonyAgentActivityKind {
7    ActivityChanged,
8    BlockerOpened,
9    BlockerResolved,
10    CheckpointAvailable,
11    InterventionDelivered,
12    InterventionAnswered,
13    InputRequested,
14    AgentReplaced,
15    Stale,
16    Completed,
17    Failed,
18    Heartbeat,
19}
20
21impl CeremonyAgentActivityKind {
22    #[must_use]
23    pub const fn as_str(self) -> &'static str {
24        match self {
25            Self::ActivityChanged => "activity_changed",
26            Self::BlockerOpened => "blocker_opened",
27            Self::BlockerResolved => "blocker_resolved",
28            Self::CheckpointAvailable => "checkpoint_available",
29            Self::InterventionDelivered => "intervention_delivered",
30            Self::InterventionAnswered => "intervention_answered",
31            Self::InputRequested => "input_requested",
32            Self::AgentReplaced => "agent_replaced",
33            Self::Stale => "stale",
34            Self::Completed => "completed",
35            Self::Failed => "failed",
36            Self::Heartbeat => "heartbeat",
37        }
38    }
39}