// @generated — Generated by `cargo xtask machine-codegen --all`.
#![allow(
    clippy::unwrap_used,
    clippy::expect_used,
    clippy::panic,
    clippy::implicit_clone,
    clippy::unnecessary_cast,
    clippy::redundant_clone,
    clippy::zero_sized_map_values
)]

pub fn schema() -> meerkat_machine_schema::MachineSchema {
    meerkat_machine_schema::catalog::dsl::dsl_mob_machine()
}

#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum AdaptiveDecisionKind {
    #[default]
    #[serde(rename = "RunLayer")]
    RunLayer,
    #[serde(rename = "Finish")]
    Finish,
}
impl AdaptiveDecisionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::RunLayer => "RunLayer",
            Self::Finish => "Finish",
        }
    }
}
impl std::convert::TryFrom<&str> for AdaptiveDecisionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "RunLayer" => Ok(Self::RunLayer),
            "Finish" => Ok(Self::Finish),
            other => Err(format!("invalid AdaptiveDecisionKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for AdaptiveDecisionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for AdaptiveDecisionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum AdaptiveLayerAdmissionKind {
    #[default]
    #[serde(rename = "Denied")]
    Denied,
    #[serde(rename = "Allowed")]
    Allowed,
}
impl AdaptiveLayerAdmissionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Denied => "Denied",
            Self::Allowed => "Allowed",
        }
    }
}
impl std::convert::TryFrom<&str> for AdaptiveLayerAdmissionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Denied" => Ok(Self::Denied),
            "Allowed" => Ok(Self::Allowed),
            other => Err(format!(
                "invalid AdaptiveLayerAdmissionKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for AdaptiveLayerAdmissionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for AdaptiveLayerAdmissionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum AdaptiveLayerDispositionKind {
    #[default]
    #[serde(rename = "Destroyed")]
    Destroyed,
    #[serde(rename = "Retained")]
    Retained,
    #[serde(rename = "RetainedAsEvidence")]
    RetainedAsEvidence,
}
impl AdaptiveLayerDispositionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Destroyed => "Destroyed",
            Self::Retained => "Retained",
            Self::RetainedAsEvidence => "RetainedAsEvidence",
        }
    }
}
impl std::convert::TryFrom<&str> for AdaptiveLayerDispositionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Destroyed" => Ok(Self::Destroyed),
            "Retained" => Ok(Self::Retained),
            "RetainedAsEvidence" => Ok(Self::RetainedAsEvidence),
            other => Err(format!(
                "invalid AdaptiveLayerDispositionKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for AdaptiveLayerDispositionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for AdaptiveLayerDispositionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct AdaptiveLayerId(pub String);
impl From<String> for AdaptiveLayerId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for AdaptiveLayerId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for AdaptiveLayerId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum AdaptiveLayerPhase {
    #[default]
    #[serde(rename = "Validating")]
    Validating,
    #[serde(rename = "Admitted")]
    Admitted,
    #[serde(rename = "Provisioning")]
    Provisioning,
    #[serde(rename = "Running")]
    Running,
    #[serde(rename = "Collecting")]
    Collecting,
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "SetupFailed")]
    SetupFailed,
    #[serde(rename = "RunFailed")]
    RunFailed,
    #[serde(rename = "ResultInvalid")]
    ResultInvalid,
    #[serde(rename = "Canceled")]
    Canceled,
}
impl AdaptiveLayerPhase {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Validating => "Validating",
            Self::Admitted => "Admitted",
            Self::Provisioning => "Provisioning",
            Self::Running => "Running",
            Self::Collecting => "Collecting",
            Self::Completed => "Completed",
            Self::SetupFailed => "SetupFailed",
            Self::RunFailed => "RunFailed",
            Self::ResultInvalid => "ResultInvalid",
            Self::Canceled => "Canceled",
        }
    }
}
impl std::convert::TryFrom<&str> for AdaptiveLayerPhase {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Validating" => Ok(Self::Validating),
            "Admitted" => Ok(Self::Admitted),
            "Provisioning" => Ok(Self::Provisioning),
            "Running" => Ok(Self::Running),
            "Collecting" => Ok(Self::Collecting),
            "Completed" => Ok(Self::Completed),
            "SetupFailed" => Ok(Self::SetupFailed),
            "RunFailed" => Ok(Self::RunFailed),
            "ResultInvalid" => Ok(Self::ResultInvalid),
            "Canceled" => Ok(Self::Canceled),
            other => Err(format!("invalid AdaptiveLayerPhase value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for AdaptiveLayerPhase {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for AdaptiveLayerPhase {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum AdaptiveLayerSetupFaultKind {
    #[default]
    #[serde(rename = "MobCreateFailed")]
    MobCreateFailed,
    #[serde(rename = "SpawnFailed")]
    SpawnFailed,
    #[serde(rename = "WiringFailed")]
    WiringFailed,
    #[serde(rename = "CanceledDuringSetup")]
    CanceledDuringSetup,
    #[serde(rename = "Interrupted")]
    Interrupted,
}
impl AdaptiveLayerSetupFaultKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::MobCreateFailed => "MobCreateFailed",
            Self::SpawnFailed => "SpawnFailed",
            Self::WiringFailed => "WiringFailed",
            Self::CanceledDuringSetup => "CanceledDuringSetup",
            Self::Interrupted => "Interrupted",
        }
    }
}
impl std::convert::TryFrom<&str> for AdaptiveLayerSetupFaultKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "MobCreateFailed" => Ok(Self::MobCreateFailed),
            "SpawnFailed" => Ok(Self::SpawnFailed),
            "WiringFailed" => Ok(Self::WiringFailed),
            "CanceledDuringSetup" => Ok(Self::CanceledDuringSetup),
            "Interrupted" => Ok(Self::Interrupted),
            other => Err(format!(
                "invalid AdaptiveLayerSetupFaultKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for AdaptiveLayerSetupFaultKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for AdaptiveLayerSetupFaultKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct AdaptiveRunId(pub String);
impl From<String> for AdaptiveRunId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for AdaptiveRunId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for AdaptiveRunId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum AdaptiveRunPhase {
    #[default]
    #[serde(rename = "Active")]
    Active,
    #[serde(rename = "CleanupRequired")]
    CleanupRequired,
    #[serde(rename = "EvidenceMissing")]
    EvidenceMissing,
    #[serde(rename = "Finished")]
    Finished,
    #[serde(rename = "Failed")]
    Failed,
    #[serde(rename = "Canceled")]
    Canceled,
}
impl AdaptiveRunPhase {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Active => "Active",
            Self::CleanupRequired => "CleanupRequired",
            Self::EvidenceMissing => "EvidenceMissing",
            Self::Finished => "Finished",
            Self::Failed => "Failed",
            Self::Canceled => "Canceled",
        }
    }
}
impl std::convert::TryFrom<&str> for AdaptiveRunPhase {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Active" => Ok(Self::Active),
            "CleanupRequired" => Ok(Self::CleanupRequired),
            "EvidenceMissing" => Ok(Self::EvidenceMissing),
            "Finished" => Ok(Self::Finished),
            "Failed" => Ok(Self::Failed),
            "Canceled" => Ok(Self::Canceled),
            other => Err(format!("invalid AdaptiveRunPhase value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for AdaptiveRunPhase {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for AdaptiveRunPhase {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum AdaptiveStopReason {
    #[default]
    #[serde(rename = "FinishDecision")]
    FinishDecision,
    #[serde(rename = "DepthLimit")]
    DepthLimit,
    #[serde(rename = "PlanLimit")]
    PlanLimit,
    #[serde(rename = "RepairLimit")]
    RepairLimit,
    #[serde(rename = "FailureLimit")]
    FailureLimit,
    #[serde(rename = "BudgetExhausted")]
    BudgetExhausted,
    #[serde(rename = "DeadlineExceeded")]
    DeadlineExceeded,
    #[serde(rename = "HostCancel")]
    HostCancel,
}
impl AdaptiveStopReason {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::FinishDecision => "FinishDecision",
            Self::DepthLimit => "DepthLimit",
            Self::PlanLimit => "PlanLimit",
            Self::RepairLimit => "RepairLimit",
            Self::FailureLimit => "FailureLimit",
            Self::BudgetExhausted => "BudgetExhausted",
            Self::DeadlineExceeded => "DeadlineExceeded",
            Self::HostCancel => "HostCancel",
        }
    }
}
impl std::convert::TryFrom<&str> for AdaptiveStopReason {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "FinishDecision" => Ok(Self::FinishDecision),
            "DepthLimit" => Ok(Self::DepthLimit),
            "PlanLimit" => Ok(Self::PlanLimit),
            "RepairLimit" => Ok(Self::RepairLimit),
            "FailureLimit" => Ok(Self::FailureLimit),
            "BudgetExhausted" => Ok(Self::BudgetExhausted),
            "DeadlineExceeded" => Ok(Self::DeadlineExceeded),
            "HostCancel" => Ok(Self::HostCancel),
            other => Err(format!("invalid AdaptiveStopReason value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for AdaptiveStopReason {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for AdaptiveStopReason {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct AgentIdentity(pub String);
impl From<String> for AgentIdentity {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for AgentIdentity {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for AgentIdentity {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct AgentRuntimeId(pub String);
impl From<String> for AgentRuntimeId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for AgentRuntimeId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for AgentRuntimeId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct BranchId(pub String);
impl From<String> for BranchId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for BranchId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for BranchId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum CancelAllWorkRejectReasonKind {
    #[default]
    #[serde(rename = "MobNotRunning")]
    MobNotRunning,
    #[serde(rename = "MemberNotFound")]
    MemberNotFound,
    #[serde(rename = "StaleFenceToken")]
    StaleFenceToken,
}
impl CancelAllWorkRejectReasonKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::MobNotRunning => "MobNotRunning",
            Self::MemberNotFound => "MemberNotFound",
            Self::StaleFenceToken => "StaleFenceToken",
        }
    }
}
impl std::convert::TryFrom<&str> for CancelAllWorkRejectReasonKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "MobNotRunning" => Ok(Self::MobNotRunning),
            "MemberNotFound" => Ok(Self::MemberNotFound),
            "StaleFenceToken" => Ok(Self::StaleFenceToken),
            other => Err(format!(
                "invalid CancelAllWorkRejectReasonKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for CancelAllWorkRejectReasonKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for CancelAllWorkRejectReasonKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum CollectionPolicyKind {
    #[default]
    #[serde(rename = "All")]
    All,
    #[serde(rename = "Any")]
    Any,
    #[serde(rename = "Quorum")]
    Quorum,
}
impl CollectionPolicyKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::All => "All",
            Self::Any => "Any",
            Self::Quorum => "Quorum",
        }
    }
}
impl std::convert::TryFrom<&str> for CollectionPolicyKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "All" => Ok(Self::All),
            "Any" => Ok(Self::Any),
            "Quorum" => Ok(Self::Quorum),
            other => Err(format!("invalid CollectionPolicyKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for CollectionPolicyKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for CollectionPolicyKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct CoordinationResourceRef(pub String);
impl From<String> for CoordinationResourceRef {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for CoordinationResourceRef {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for CoordinationResourceRef {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum DependencyMode {
    #[default]
    #[serde(rename = "All")]
    All,
    #[serde(rename = "Any")]
    Any,
}
impl DependencyMode {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::All => "All",
            Self::Any => "Any",
        }
    }
}
impl std::convert::TryFrom<&str> for DependencyMode {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "All" => Ok(Self::All),
            "Any" => Ok(Self::Any),
            other => Err(format!("invalid DependencyMode value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for DependencyMode {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for DependencyMode {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum EventSubscriptionRejectReasonKind {
    #[default]
    #[serde(rename = "MemberNotFound")]
    MemberNotFound,
    #[serde(rename = "NoSessionBinding")]
    NoSessionBinding,
}
impl EventSubscriptionRejectReasonKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::MemberNotFound => "MemberNotFound",
            Self::NoSessionBinding => "NoSessionBinding",
        }
    }
}
impl std::convert::TryFrom<&str> for EventSubscriptionRejectReasonKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "MemberNotFound" => Ok(Self::MemberNotFound),
            "NoSessionBinding" => Ok(Self::NoSessionBinding),
            other => Err(format!(
                "invalid EventSubscriptionRejectReasonKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for EventSubscriptionRejectReasonKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for EventSubscriptionRejectReasonKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum ExternalMemberRebindCapability {
    #[default]
    #[serde(rename = "Unavailable")]
    Unavailable,
    #[serde(rename = "Available")]
    Available,
}
impl ExternalMemberRebindCapability {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Unavailable => "Unavailable",
            Self::Available => "Available",
        }
    }
}
impl std::convert::TryFrom<&str> for ExternalMemberRebindCapability {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Unavailable" => Ok(Self::Unavailable),
            "Available" => Ok(Self::Available),
            other => Err(format!(
                "invalid ExternalMemberRebindCapability value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for ExternalMemberRebindCapability {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for ExternalMemberRebindCapability {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
pub type ExternalPeerEdge = meerkat_machine_schema::catalog::dsl::mob_machine::ExternalPeerEdge;
pub type ExternalPeerKey = meerkat_machine_schema::catalog::dsl::mob_machine::ExternalPeerKey;
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct FenceToken(pub u64);
impl From<u64> for FenceToken {
    fn from(value: u64) -> Self {
        Self(value)
    }
}
impl std::fmt::Display for FenceToken {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum FlowFrameReducerCommandKind {
    #[default]
    #[serde(rename = "StartRootFrame")]
    StartRootFrame,
    #[serde(rename = "StartBodyFrame")]
    StartBodyFrame,
    #[serde(rename = "AdmitNextReadyNode")]
    AdmitNextReadyNode,
    #[serde(rename = "CompleteNode")]
    CompleteNode,
    #[serde(rename = "RecordNodeOutput")]
    RecordNodeOutput,
    #[serde(rename = "FailNode")]
    FailNode,
    #[serde(rename = "SkipNode")]
    SkipNode,
    #[serde(rename = "CancelNode")]
    CancelNode,
    #[serde(rename = "SealFrame")]
    SealFrame,
}
impl FlowFrameReducerCommandKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::StartRootFrame => "StartRootFrame",
            Self::StartBodyFrame => "StartBodyFrame",
            Self::AdmitNextReadyNode => "AdmitNextReadyNode",
            Self::CompleteNode => "CompleteNode",
            Self::RecordNodeOutput => "RecordNodeOutput",
            Self::FailNode => "FailNode",
            Self::SkipNode => "SkipNode",
            Self::CancelNode => "CancelNode",
            Self::SealFrame => "SealFrame",
        }
    }
}
impl std::convert::TryFrom<&str> for FlowFrameReducerCommandKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "StartRootFrame" => Ok(Self::StartRootFrame),
            "StartBodyFrame" => Ok(Self::StartBodyFrame),
            "AdmitNextReadyNode" => Ok(Self::AdmitNextReadyNode),
            "CompleteNode" => Ok(Self::CompleteNode),
            "RecordNodeOutput" => Ok(Self::RecordNodeOutput),
            "FailNode" => Ok(Self::FailNode),
            "SkipNode" => Ok(Self::SkipNode),
            "CancelNode" => Ok(Self::CancelNode),
            "SealFrame" => Ok(Self::SealFrame),
            other => Err(format!(
                "invalid FlowFrameReducerCommandKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for FlowFrameReducerCommandKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for FlowFrameReducerCommandKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct FlowNodeId(pub String);
impl From<String> for FlowNodeId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for FlowNodeId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for FlowNodeId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum FlowNodeKind {
    #[default]
    #[serde(rename = "Step")]
    Step,
    #[serde(rename = "Loop")]
    Loop,
}
impl FlowNodeKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Step => "Step",
            Self::Loop => "Loop",
        }
    }
}
impl std::convert::TryFrom<&str> for FlowNodeKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Step" => Ok(Self::Step),
            "Loop" => Ok(Self::Loop),
            other => Err(format!("invalid FlowNodeKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for FlowNodeKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for FlowNodeKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum FlowRunPublicResultClassKind {
    #[default]
    #[serde(rename = "Failure")]
    Failure,
    #[serde(rename = "Success")]
    Success,
}
impl FlowRunPublicResultClassKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failure => "Failure",
            Self::Success => "Success",
        }
    }
}
impl std::convert::TryFrom<&str> for FlowRunPublicResultClassKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Failure" => Ok(Self::Failure),
            "Success" => Ok(Self::Success),
            other => Err(format!(
                "invalid FlowRunPublicResultClassKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for FlowRunPublicResultClassKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for FlowRunPublicResultClassKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum FlowRunReducerCommandKind {
    #[default]
    #[serde(rename = "CreateRun")]
    CreateRun,
    #[serde(rename = "StartRun")]
    StartRun,
    #[serde(rename = "DispatchStep")]
    DispatchStep,
    #[serde(rename = "CompleteStep")]
    CompleteStep,
    #[serde(rename = "RecordStepOutput")]
    RecordStepOutput,
    #[serde(rename = "ConditionPassed")]
    ConditionPassed,
    #[serde(rename = "ConditionRejected")]
    ConditionRejected,
    #[serde(rename = "FailStep")]
    FailStep,
    #[serde(rename = "SkipStep")]
    SkipStep,
    #[serde(rename = "ProjectFrameStepStatus")]
    ProjectFrameStepStatus,
    #[serde(rename = "CancelStep")]
    CancelStep,
    #[serde(rename = "RegisterTargets")]
    RegisterTargets,
    #[serde(rename = "RecordTargetSuccess")]
    RecordTargetSuccess,
    #[serde(rename = "RecordTargetTerminalFailure")]
    RecordTargetTerminalFailure,
    #[serde(rename = "RecordTargetCanceled")]
    RecordTargetCanceled,
    #[serde(rename = "RecordTargetFailure")]
    RecordTargetFailure,
    #[serde(rename = "RegisterReadyFrame")]
    RegisterReadyFrame,
    #[serde(rename = "PumpNodeScheduler")]
    PumpNodeScheduler,
    #[serde(rename = "RegisterPendingBodyFrame")]
    RegisterPendingBodyFrame,
    #[serde(rename = "PumpFrameScheduler")]
    PumpFrameScheduler,
    #[serde(rename = "NodeExecutionReleased")]
    NodeExecutionReleased,
    #[serde(rename = "FrameTerminated")]
    FrameTerminated,
    #[serde(rename = "TerminalizeCompleted")]
    TerminalizeCompleted,
    #[serde(rename = "TerminalizeFailed")]
    TerminalizeFailed,
    #[serde(rename = "TerminalizeCanceled")]
    TerminalizeCanceled,
}
impl FlowRunReducerCommandKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::CreateRun => "CreateRun",
            Self::StartRun => "StartRun",
            Self::DispatchStep => "DispatchStep",
            Self::CompleteStep => "CompleteStep",
            Self::RecordStepOutput => "RecordStepOutput",
            Self::ConditionPassed => "ConditionPassed",
            Self::ConditionRejected => "ConditionRejected",
            Self::FailStep => "FailStep",
            Self::SkipStep => "SkipStep",
            Self::ProjectFrameStepStatus => "ProjectFrameStepStatus",
            Self::CancelStep => "CancelStep",
            Self::RegisterTargets => "RegisterTargets",
            Self::RecordTargetSuccess => "RecordTargetSuccess",
            Self::RecordTargetTerminalFailure => "RecordTargetTerminalFailure",
            Self::RecordTargetCanceled => "RecordTargetCanceled",
            Self::RecordTargetFailure => "RecordTargetFailure",
            Self::RegisterReadyFrame => "RegisterReadyFrame",
            Self::PumpNodeScheduler => "PumpNodeScheduler",
            Self::RegisterPendingBodyFrame => "RegisterPendingBodyFrame",
            Self::PumpFrameScheduler => "PumpFrameScheduler",
            Self::NodeExecutionReleased => "NodeExecutionReleased",
            Self::FrameTerminated => "FrameTerminated",
            Self::TerminalizeCompleted => "TerminalizeCompleted",
            Self::TerminalizeFailed => "TerminalizeFailed",
            Self::TerminalizeCanceled => "TerminalizeCanceled",
        }
    }
}
impl std::convert::TryFrom<&str> for FlowRunReducerCommandKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "CreateRun" => Ok(Self::CreateRun),
            "StartRun" => Ok(Self::StartRun),
            "DispatchStep" => Ok(Self::DispatchStep),
            "CompleteStep" => Ok(Self::CompleteStep),
            "RecordStepOutput" => Ok(Self::RecordStepOutput),
            "ConditionPassed" => Ok(Self::ConditionPassed),
            "ConditionRejected" => Ok(Self::ConditionRejected),
            "FailStep" => Ok(Self::FailStep),
            "SkipStep" => Ok(Self::SkipStep),
            "ProjectFrameStepStatus" => Ok(Self::ProjectFrameStepStatus),
            "CancelStep" => Ok(Self::CancelStep),
            "RegisterTargets" => Ok(Self::RegisterTargets),
            "RecordTargetSuccess" => Ok(Self::RecordTargetSuccess),
            "RecordTargetTerminalFailure" => Ok(Self::RecordTargetTerminalFailure),
            "RecordTargetCanceled" => Ok(Self::RecordTargetCanceled),
            "RecordTargetFailure" => Ok(Self::RecordTargetFailure),
            "RegisterReadyFrame" => Ok(Self::RegisterReadyFrame),
            "PumpNodeScheduler" => Ok(Self::PumpNodeScheduler),
            "RegisterPendingBodyFrame" => Ok(Self::RegisterPendingBodyFrame),
            "PumpFrameScheduler" => Ok(Self::PumpFrameScheduler),
            "NodeExecutionReleased" => Ok(Self::NodeExecutionReleased),
            "FrameTerminated" => Ok(Self::FrameTerminated),
            "TerminalizeCompleted" => Ok(Self::TerminalizeCompleted),
            "TerminalizeFailed" => Ok(Self::TerminalizeFailed),
            "TerminalizeCanceled" => Ok(Self::TerminalizeCanceled),
            other => Err(format!("invalid FlowRunReducerCommandKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for FlowRunReducerCommandKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for FlowRunReducerCommandKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum FlowRunStatus {
    #[default]
    #[serde(rename = "Absent")]
    Absent,
    #[serde(rename = "Pending")]
    Pending,
    #[serde(rename = "Running")]
    Running,
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "Failed")]
    Failed,
    #[serde(rename = "Canceled")]
    Canceled,
}
impl FlowRunStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Absent => "Absent",
            Self::Pending => "Pending",
            Self::Running => "Running",
            Self::Completed => "Completed",
            Self::Failed => "Failed",
            Self::Canceled => "Canceled",
        }
    }
}
impl std::convert::TryFrom<&str> for FlowRunStatus {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Absent" => Ok(Self::Absent),
            "Pending" => Ok(Self::Pending),
            "Running" => Ok(Self::Running),
            "Completed" => Ok(Self::Completed),
            "Failed" => Ok(Self::Failed),
            "Canceled" => Ok(Self::Canceled),
            other => Err(format!("invalid FlowRunStatus value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for FlowRunStatus {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for FlowRunStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct FrameId(pub String);
impl From<String> for FrameId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for FrameId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for FrameId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum FrameScope {
    #[default]
    #[serde(rename = "Root")]
    Root,
    #[serde(rename = "Body")]
    Body,
}
impl FrameScope {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Root => "Root",
            Self::Body => "Body",
        }
    }
}
impl std::convert::TryFrom<&str> for FrameScope {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Root" => Ok(Self::Root),
            "Body" => Ok(Self::Body),
            other => Err(format!("invalid FrameScope value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for FrameScope {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for FrameScope {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum FrameStatus {
    #[default]
    #[serde(rename = "Running")]
    Running,
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "Failed")]
    Failed,
    #[serde(rename = "Canceled")]
    Canceled,
}
impl FrameStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Running => "Running",
            Self::Completed => "Completed",
            Self::Failed => "Failed",
            Self::Canceled => "Canceled",
        }
    }
}
impl std::convert::TryFrom<&str> for FrameStatus {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Running" => Ok(Self::Running),
            "Completed" => Ok(Self::Completed),
            "Failed" => Ok(Self::Failed),
            "Canceled" => Ok(Self::Canceled),
            other => Err(format!("invalid FrameStatus value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for FrameStatus {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for FrameStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct Generation(pub u64);
impl From<u64> for Generation {
    fn from(value: u64) -> Self {
        Self(value)
    }
}
impl std::fmt::Display for Generation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum KickoffIntent {
    #[default]
    #[serde(rename = "Pending")]
    Pending,
    #[serde(rename = "Starting")]
    Starting,
    #[serde(rename = "Started")]
    Started,
    #[serde(rename = "CallbackPending")]
    CallbackPending,
    #[serde(rename = "Failed")]
    Failed,
    #[serde(rename = "Cancelled")]
    Cancelled,
}
impl KickoffIntent {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Pending => "Pending",
            Self::Starting => "Starting",
            Self::Started => "Started",
            Self::CallbackPending => "CallbackPending",
            Self::Failed => "Failed",
            Self::Cancelled => "Cancelled",
        }
    }
}
impl std::convert::TryFrom<&str> for KickoffIntent {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Pending" => Ok(Self::Pending),
            "Starting" => Ok(Self::Starting),
            "Started" => Ok(Self::Started),
            "CallbackPending" => Ok(Self::CallbackPending),
            "Failed" => Ok(Self::Failed),
            "Cancelled" => Ok(Self::Cancelled),
            other => Err(format!("invalid KickoffIntent value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for KickoffIntent {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for KickoffIntent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum KickoffPhase {
    #[default]
    #[serde(rename = "Pending")]
    Pending,
    #[serde(rename = "Starting")]
    Starting,
    #[serde(rename = "CallbackPending")]
    CallbackPending,
    #[serde(rename = "Started")]
    Started,
    #[serde(rename = "Failed")]
    Failed,
    #[serde(rename = "Cancelled")]
    Cancelled,
}
impl KickoffPhase {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Pending => "Pending",
            Self::Starting => "Starting",
            Self::CallbackPending => "CallbackPending",
            Self::Started => "Started",
            Self::Failed => "Failed",
            Self::Cancelled => "Cancelled",
        }
    }
}
impl std::convert::TryFrom<&str> for KickoffPhase {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Pending" => Ok(Self::Pending),
            "Starting" => Ok(Self::Starting),
            "CallbackPending" => Ok(Self::CallbackPending),
            "Started" => Ok(Self::Started),
            "Failed" => Ok(Self::Failed),
            "Cancelled" => Ok(Self::Cancelled),
            other => Err(format!("invalid KickoffPhase value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for KickoffPhase {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for KickoffPhase {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct LoopId(pub String);
impl From<String> for LoopId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for LoopId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for LoopId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct LoopInstanceId(pub String);
impl From<String> for LoopInstanceId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for LoopInstanceId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for LoopInstanceId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum LoopIterationReducerCommandKind {
    #[default]
    #[serde(rename = "StartLoop")]
    StartLoop,
    #[serde(rename = "BodyFrameStarted")]
    BodyFrameStarted,
    #[serde(rename = "BodyFrameCompleted")]
    BodyFrameCompleted,
    #[serde(rename = "BodyFrameFailed")]
    BodyFrameFailed,
    #[serde(rename = "BodyFrameCanceled")]
    BodyFrameCanceled,
    #[serde(rename = "UntilConditionMet")]
    UntilConditionMet,
    #[serde(rename = "UntilConditionFailed")]
    UntilConditionFailed,
    #[serde(rename = "CancelLoop")]
    CancelLoop,
}
impl LoopIterationReducerCommandKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::StartLoop => "StartLoop",
            Self::BodyFrameStarted => "BodyFrameStarted",
            Self::BodyFrameCompleted => "BodyFrameCompleted",
            Self::BodyFrameFailed => "BodyFrameFailed",
            Self::BodyFrameCanceled => "BodyFrameCanceled",
            Self::UntilConditionMet => "UntilConditionMet",
            Self::UntilConditionFailed => "UntilConditionFailed",
            Self::CancelLoop => "CancelLoop",
        }
    }
}
impl std::convert::TryFrom<&str> for LoopIterationReducerCommandKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "StartLoop" => Ok(Self::StartLoop),
            "BodyFrameStarted" => Ok(Self::BodyFrameStarted),
            "BodyFrameCompleted" => Ok(Self::BodyFrameCompleted),
            "BodyFrameFailed" => Ok(Self::BodyFrameFailed),
            "BodyFrameCanceled" => Ok(Self::BodyFrameCanceled),
            "UntilConditionMet" => Ok(Self::UntilConditionMet),
            "UntilConditionFailed" => Ok(Self::UntilConditionFailed),
            "CancelLoop" => Ok(Self::CancelLoop),
            other => Err(format!(
                "invalid LoopIterationReducerCommandKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for LoopIterationReducerCommandKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for LoopIterationReducerCommandKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum LoopIterationStage {
    #[default]
    #[serde(rename = "AwaitingBodyFrame")]
    AwaitingBodyFrame,
    #[serde(rename = "BodyFrameActive")]
    BodyFrameActive,
    #[serde(rename = "AwaitingUntilEvaluation")]
    AwaitingUntilEvaluation,
}
impl LoopIterationStage {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::AwaitingBodyFrame => "AwaitingBodyFrame",
            Self::BodyFrameActive => "BodyFrameActive",
            Self::AwaitingUntilEvaluation => "AwaitingUntilEvaluation",
        }
    }
}
impl std::convert::TryFrom<&str> for LoopIterationStage {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "AwaitingBodyFrame" => Ok(Self::AwaitingBodyFrame),
            "BodyFrameActive" => Ok(Self::BodyFrameActive),
            "AwaitingUntilEvaluation" => Ok(Self::AwaitingUntilEvaluation),
            other => Err(format!("invalid LoopIterationStage value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for LoopIterationStage {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for LoopIterationStage {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum LoopStatus {
    #[default]
    #[serde(rename = "Running")]
    Running,
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "Exhausted")]
    Exhausted,
    #[serde(rename = "Failed")]
    Failed,
    #[serde(rename = "Canceled")]
    Canceled,
}
impl LoopStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Running => "Running",
            Self::Completed => "Completed",
            Self::Exhausted => "Exhausted",
            Self::Failed => "Failed",
            Self::Canceled => "Canceled",
        }
    }
}
impl std::convert::TryFrom<&str> for LoopStatus {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Running" => Ok(Self::Running),
            "Completed" => Ok(Self::Completed),
            "Exhausted" => Ok(Self::Exhausted),
            "Failed" => Ok(Self::Failed),
            "Canceled" => Ok(Self::Canceled),
            other => Err(format!("invalid LoopStatus value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for LoopStatus {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for LoopStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MemberAdmissionVerdictKind {
    #[default]
    #[serde(rename = "Admitted")]
    Admitted,
    #[serde(rename = "DuplicateRejected")]
    DuplicateRejected,
}
impl MemberAdmissionVerdictKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Admitted => "Admitted",
            Self::DuplicateRejected => "DuplicateRejected",
        }
    }
}
impl std::convert::TryFrom<&str> for MemberAdmissionVerdictKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Admitted" => Ok(Self::Admitted),
            "DuplicateRejected" => Ok(Self::DuplicateRejected),
            other => Err(format!(
                "invalid MemberAdmissionVerdictKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MemberAdmissionVerdictKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MemberAdmissionVerdictKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MemberLifecycleKind {
    #[default]
    #[serde(rename = "Spawned")]
    Spawned,
    #[serde(rename = "Retiring")]
    Retiring,
    #[serde(rename = "Retired")]
    Retired,
    #[serde(rename = "Reset")]
    Reset,
    #[serde(rename = "Respawned")]
    Respawned,
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "Destroyed")]
    Destroyed,
}
impl MemberLifecycleKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Spawned => "Spawned",
            Self::Retiring => "Retiring",
            Self::Retired => "Retired",
            Self::Reset => "Reset",
            Self::Respawned => "Respawned",
            Self::Completed => "Completed",
            Self::Destroyed => "Destroyed",
        }
    }
}
impl std::convert::TryFrom<&str> for MemberLifecycleKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Spawned" => Ok(Self::Spawned),
            "Retiring" => Ok(Self::Retiring),
            "Retired" => Ok(Self::Retired),
            "Reset" => Ok(Self::Reset),
            "Respawned" => Ok(Self::Respawned),
            "Completed" => Ok(Self::Completed),
            "Destroyed" => Ok(Self::Destroyed),
            other => Err(format!("invalid MemberLifecycleKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MemberLifecycleKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MemberLifecycleKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MemberLiveMaterializationObservationKind {
    #[default]
    #[serde(rename = "DurableSnapshotPresent")]
    DurableSnapshotPresent,
    #[serde(rename = "DurableSnapshotMissing")]
    DurableSnapshotMissing,
}
impl MemberLiveMaterializationObservationKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::DurableSnapshotPresent => "DurableSnapshotPresent",
            Self::DurableSnapshotMissing => "DurableSnapshotMissing",
        }
    }
}
impl std::convert::TryFrom<&str> for MemberLiveMaterializationObservationKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "DurableSnapshotPresent" => Ok(Self::DurableSnapshotPresent),
            "DurableSnapshotMissing" => Ok(Self::DurableSnapshotMissing),
            other => Err(format!(
                "invalid MemberLiveMaterializationObservationKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MemberLiveMaterializationObservationKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MemberLiveMaterializationObservationKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
pub type MemberPeerEndpoint = meerkat_machine_schema::catalog::dsl::mob_machine::MemberPeerEndpoint;
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MemberRevivalVerdictKind {
    #[default]
    #[serde(rename = "ReviveAuthorized")]
    ReviveAuthorized,
    #[serde(rename = "BrokenRecorded")]
    BrokenRecorded,
}
impl MemberRevivalVerdictKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::ReviveAuthorized => "ReviveAuthorized",
            Self::BrokenRecorded => "BrokenRecorded",
        }
    }
}
impl std::convert::TryFrom<&str> for MemberRevivalVerdictKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "ReviveAuthorized" => Ok(Self::ReviveAuthorized),
            "BrokenRecorded" => Ok(Self::BrokenRecorded),
            other => Err(format!("invalid MemberRevivalVerdictKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MemberRevivalVerdictKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MemberRevivalVerdictKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MemberWaitClassificationKind {
    #[default]
    #[serde(rename = "RuntimeMaterialPresent")]
    RuntimeMaterialPresent,
    #[serde(rename = "MissingRuntimeMaterial")]
    MissingRuntimeMaterial,
}
impl MemberWaitClassificationKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::RuntimeMaterialPresent => "RuntimeMaterialPresent",
            Self::MissingRuntimeMaterial => "MissingRuntimeMaterial",
        }
    }
}
impl std::convert::TryFrom<&str> for MemberWaitClassificationKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "RuntimeMaterialPresent" => Ok(Self::RuntimeMaterialPresent),
            "MissingRuntimeMaterial" => Ok(Self::MissingRuntimeMaterial),
            other => Err(format!(
                "invalid MemberWaitClassificationKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MemberWaitClassificationKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MemberWaitClassificationKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobBridgeRejectionCause {
    #[default]
    #[serde(rename = "NotBound")]
    NotBound,
    #[serde(rename = "StaleSupervisor")]
    StaleSupervisor,
    #[serde(rename = "SenderMismatch")]
    SenderMismatch,
    #[serde(rename = "AlreadyBound")]
    AlreadyBound,
    #[serde(rename = "InvalidBootstrapToken")]
    InvalidBootstrapToken,
    #[serde(rename = "UnsupportedProtocolVersion")]
    UnsupportedProtocolVersion,
    #[serde(rename = "InvalidSupervisorSpec")]
    InvalidSupervisorSpec,
    #[serde(rename = "InvalidPeerSpec")]
    InvalidPeerSpec,
    #[serde(rename = "AddressMismatch")]
    AddressMismatch,
    #[serde(rename = "Unsupported")]
    Unsupported,
    #[serde(rename = "Internal")]
    Internal,
}
impl MobBridgeRejectionCause {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::NotBound => "NotBound",
            Self::StaleSupervisor => "StaleSupervisor",
            Self::SenderMismatch => "SenderMismatch",
            Self::AlreadyBound => "AlreadyBound",
            Self::InvalidBootstrapToken => "InvalidBootstrapToken",
            Self::UnsupportedProtocolVersion => "UnsupportedProtocolVersion",
            Self::InvalidSupervisorSpec => "InvalidSupervisorSpec",
            Self::InvalidPeerSpec => "InvalidPeerSpec",
            Self::AddressMismatch => "AddressMismatch",
            Self::Unsupported => "Unsupported",
            Self::Internal => "Internal",
        }
    }
}
impl std::convert::TryFrom<&str> for MobBridgeRejectionCause {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "NotBound" => Ok(Self::NotBound),
            "StaleSupervisor" => Ok(Self::StaleSupervisor),
            "SenderMismatch" => Ok(Self::SenderMismatch),
            "AlreadyBound" => Ok(Self::AlreadyBound),
            "InvalidBootstrapToken" => Ok(Self::InvalidBootstrapToken),
            "UnsupportedProtocolVersion" => Ok(Self::UnsupportedProtocolVersion),
            "InvalidSupervisorSpec" => Ok(Self::InvalidSupervisorSpec),
            "InvalidPeerSpec" => Ok(Self::InvalidPeerSpec),
            "AddressMismatch" => Ok(Self::AddressMismatch),
            "Unsupported" => Ok(Self::Unsupported),
            "Internal" => Ok(Self::Internal),
            other => Err(format!("invalid MobBridgeRejectionCause value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MobBridgeRejectionCause {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobBridgeRejectionCause {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobBridgeRejectionRecovery {
    #[default]
    #[serde(rename = "FatalBubbleUp")]
    FatalBubbleUp,
    #[serde(rename = "RebindRecover")]
    RebindRecover,
}
impl MobBridgeRejectionRecovery {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::FatalBubbleUp => "FatalBubbleUp",
            Self::RebindRecover => "RebindRecover",
        }
    }
}
impl std::convert::TryFrom<&str> for MobBridgeRejectionRecovery {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "FatalBubbleUp" => Ok(Self::FatalBubbleUp),
            "RebindRecover" => Ok(Self::RebindRecover),
            other => Err(format!(
                "invalid MobBridgeRejectionRecovery value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobBridgeRejectionRecovery {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobBridgeRejectionRecovery {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobCoordinationEventKind {
    #[default]
    #[serde(rename = "WorkIntentRecorded")]
    WorkIntentRecorded,
    #[serde(rename = "WorkIntentStatusChanged")]
    WorkIntentStatusChanged,
    #[serde(rename = "ResourceClaimRecorded")]
    ResourceClaimRecorded,
    #[serde(rename = "ResourceClaimStatusChanged")]
    ResourceClaimStatusChanged,
    #[serde(rename = "ResourceClaimOverlapObserved")]
    ResourceClaimOverlapObserved,
}
impl MobCoordinationEventKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::WorkIntentRecorded => "WorkIntentRecorded",
            Self::WorkIntentStatusChanged => "WorkIntentStatusChanged",
            Self::ResourceClaimRecorded => "ResourceClaimRecorded",
            Self::ResourceClaimStatusChanged => "ResourceClaimStatusChanged",
            Self::ResourceClaimOverlapObserved => "ResourceClaimOverlapObserved",
        }
    }
}
impl std::convert::TryFrom<&str> for MobCoordinationEventKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "WorkIntentRecorded" => Ok(Self::WorkIntentRecorded),
            "WorkIntentStatusChanged" => Ok(Self::WorkIntentStatusChanged),
            "ResourceClaimRecorded" => Ok(Self::ResourceClaimRecorded),
            "ResourceClaimStatusChanged" => Ok(Self::ResourceClaimStatusChanged),
            "ResourceClaimOverlapObserved" => Ok(Self::ResourceClaimOverlapObserved),
            other => Err(format!("invalid MobCoordinationEventKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MobCoordinationEventKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobCoordinationEventKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobCoordinationResourceClaimKind {
    #[default]
    #[serde(rename = "Advisory")]
    Advisory,
    #[serde(rename = "SoftReservation")]
    SoftReservation,
    #[serde(rename = "Exclusive")]
    Exclusive,
}
impl MobCoordinationResourceClaimKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Advisory => "Advisory",
            Self::SoftReservation => "SoftReservation",
            Self::Exclusive => "Exclusive",
        }
    }
}
impl std::convert::TryFrom<&str> for MobCoordinationResourceClaimKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Advisory" => Ok(Self::Advisory),
            "SoftReservation" => Ok(Self::SoftReservation),
            "Exclusive" => Ok(Self::Exclusive),
            other => Err(format!(
                "invalid MobCoordinationResourceClaimKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobCoordinationResourceClaimKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobCoordinationResourceClaimKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobCoordinationResourceClaimStatus {
    #[default]
    #[serde(rename = "Active")]
    Active,
    #[serde(rename = "Released")]
    Released,
    #[serde(rename = "Expired")]
    Expired,
    #[serde(rename = "Cancelled")]
    Cancelled,
}
impl MobCoordinationResourceClaimStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Active => "Active",
            Self::Released => "Released",
            Self::Expired => "Expired",
            Self::Cancelled => "Cancelled",
        }
    }
}
impl std::convert::TryFrom<&str> for MobCoordinationResourceClaimStatus {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Active" => Ok(Self::Active),
            "Released" => Ok(Self::Released),
            "Expired" => Ok(Self::Expired),
            "Cancelled" => Ok(Self::Cancelled),
            other => Err(format!(
                "invalid MobCoordinationResourceClaimStatus value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobCoordinationResourceClaimStatus {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobCoordinationResourceClaimStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobCoordinationWorkIntentStatus {
    #[default]
    #[serde(rename = "Planned")]
    Planned,
    #[serde(rename = "Active")]
    Active,
    #[serde(rename = "Blocked")]
    Blocked,
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "Cancelled")]
    Cancelled,
}
impl MobCoordinationWorkIntentStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Planned => "Planned",
            Self::Active => "Active",
            Self::Blocked => "Blocked",
            Self::Completed => "Completed",
            Self::Cancelled => "Cancelled",
        }
    }
}
impl std::convert::TryFrom<&str> for MobCoordinationWorkIntentStatus {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Planned" => Ok(Self::Planned),
            "Active" => Ok(Self::Active),
            "Blocked" => Ok(Self::Blocked),
            "Completed" => Ok(Self::Completed),
            "Cancelled" => Ok(Self::Cancelled),
            other => Err(format!(
                "invalid MobCoordinationWorkIntentStatus value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobCoordinationWorkIntentStatus {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobCoordinationWorkIntentStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobCreateMobAdmissionKind {
    #[default]
    #[serde(rename = "Denied")]
    Denied,
    #[serde(rename = "Allowed")]
    Allowed,
}
impl MobCreateMobAdmissionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Denied => "Denied",
            Self::Allowed => "Allowed",
        }
    }
}
impl std::convert::TryFrom<&str> for MobCreateMobAdmissionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Denied" => Ok(Self::Denied),
            "Allowed" => Ok(Self::Allowed),
            other => Err(format!("invalid MobCreateMobAdmissionKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MobCreateMobAdmissionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobCreateMobAdmissionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobCurrentMobAdmissionKind {
    #[default]
    #[serde(rename = "Denied")]
    Denied,
    #[serde(rename = "Allowed")]
    Allowed,
}
impl MobCurrentMobAdmissionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Denied => "Denied",
            Self::Allowed => "Allowed",
        }
    }
}
impl std::convert::TryFrom<&str> for MobCurrentMobAdmissionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Denied" => Ok(Self::Denied),
            "Allowed" => Ok(Self::Allowed),
            other => Err(format!(
                "invalid MobCurrentMobAdmissionKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobCurrentMobAdmissionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobCurrentMobAdmissionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobFlowDelegationEdgeAdmissionKind {
    #[default]
    #[serde(rename = "Admitted")]
    Admitted,
    #[serde(rename = "DeniedStrict")]
    DeniedStrict,
    #[serde(rename = "DeniedAdvisory")]
    DeniedAdvisory,
}
impl MobFlowDelegationEdgeAdmissionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Admitted => "Admitted",
            Self::DeniedStrict => "DeniedStrict",
            Self::DeniedAdvisory => "DeniedAdvisory",
        }
    }
}
impl std::convert::TryFrom<&str> for MobFlowDelegationEdgeAdmissionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Admitted" => Ok(Self::Admitted),
            "DeniedStrict" => Ok(Self::DeniedStrict),
            "DeniedAdvisory" => Ok(Self::DeniedAdvisory),
            other => Err(format!(
                "invalid MobFlowDelegationEdgeAdmissionKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobFlowDelegationEdgeAdmissionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobFlowDelegationEdgeAdmissionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobFlowDelegationEdgeModeKind {
    #[default]
    #[serde(rename = "Advisory")]
    Advisory,
    #[serde(rename = "Strict")]
    Strict,
}
impl MobFlowDelegationEdgeModeKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Advisory => "Advisory",
            Self::Strict => "Strict",
        }
    }
}
impl std::convert::TryFrom<&str> for MobFlowDelegationEdgeModeKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Advisory" => Ok(Self::Advisory),
            "Strict" => Ok(Self::Strict),
            other => Err(format!(
                "invalid MobFlowDelegationEdgeModeKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobFlowDelegationEdgeModeKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobFlowDelegationEdgeModeKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobFlowDelegationEdgeRuleVerdictKind {
    #[default]
    #[serde(rename = "Allow")]
    Allow,
    #[serde(rename = "Deny")]
    Deny,
}
impl MobFlowDelegationEdgeRuleVerdictKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Allow => "Allow",
            Self::Deny => "Deny",
        }
    }
}
impl std::convert::TryFrom<&str> for MobFlowDelegationEdgeRuleVerdictKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Allow" => Ok(Self::Allow),
            "Deny" => Ok(Self::Deny),
            other => Err(format!(
                "invalid MobFlowDelegationEdgeRuleVerdictKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobFlowDelegationEdgeRuleVerdictKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobFlowDelegationEdgeRuleVerdictKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobFrameSeedDisposition {
    #[default]
    #[serde(rename = "Seeded")]
    Seeded,
    #[serde(rename = "AlreadySeeded")]
    AlreadySeeded,
}
impl MobFrameSeedDisposition {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Seeded => "Seeded",
            Self::AlreadySeeded => "AlreadySeeded",
        }
    }
}
impl std::convert::TryFrom<&str> for MobFrameSeedDisposition {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Seeded" => Ok(Self::Seeded),
            "AlreadySeeded" => Ok(Self::AlreadySeeded),
            other => Err(format!("invalid MobFrameSeedDisposition value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MobFrameSeedDisposition {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobFrameSeedDisposition {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct MobId(pub String);
impl From<String> for MobId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for MobId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for MobId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobLifecycleJournalKind {
    #[default]
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "Destroying")]
    Destroying,
    #[serde(rename = "DestroyStorageFinalizing")]
    DestroyStorageFinalizing,
    #[serde(rename = "MemberSpawned")]
    MemberSpawned,
    #[serde(rename = "MemberRetired")]
    MemberRetired,
    #[serde(rename = "Reset")]
    Reset,
}
impl MobLifecycleJournalKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Completed => "Completed",
            Self::Destroying => "Destroying",
            Self::DestroyStorageFinalizing => "DestroyStorageFinalizing",
            Self::MemberSpawned => "MemberSpawned",
            Self::MemberRetired => "MemberRetired",
            Self::Reset => "Reset",
        }
    }
}
impl std::convert::TryFrom<&str> for MobLifecycleJournalKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Completed" => Ok(Self::Completed),
            "Destroying" => Ok(Self::Destroying),
            "DestroyStorageFinalizing" => Ok(Self::DestroyStorageFinalizing),
            "MemberSpawned" => Ok(Self::MemberSpawned),
            "MemberRetired" => Ok(Self::MemberRetired),
            "Reset" => Ok(Self::Reset),
            other => Err(format!("invalid MobLifecycleJournalKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MobLifecycleJournalKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobLifecycleJournalKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobMemberOperationEligibilityKind {
    #[default]
    #[serde(rename = "DeniedNotRunning")]
    DeniedNotRunning,
    #[serde(rename = "Admitted")]
    Admitted,
}
impl MobMemberOperationEligibilityKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::DeniedNotRunning => "DeniedNotRunning",
            Self::Admitted => "Admitted",
        }
    }
}
impl std::convert::TryFrom<&str> for MobMemberOperationEligibilityKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "DeniedNotRunning" => Ok(Self::DeniedNotRunning),
            "Admitted" => Ok(Self::Admitted),
            other => Err(format!(
                "invalid MobMemberOperationEligibilityKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobMemberOperationEligibilityKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobMemberOperationEligibilityKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobMemberState {
    #[default]
    #[serde(rename = "Active")]
    Active,
    #[serde(rename = "Retiring")]
    Retiring,
}
impl MobMemberState {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Active => "Active",
            Self::Retiring => "Retiring",
        }
    }
}
impl std::convert::TryFrom<&str> for MobMemberState {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Active" => Ok(Self::Active),
            "Retiring" => Ok(Self::Retiring),
            other => Err(format!("invalid MobMemberState value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MobMemberState {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobMemberState {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobPendingSupervisorAcceptanceKind {
    #[default]
    #[serde(rename = "Fatal")]
    Fatal,
    #[serde(rename = "NotConfirmedReattempt")]
    NotConfirmedReattempt,
    #[serde(rename = "StalePendingAuthority")]
    StalePendingAuthority,
}
impl MobPendingSupervisorAcceptanceKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Fatal => "Fatal",
            Self::NotConfirmedReattempt => "NotConfirmedReattempt",
            Self::StalePendingAuthority => "StalePendingAuthority",
        }
    }
}
impl std::convert::TryFrom<&str> for MobPendingSupervisorAcceptanceKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Fatal" => Ok(Self::Fatal),
            "NotConfirmedReattempt" => Ok(Self::NotConfirmedReattempt),
            "StalePendingAuthority" => Ok(Self::StalePendingAuthority),
            other => Err(format!(
                "invalid MobPendingSupervisorAcceptanceKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobPendingSupervisorAcceptanceKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobPendingSupervisorAcceptanceKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobProfileMutationAdmissionKind {
    #[default]
    #[serde(rename = "Denied")]
    Denied,
    #[serde(rename = "Allowed")]
    Allowed,
}
impl MobProfileMutationAdmissionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Denied => "Denied",
            Self::Allowed => "Allowed",
        }
    }
}
impl std::convert::TryFrom<&str> for MobProfileMutationAdmissionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Denied" => Ok(Self::Denied),
            "Allowed" => Ok(Self::Allowed),
            other => Err(format!(
                "invalid MobProfileMutationAdmissionKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobProfileMutationAdmissionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobProfileMutationAdmissionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobRemoteMemberRuntimeObservedState {
    #[default]
    #[serde(rename = "Initializing")]
    Initializing,
    #[serde(rename = "Idle")]
    Idle,
    #[serde(rename = "Attached")]
    Attached,
    #[serde(rename = "Running")]
    Running,
    #[serde(rename = "Retired")]
    Retired,
    #[serde(rename = "Stopped")]
    Stopped,
    #[serde(rename = "Destroyed")]
    Destroyed,
}
impl MobRemoteMemberRuntimeObservedState {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Initializing => "Initializing",
            Self::Idle => "Idle",
            Self::Attached => "Attached",
            Self::Running => "Running",
            Self::Retired => "Retired",
            Self::Stopped => "Stopped",
            Self::Destroyed => "Destroyed",
        }
    }
}
impl std::convert::TryFrom<&str> for MobRemoteMemberRuntimeObservedState {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Initializing" => Ok(Self::Initializing),
            "Idle" => Ok(Self::Idle),
            "Attached" => Ok(Self::Attached),
            "Running" => Ok(Self::Running),
            "Retired" => Ok(Self::Retired),
            "Stopped" => Ok(Self::Stopped),
            "Destroyed" => Ok(Self::Destroyed),
            other => Err(format!(
                "invalid MobRemoteMemberRuntimeObservedState value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobRemoteMemberRuntimeObservedState {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobRemoteMemberRuntimeObservedState {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobRemoteMemberRuntimeTerminality {
    #[default]
    #[serde(rename = "NonTerminal")]
    NonTerminal,
    #[serde(rename = "Terminal")]
    Terminal,
}
impl MobRemoteMemberRuntimeTerminality {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::NonTerminal => "NonTerminal",
            Self::Terminal => "Terminal",
        }
    }
}
impl std::convert::TryFrom<&str> for MobRemoteMemberRuntimeTerminality {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "NonTerminal" => Ok(Self::NonTerminal),
            "Terminal" => Ok(Self::Terminal),
            other => Err(format!(
                "invalid MobRemoteMemberRuntimeTerminality value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobRemoteMemberRuntimeTerminality {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobRemoteMemberRuntimeTerminality {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobSpawnManyFailureCauseKind {
    #[default]
    #[serde(rename = "ProfileNotFound")]
    ProfileNotFound,
    #[serde(rename = "MemberNotFound")]
    MemberNotFound,
    #[serde(rename = "MemberAlreadyExists")]
    MemberAlreadyExists,
    #[serde(rename = "NotExternallyAddressable")]
    NotExternallyAddressable,
    #[serde(rename = "InvalidTransition")]
    InvalidTransition,
    #[serde(rename = "WiringError")]
    WiringError,
    #[serde(rename = "BridgeCommandRejected")]
    BridgeCommandRejected,
    #[serde(rename = "MemberRestoreFailed")]
    MemberRestoreFailed,
    #[serde(rename = "KickoffWaitTimedOut")]
    KickoffWaitTimedOut,
    #[serde(rename = "ReadyWaitTimedOut")]
    ReadyWaitTimedOut,
    #[serde(rename = "DefinitionError")]
    DefinitionError,
    #[serde(rename = "FlowNotFound")]
    FlowNotFound,
    #[serde(rename = "FlowFailed")]
    FlowFailed,
    #[serde(rename = "RunNotFound")]
    RunNotFound,
    #[serde(rename = "RunCanceled")]
    RunCanceled,
    #[serde(rename = "FlowTurnTimedOut")]
    FlowTurnTimedOut,
    #[serde(rename = "FrameDepthLimitExceeded")]
    FrameDepthLimitExceeded,
    #[serde(rename = "FrameAtomicPersistenceUnavailable")]
    FrameAtomicPersistenceUnavailable,
    #[serde(rename = "SpecRevisionConflict")]
    SpecRevisionConflict,
    #[serde(rename = "SchemaValidation")]
    SchemaValidation,
    #[serde(rename = "InsufficientTargets")]
    InsufficientTargets,
    #[serde(rename = "TopologyViolation")]
    TopologyViolation,
    #[serde(rename = "BridgeDeliveryRejected")]
    BridgeDeliveryRejected,
    #[serde(rename = "SupervisorEscalation")]
    SupervisorEscalation,
    #[serde(rename = "UnsupportedForMode")]
    UnsupportedForMode,
    #[serde(rename = "MissingMemberCapability")]
    MissingMemberCapability,
    #[serde(rename = "ResetBarrier")]
    ResetBarrier,
    #[serde(rename = "StorageError")]
    StorageError,
    #[serde(rename = "SessionError")]
    SessionError,
    #[serde(rename = "CommsError")]
    CommsError,
    #[serde(rename = "CallbackPending")]
    CallbackPending,
    #[serde(rename = "StaleFenceToken")]
    StaleFenceToken,
    #[serde(rename = "StaleEventCursor")]
    StaleEventCursor,
    #[serde(rename = "WorkNotFound")]
    WorkNotFound,
    #[serde(rename = "Internal")]
    Internal,
}
impl MobSpawnManyFailureCauseKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::ProfileNotFound => "ProfileNotFound",
            Self::MemberNotFound => "MemberNotFound",
            Self::MemberAlreadyExists => "MemberAlreadyExists",
            Self::NotExternallyAddressable => "NotExternallyAddressable",
            Self::InvalidTransition => "InvalidTransition",
            Self::WiringError => "WiringError",
            Self::BridgeCommandRejected => "BridgeCommandRejected",
            Self::MemberRestoreFailed => "MemberRestoreFailed",
            Self::KickoffWaitTimedOut => "KickoffWaitTimedOut",
            Self::ReadyWaitTimedOut => "ReadyWaitTimedOut",
            Self::DefinitionError => "DefinitionError",
            Self::FlowNotFound => "FlowNotFound",
            Self::FlowFailed => "FlowFailed",
            Self::RunNotFound => "RunNotFound",
            Self::RunCanceled => "RunCanceled",
            Self::FlowTurnTimedOut => "FlowTurnTimedOut",
            Self::FrameDepthLimitExceeded => "FrameDepthLimitExceeded",
            Self::FrameAtomicPersistenceUnavailable => "FrameAtomicPersistenceUnavailable",
            Self::SpecRevisionConflict => "SpecRevisionConflict",
            Self::SchemaValidation => "SchemaValidation",
            Self::InsufficientTargets => "InsufficientTargets",
            Self::TopologyViolation => "TopologyViolation",
            Self::BridgeDeliveryRejected => "BridgeDeliveryRejected",
            Self::SupervisorEscalation => "SupervisorEscalation",
            Self::UnsupportedForMode => "UnsupportedForMode",
            Self::MissingMemberCapability => "MissingMemberCapability",
            Self::ResetBarrier => "ResetBarrier",
            Self::StorageError => "StorageError",
            Self::SessionError => "SessionError",
            Self::CommsError => "CommsError",
            Self::CallbackPending => "CallbackPending",
            Self::StaleFenceToken => "StaleFenceToken",
            Self::StaleEventCursor => "StaleEventCursor",
            Self::WorkNotFound => "WorkNotFound",
            Self::Internal => "Internal",
        }
    }
}
impl std::convert::TryFrom<&str> for MobSpawnManyFailureCauseKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "ProfileNotFound" => Ok(Self::ProfileNotFound),
            "MemberNotFound" => Ok(Self::MemberNotFound),
            "MemberAlreadyExists" => Ok(Self::MemberAlreadyExists),
            "NotExternallyAddressable" => Ok(Self::NotExternallyAddressable),
            "InvalidTransition" => Ok(Self::InvalidTransition),
            "WiringError" => Ok(Self::WiringError),
            "BridgeCommandRejected" => Ok(Self::BridgeCommandRejected),
            "MemberRestoreFailed" => Ok(Self::MemberRestoreFailed),
            "KickoffWaitTimedOut" => Ok(Self::KickoffWaitTimedOut),
            "ReadyWaitTimedOut" => Ok(Self::ReadyWaitTimedOut),
            "DefinitionError" => Ok(Self::DefinitionError),
            "FlowNotFound" => Ok(Self::FlowNotFound),
            "FlowFailed" => Ok(Self::FlowFailed),
            "RunNotFound" => Ok(Self::RunNotFound),
            "RunCanceled" => Ok(Self::RunCanceled),
            "FlowTurnTimedOut" => Ok(Self::FlowTurnTimedOut),
            "FrameDepthLimitExceeded" => Ok(Self::FrameDepthLimitExceeded),
            "FrameAtomicPersistenceUnavailable" => Ok(Self::FrameAtomicPersistenceUnavailable),
            "SpecRevisionConflict" => Ok(Self::SpecRevisionConflict),
            "SchemaValidation" => Ok(Self::SchemaValidation),
            "InsufficientTargets" => Ok(Self::InsufficientTargets),
            "TopologyViolation" => Ok(Self::TopologyViolation),
            "BridgeDeliveryRejected" => Ok(Self::BridgeDeliveryRejected),
            "SupervisorEscalation" => Ok(Self::SupervisorEscalation),
            "UnsupportedForMode" => Ok(Self::UnsupportedForMode),
            "MissingMemberCapability" => Ok(Self::MissingMemberCapability),
            "ResetBarrier" => Ok(Self::ResetBarrier),
            "StorageError" => Ok(Self::StorageError),
            "SessionError" => Ok(Self::SessionError),
            "CommsError" => Ok(Self::CommsError),
            "CallbackPending" => Ok(Self::CallbackPending),
            "StaleFenceToken" => Ok(Self::StaleFenceToken),
            "StaleEventCursor" => Ok(Self::StaleEventCursor),
            "WorkNotFound" => Ok(Self::WorkNotFound),
            "Internal" => Ok(Self::Internal),
            other => Err(format!(
                "invalid MobSpawnManyFailureCauseKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobSpawnManyFailureCauseKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobSpawnManyFailureCauseKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobSpawnManyFailureObservationKind {
    #[default]
    #[serde(rename = "ProfileNotFound")]
    ProfileNotFound,
    #[serde(rename = "MemberNotFound")]
    MemberNotFound,
    #[serde(rename = "MemberAlreadyExists")]
    MemberAlreadyExists,
    #[serde(rename = "NotExternallyAddressable")]
    NotExternallyAddressable,
    #[serde(rename = "InvalidTransition")]
    InvalidTransition,
    #[serde(rename = "WiringError")]
    WiringError,
    #[serde(rename = "SupervisorRotationIncomplete")]
    SupervisorRotationIncomplete,
    #[serde(rename = "BridgeCommandRejected")]
    BridgeCommandRejected,
    #[serde(rename = "MemberRestoreFailed")]
    MemberRestoreFailed,
    #[serde(rename = "KickoffWaitTimedOut")]
    KickoffWaitTimedOut,
    #[serde(rename = "ReadyWaitTimedOut")]
    ReadyWaitTimedOut,
    #[serde(rename = "DefinitionError")]
    DefinitionError,
    #[serde(rename = "FlowNotFound")]
    FlowNotFound,
    #[serde(rename = "FlowFailed")]
    FlowFailed,
    #[serde(rename = "RunNotFound")]
    RunNotFound,
    #[serde(rename = "RunCanceled")]
    RunCanceled,
    #[serde(rename = "FlowTurnTimedOut")]
    FlowTurnTimedOut,
    #[serde(rename = "FrameDepthLimitExceeded")]
    FrameDepthLimitExceeded,
    #[serde(rename = "FrameAtomicPersistenceUnavailable")]
    FrameAtomicPersistenceUnavailable,
    #[serde(rename = "SpecRevisionConflict")]
    SpecRevisionConflict,
    #[serde(rename = "SchemaValidation")]
    SchemaValidation,
    #[serde(rename = "InsufficientTargets")]
    InsufficientTargets,
    #[serde(rename = "TopologyViolation")]
    TopologyViolation,
    #[serde(rename = "BridgeDeliveryRejected")]
    BridgeDeliveryRejected,
    #[serde(rename = "SupervisorEscalation")]
    SupervisorEscalation,
    #[serde(rename = "UnsupportedForMode")]
    UnsupportedForMode,
    #[serde(rename = "MissingMemberCapability")]
    MissingMemberCapability,
    #[serde(rename = "ResetBarrier")]
    ResetBarrier,
    #[serde(rename = "StorageError")]
    StorageError,
    #[serde(rename = "SessionError")]
    SessionError,
    #[serde(rename = "CommsError")]
    CommsError,
    #[serde(rename = "CallbackPending")]
    CallbackPending,
    #[serde(rename = "StaleFenceToken")]
    StaleFenceToken,
    #[serde(rename = "StaleEventCursor")]
    StaleEventCursor,
    #[serde(rename = "WorkNotFound")]
    WorkNotFound,
    #[serde(rename = "Internal")]
    Internal,
}
impl MobSpawnManyFailureObservationKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::ProfileNotFound => "ProfileNotFound",
            Self::MemberNotFound => "MemberNotFound",
            Self::MemberAlreadyExists => "MemberAlreadyExists",
            Self::NotExternallyAddressable => "NotExternallyAddressable",
            Self::InvalidTransition => "InvalidTransition",
            Self::WiringError => "WiringError",
            Self::SupervisorRotationIncomplete => "SupervisorRotationIncomplete",
            Self::BridgeCommandRejected => "BridgeCommandRejected",
            Self::MemberRestoreFailed => "MemberRestoreFailed",
            Self::KickoffWaitTimedOut => "KickoffWaitTimedOut",
            Self::ReadyWaitTimedOut => "ReadyWaitTimedOut",
            Self::DefinitionError => "DefinitionError",
            Self::FlowNotFound => "FlowNotFound",
            Self::FlowFailed => "FlowFailed",
            Self::RunNotFound => "RunNotFound",
            Self::RunCanceled => "RunCanceled",
            Self::FlowTurnTimedOut => "FlowTurnTimedOut",
            Self::FrameDepthLimitExceeded => "FrameDepthLimitExceeded",
            Self::FrameAtomicPersistenceUnavailable => "FrameAtomicPersistenceUnavailable",
            Self::SpecRevisionConflict => "SpecRevisionConflict",
            Self::SchemaValidation => "SchemaValidation",
            Self::InsufficientTargets => "InsufficientTargets",
            Self::TopologyViolation => "TopologyViolation",
            Self::BridgeDeliveryRejected => "BridgeDeliveryRejected",
            Self::SupervisorEscalation => "SupervisorEscalation",
            Self::UnsupportedForMode => "UnsupportedForMode",
            Self::MissingMemberCapability => "MissingMemberCapability",
            Self::ResetBarrier => "ResetBarrier",
            Self::StorageError => "StorageError",
            Self::SessionError => "SessionError",
            Self::CommsError => "CommsError",
            Self::CallbackPending => "CallbackPending",
            Self::StaleFenceToken => "StaleFenceToken",
            Self::StaleEventCursor => "StaleEventCursor",
            Self::WorkNotFound => "WorkNotFound",
            Self::Internal => "Internal",
        }
    }
}
impl std::convert::TryFrom<&str> for MobSpawnManyFailureObservationKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "ProfileNotFound" => Ok(Self::ProfileNotFound),
            "MemberNotFound" => Ok(Self::MemberNotFound),
            "MemberAlreadyExists" => Ok(Self::MemberAlreadyExists),
            "NotExternallyAddressable" => Ok(Self::NotExternallyAddressable),
            "InvalidTransition" => Ok(Self::InvalidTransition),
            "WiringError" => Ok(Self::WiringError),
            "SupervisorRotationIncomplete" => Ok(Self::SupervisorRotationIncomplete),
            "BridgeCommandRejected" => Ok(Self::BridgeCommandRejected),
            "MemberRestoreFailed" => Ok(Self::MemberRestoreFailed),
            "KickoffWaitTimedOut" => Ok(Self::KickoffWaitTimedOut),
            "ReadyWaitTimedOut" => Ok(Self::ReadyWaitTimedOut),
            "DefinitionError" => Ok(Self::DefinitionError),
            "FlowNotFound" => Ok(Self::FlowNotFound),
            "FlowFailed" => Ok(Self::FlowFailed),
            "RunNotFound" => Ok(Self::RunNotFound),
            "RunCanceled" => Ok(Self::RunCanceled),
            "FlowTurnTimedOut" => Ok(Self::FlowTurnTimedOut),
            "FrameDepthLimitExceeded" => Ok(Self::FrameDepthLimitExceeded),
            "FrameAtomicPersistenceUnavailable" => Ok(Self::FrameAtomicPersistenceUnavailable),
            "SpecRevisionConflict" => Ok(Self::SpecRevisionConflict),
            "SchemaValidation" => Ok(Self::SchemaValidation),
            "InsufficientTargets" => Ok(Self::InsufficientTargets),
            "TopologyViolation" => Ok(Self::TopologyViolation),
            "BridgeDeliveryRejected" => Ok(Self::BridgeDeliveryRejected),
            "SupervisorEscalation" => Ok(Self::SupervisorEscalation),
            "UnsupportedForMode" => Ok(Self::UnsupportedForMode),
            "MissingMemberCapability" => Ok(Self::MissingMemberCapability),
            "ResetBarrier" => Ok(Self::ResetBarrier),
            "StorageError" => Ok(Self::StorageError),
            "SessionError" => Ok(Self::SessionError),
            "CommsError" => Ok(Self::CommsError),
            "CallbackPending" => Ok(Self::CallbackPending),
            "StaleFenceToken" => Ok(Self::StaleFenceToken),
            "StaleEventCursor" => Ok(Self::StaleEventCursor),
            "WorkNotFound" => Ok(Self::WorkNotFound),
            "Internal" => Ok(Self::Internal),
            other => Err(format!(
                "invalid MobSpawnManyFailureObservationKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobSpawnManyFailureObservationKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobSpawnManyFailureObservationKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobSpawnMemberAdmissionKind {
    #[default]
    #[serde(rename = "Denied")]
    Denied,
    #[serde(rename = "Allowed")]
    Allowed,
}
impl MobSpawnMemberAdmissionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Denied => "Denied",
            Self::Allowed => "Allowed",
        }
    }
}
impl std::convert::TryFrom<&str> for MobSpawnMemberAdmissionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Denied" => Ok(Self::Denied),
            "Allowed" => Ok(Self::Allowed),
            other => Err(format!(
                "invalid MobSpawnMemberAdmissionKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for MobSpawnMemberAdmissionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobSpawnMemberAdmissionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum MobSpawnToolAdmissionKind {
    #[default]
    #[serde(rename = "Denied")]
    Denied,
    #[serde(rename = "Allowed")]
    Allowed,
}
impl MobSpawnToolAdmissionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Denied => "Denied",
            Self::Allowed => "Allowed",
        }
    }
}
impl std::convert::TryFrom<&str> for MobSpawnToolAdmissionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Denied" => Ok(Self::Denied),
            "Allowed" => Ok(Self::Allowed),
            other => Err(format!("invalid MobSpawnToolAdmissionKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for MobSpawnToolAdmissionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for MobSpawnToolAdmissionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
pub type MobToolCallerProvenance = meerkat_core::service::MobToolCallerProvenance;
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum NodeRunStatus {
    #[default]
    #[serde(rename = "Pending")]
    Pending,
    #[serde(rename = "Ready")]
    Ready,
    #[serde(rename = "Running")]
    Running,
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "Failed")]
    Failed,
    #[serde(rename = "Skipped")]
    Skipped,
    #[serde(rename = "Canceled")]
    Canceled,
}
impl NodeRunStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Pending => "Pending",
            Self::Ready => "Ready",
            Self::Running => "Running",
            Self::Completed => "Completed",
            Self::Failed => "Failed",
            Self::Skipped => "Skipped",
            Self::Canceled => "Canceled",
        }
    }
}
impl std::convert::TryFrom<&str> for NodeRunStatus {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Pending" => Ok(Self::Pending),
            "Ready" => Ok(Self::Ready),
            "Running" => Ok(Self::Running),
            "Completed" => Ok(Self::Completed),
            "Failed" => Ok(Self::Failed),
            "Skipped" => Ok(Self::Skipped),
            "Canceled" => Ok(Self::Canceled),
            other => Err(format!("invalid NodeRunStatus value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for NodeRunStatus {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for NodeRunStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
pub type OpaquePrincipalToken = meerkat_core::service::OpaquePrincipalToken;
pub type PeerId = meerkat_machine_schema::catalog::dsl::mob_machine::PeerId;
pub type PeerSigningKey = meerkat_machine_schema::catalog::dsl::mob_machine::PeerSigningKey;
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum PolicyDecision {
    #[default]
    #[serde(rename = "Allow")]
    Allow,
    #[serde(rename = "Deny")]
    Deny,
}
impl PolicyDecision {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Allow => "Allow",
            Self::Deny => "Deny",
        }
    }
}
impl std::convert::TryFrom<&str> for PolicyDecision {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Allow" => Ok(Self::Allow),
            "Deny" => Ok(Self::Deny),
            other => Err(format!("invalid PolicyDecision value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for PolicyDecision {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for PolicyDecision {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct ResourceClaimId(pub String);
impl From<String> for ResourceClaimId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for ResourceClaimId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for ResourceClaimId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct RespawnTopologyPeerId(pub String);
impl From<String> for RespawnTopologyPeerId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for RespawnTopologyPeerId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for RespawnTopologyPeerId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum RespawnTopologyRestoreResultKind {
    #[default]
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "TopologyRestoreFailed")]
    TopologyRestoreFailed,
}
impl RespawnTopologyRestoreResultKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Completed => "Completed",
            Self::TopologyRestoreFailed => "TopologyRestoreFailed",
        }
    }
}
impl std::convert::TryFrom<&str> for RespawnTopologyRestoreResultKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Completed" => Ok(Self::Completed),
            "TopologyRestoreFailed" => Ok(Self::TopologyRestoreFailed),
            other => Err(format!(
                "invalid RespawnTopologyRestoreResultKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for RespawnTopologyRestoreResultKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for RespawnTopologyRestoreResultKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct RunId(pub String);
impl From<String> for RunId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for RunId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for RunId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct SessionId(pub String);
impl From<String> for SessionId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for SessionId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for SessionId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum SpawnExecPhase {
    #[default]
    #[serde(rename = "Opened")]
    Opened,
    #[serde(rename = "MembershipCommitted")]
    MembershipCommitted,
    #[serde(rename = "Activated")]
    Activated,
}
impl SpawnExecPhase {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Opened => "Opened",
            Self::MembershipCommitted => "MembershipCommitted",
            Self::Activated => "Activated",
        }
    }
}
impl std::convert::TryFrom<&str> for SpawnExecPhase {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Opened" => Ok(Self::Opened),
            "MembershipCommitted" => Ok(Self::MembershipCommitted),
            "Activated" => Ok(Self::Activated),
            other => Err(format!("invalid SpawnExecPhase value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for SpawnExecPhase {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for SpawnExecPhase {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum SpawnPolicyRuntimeMode {
    #[default]
    #[serde(rename = "AutonomousHost")]
    AutonomousHost,
    #[serde(rename = "TurnDriven")]
    TurnDriven,
}
impl SpawnPolicyRuntimeMode {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::AutonomousHost => "AutonomousHost",
            Self::TurnDriven => "TurnDriven",
        }
    }
}
impl std::convert::TryFrom<&str> for SpawnPolicyRuntimeMode {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "AutonomousHost" => Ok(Self::AutonomousHost),
            "TurnDriven" => Ok(Self::TurnDriven),
            other => Err(format!("invalid SpawnPolicyRuntimeMode value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for SpawnPolicyRuntimeMode {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for SpawnPolicyRuntimeMode {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum StepFaultDispositionKind {
    #[default]
    #[serde(rename = "Retry")]
    Retry,
    #[serde(rename = "Terminal")]
    Terminal,
}
impl StepFaultDispositionKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Retry => "Retry",
            Self::Terminal => "Terminal",
        }
    }
}
impl std::convert::TryFrom<&str> for StepFaultDispositionKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Retry" => Ok(Self::Retry),
            "Terminal" => Ok(Self::Terminal),
            other => Err(format!("invalid StepFaultDispositionKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for StepFaultDispositionKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for StepFaultDispositionKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct StepId(pub String);
impl From<String> for StepId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for StepId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for StepId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum StepOutputFaultKind {
    #[default]
    #[serde(rename = "MalformedJson")]
    MalformedJson,
}
impl StepOutputFaultKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::MalformedJson => "MalformedJson",
        }
    }
}
impl std::convert::TryFrom<&str> for StepOutputFaultKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "MalformedJson" => Ok(Self::MalformedJson),
            other => Err(format!("invalid StepOutputFaultKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for StepOutputFaultKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for StepOutputFaultKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum StepRunStatus {
    #[default]
    #[serde(rename = "Dispatched")]
    Dispatched,
    #[serde(rename = "Completed")]
    Completed,
    #[serde(rename = "Failed")]
    Failed,
    #[serde(rename = "Skipped")]
    Skipped,
    #[serde(rename = "Canceled")]
    Canceled,
}
impl StepRunStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Dispatched => "Dispatched",
            Self::Completed => "Completed",
            Self::Failed => "Failed",
            Self::Skipped => "Skipped",
            Self::Canceled => "Canceled",
        }
    }
}
impl std::convert::TryFrom<&str> for StepRunStatus {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Dispatched" => Ok(Self::Dispatched),
            "Completed" => Ok(Self::Completed),
            "Failed" => Ok(Self::Failed),
            "Skipped" => Ok(Self::Skipped),
            "Canceled" => Ok(Self::Canceled),
            other => Err(format!("invalid StepRunStatus value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for StepRunStatus {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for StepRunStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum SubmitWorkRejectReasonKind {
    #[default]
    #[serde(rename = "MobNotRunning")]
    MobNotRunning,
    #[serde(rename = "MemberNotFound")]
    MemberNotFound,
    #[serde(rename = "StaleFenceToken")]
    StaleFenceToken,
    #[serde(rename = "NotExternallyAddressable")]
    NotExternallyAddressable,
}
impl SubmitWorkRejectReasonKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::MobNotRunning => "MobNotRunning",
            Self::MemberNotFound => "MemberNotFound",
            Self::StaleFenceToken => "StaleFenceToken",
            Self::NotExternallyAddressable => "NotExternallyAddressable",
        }
    }
}
impl std::convert::TryFrom<&str> for SubmitWorkRejectReasonKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "MobNotRunning" => Ok(Self::MobNotRunning),
            "MemberNotFound" => Ok(Self::MemberNotFound),
            "StaleFenceToken" => Ok(Self::StaleFenceToken),
            "NotExternallyAddressable" => Ok(Self::NotExternallyAddressable),
            other => Err(format!(
                "invalid SubmitWorkRejectReasonKind value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for SubmitWorkRejectReasonKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for SubmitWorkRejectReasonKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum SupervisorEscalationFailureCause {
    #[default]
    #[serde(rename = "NoEligibleSupervisor")]
    NoEligibleSupervisor,
    #[serde(rename = "TimeoutExceeded")]
    TimeoutExceeded,
}
impl SupervisorEscalationFailureCause {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::NoEligibleSupervisor => "NoEligibleSupervisor",
            Self::TimeoutExceeded => "TimeoutExceeded",
        }
    }
}
impl std::convert::TryFrom<&str> for SupervisorEscalationFailureCause {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "NoEligibleSupervisor" => Ok(Self::NoEligibleSupervisor),
            "TimeoutExceeded" => Ok(Self::TimeoutExceeded),
            other => Err(format!(
                "invalid SupervisorEscalationFailureCause value `{other}`"
            )),
        }
    }
}
impl std::convert::TryFrom<String> for SupervisorEscalationFailureCause {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for SupervisorEscalationFailureCause {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
pub type SupervisorProtocolVersion =
    meerkat_machine_schema::catalog::dsl::mob_machine::SupervisorProtocolVersion;
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum TurnTimeoutDisposition {
    #[default]
    #[serde(rename = "Detached")]
    Detached,
    #[serde(rename = "Canceled")]
    Canceled,
    #[serde(rename = "Retryable")]
    Retryable,
}
impl TurnTimeoutDisposition {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Detached => "Detached",
            Self::Canceled => "Canceled",
            Self::Retryable => "Retryable",
        }
    }
}
impl std::convert::TryFrom<&str> for TurnTimeoutDisposition {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Detached" => Ok(Self::Detached),
            "Canceled" => Ok(Self::Canceled),
            "Retryable" => Ok(Self::Retryable),
            other => Err(format!("invalid TurnTimeoutDisposition value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for TurnTimeoutDisposition {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for TurnTimeoutDisposition {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct WiringEdge(pub String);
impl From<String> for WiringEdge {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for WiringEdge {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for WiringEdge {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum WiringLifecycleKind {
    #[default]
    #[serde(rename = "Wired")]
    Wired,
    #[serde(rename = "Unwired")]
    Unwired,
}
impl WiringLifecycleKind {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Wired => "Wired",
            Self::Unwired => "Unwired",
        }
    }
}
impl std::convert::TryFrom<&str> for WiringLifecycleKind {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "Wired" => Ok(Self::Wired),
            "Unwired" => Ok(Self::Unwired),
            other => Err(format!("invalid WiringLifecycleKind value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for WiringLifecycleKind {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for WiringLifecycleKind {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct WorkId(pub String);
impl From<String> for WorkId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for WorkId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for WorkId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[derive(
    Debug,
    Clone,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub struct WorkIntentId(pub String);
impl From<String> for WorkIntentId {
    fn from(value: String) -> Self {
        Self(value)
    }
}
impl From<&str> for WorkIntentId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}
impl std::fmt::Display for WorkIntentId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}
#[allow(non_camel_case_types)]
#[derive(
    Debug,
    Clone,
    Copy,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
)]
pub enum WorkOrigin {
    #[default]
    #[serde(rename = "External")]
    External,
    #[serde(rename = "Internal")]
    Internal,
    #[serde(rename = "Ingest")]
    Ingest,
}
impl WorkOrigin {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::External => "External",
            Self::Internal => "Internal",
            Self::Ingest => "Ingest",
        }
    }
}
impl std::convert::TryFrom<&str> for WorkOrigin {
    type Error = String;
    fn try_from(value: &str) -> Result<Self, Self::Error> {
        match value {
            "External" => Ok(Self::External),
            "Internal" => Ok(Self::Internal),
            "Ingest" => Ok(Self::Ingest),
            other => Err(format!("invalid WorkOrigin value `{other}`")),
        }
    }
}
impl std::convert::TryFrom<String> for WorkOrigin {
    type Error = String;
    fn try_from(value: String) -> Result<Self, Self::Error> {
        Self::try_from(value.as_str())
    }
}
impl std::fmt::Display for WorkOrigin {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(self.as_str())
    }
}

pub trait Context {}
pub struct EmptyContext;
impl Context for EmptyContext {}

#[allow(non_camel_case_types)]
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum Phase {
    Running,
    Stopped,
    Completed,
    Destroyed,
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct State {
    pub phase: Phase,
    pub destroy_admitted: bool,
    pub live_runtime_ids: std::collections::BTreeSet<AgentRuntimeId>,
    pub externally_addressable_runtime_ids: std::collections::BTreeSet<AgentRuntimeId>,
    pub runtime_fence_tokens: std::collections::BTreeMap<AgentRuntimeId, FenceToken>,
    pub identity_runtime_generations: std::collections::BTreeMap<AgentIdentity, Generation>,
    pub identity_runtime_fence_tokens: std::collections::BTreeMap<AgentIdentity, FenceToken>,
    pub active_run_count: u64,
    pub flow_authority_schema_version: u64,
    pub run_status: std::collections::BTreeMap<RunId, FlowRunStatus>,
    pub run_ordered_steps: std::collections::BTreeMap<RunId, Vec<StepId>>,
    pub run_tracked_steps: std::collections::BTreeMap<RunId, std::collections::BTreeSet<StepId>>,
    pub run_step_status: std::collections::BTreeMap<
        RunId,
        std::collections::BTreeMap<StepId, Option<StepRunStatus>>,
    >,
    pub run_output_recorded:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, bool>>,
    pub run_step_condition_results:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, Option<bool>>>,
    pub run_step_has_conditions:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, bool>>,
    pub run_step_dependencies:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, Vec<StepId>>>,
    pub run_step_dependency_modes:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, DependencyMode>>,
    pub run_step_branches:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, Option<BranchId>>>,
    pub run_step_collection_policies:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, CollectionPolicyKind>>,
    pub run_step_quorum_thresholds:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, u32>>,
    pub run_step_target_counts:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, u64>>,
    pub run_step_target_success_counts:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, u64>>,
    pub run_step_target_terminal_failure_counts:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<StepId, u64>>,
    pub run_target_retry_counts:
        std::collections::BTreeMap<RunId, std::collections::BTreeMap<String, u64>>,
    pub run_failure_count: std::collections::BTreeMap<RunId, u64>,
    pub run_consecutive_failure_count: std::collections::BTreeMap<RunId, u64>,
    pub run_escalation_threshold: std::collections::BTreeMap<RunId, u64>,
    pub run_max_step_retries: std::collections::BTreeMap<RunId, u32>,
    pub run_ready_frames: std::collections::BTreeMap<RunId, Vec<FrameId>>,
    pub run_ready_frame_membership:
        std::collections::BTreeMap<RunId, std::collections::BTreeSet<FrameId>>,
    pub run_ready_frame_membership_flat: std::collections::BTreeSet<FrameId>,
    pub run_pending_body_frame_loops: std::collections::BTreeMap<RunId, Vec<LoopInstanceId>>,
    pub run_pending_body_frame_loop_membership:
        std::collections::BTreeMap<RunId, std::collections::BTreeSet<LoopInstanceId>>,
    pub run_pending_body_frame_loop_membership_flat: std::collections::BTreeSet<LoopInstanceId>,
    pub run_active_node_count: std::collections::BTreeMap<RunId, u64>,
    pub run_active_frame_count: std::collections::BTreeMap<RunId, u64>,
    pub run_last_granted_frame: std::collections::BTreeMap<RunId, Option<FrameId>>,
    pub run_last_granted_loop: std::collections::BTreeMap<RunId, Option<LoopInstanceId>>,
    pub run_max_active_nodes: std::collections::BTreeMap<RunId, u64>,
    pub run_max_active_frames: std::collections::BTreeMap<RunId, u64>,
    pub run_max_frame_depth: std::collections::BTreeMap<RunId, u64>,
    pub frame_scope: std::collections::BTreeMap<FrameId, FrameScope>,
    pub frame_phase: std::collections::BTreeMap<FrameId, FrameStatus>,
    pub frame_run: std::collections::BTreeMap<FrameId, RunId>,
    pub frame_parent_loop: std::collections::BTreeMap<FrameId, Option<LoopInstanceId>>,
    pub frame_iteration: std::collections::BTreeMap<FrameId, u32>,
    pub frame_tracked_nodes:
        std::collections::BTreeMap<FrameId, std::collections::BTreeSet<FlowNodeId>>,
    pub frame_ordered_nodes: std::collections::BTreeMap<FrameId, Vec<FlowNodeId>>,
    pub frame_node_kind:
        std::collections::BTreeMap<FrameId, std::collections::BTreeMap<FlowNodeId, FlowNodeKind>>,
    pub frame_node_dependencies: std::collections::BTreeMap<
        FrameId,
        std::collections::BTreeMap<FlowNodeId, Vec<FlowNodeId>>,
    >,
    pub frame_node_dependency_modes:
        std::collections::BTreeMap<FrameId, std::collections::BTreeMap<FlowNodeId, DependencyMode>>,
    pub frame_node_step_ids:
        std::collections::BTreeMap<FrameId, std::collections::BTreeMap<FlowNodeId, StepId>>,
    pub frame_node_loop_ids:
        std::collections::BTreeMap<FrameId, std::collections::BTreeMap<FlowNodeId, LoopId>>,
    pub frame_node_status:
        std::collections::BTreeMap<FrameId, std::collections::BTreeMap<FlowNodeId, NodeRunStatus>>,
    pub frame_ready_queue: std::collections::BTreeMap<FrameId, Vec<FlowNodeId>>,
    pub frame_output_recorded:
        std::collections::BTreeMap<FrameId, std::collections::BTreeMap<FlowNodeId, bool>>,
    pub frame_last_admitted_node: std::collections::BTreeMap<FrameId, Option<FlowNodeId>>,
    pub frame_node_condition_results:
        std::collections::BTreeMap<FrameId, std::collections::BTreeMap<FlowNodeId, Option<bool>>>,
    pub frame_node_branches: std::collections::BTreeMap<
        FrameId,
        std::collections::BTreeMap<FlowNodeId, Option<BranchId>>,
    >,
    pub loop_phase: std::collections::BTreeMap<LoopInstanceId, LoopStatus>,
    pub loop_parent_frame: std::collections::BTreeMap<LoopInstanceId, FrameId>,
    pub loop_parent_node: std::collections::BTreeMap<LoopInstanceId, FlowNodeId>,
    pub loop_definition: std::collections::BTreeMap<LoopInstanceId, LoopId>,
    pub loop_depth: std::collections::BTreeMap<LoopInstanceId, u32>,
    pub loop_stage: std::collections::BTreeMap<LoopInstanceId, LoopIterationStage>,
    pub loop_current_iteration: std::collections::BTreeMap<LoopInstanceId, u64>,
    pub loop_last_completed_iteration: std::collections::BTreeMap<LoopInstanceId, u64>,
    pub loop_max_iterations: std::collections::BTreeMap<LoopInstanceId, u64>,
    pub loop_active_body_frame: std::collections::BTreeMap<LoopInstanceId, Option<FrameId>>,
    pub pending_spawn_count: u64,
    pub pending_spawn_sessions: std::collections::BTreeMap<AgentIdentity, SessionId>,
    pub coordinator_bound: bool,
    pub member_startup_binding_requested: std::collections::BTreeSet<AgentRuntimeId>,
    pub member_startup_runtime_ready: std::collections::BTreeSet<AgentRuntimeId>,
    pub member_startup_ready: std::collections::BTreeSet<AgentRuntimeId>,
    pub member_kickoff_pending: std::collections::BTreeSet<AgentIdentity>,
    pub member_kickoff_starting: std::collections::BTreeSet<AgentIdentity>,
    pub member_kickoff_callback_pending: std::collections::BTreeSet<AgentIdentity>,
    pub member_kickoff_started: std::collections::BTreeSet<AgentIdentity>,
    pub member_kickoff_failed: std::collections::BTreeSet<AgentIdentity>,
    pub member_kickoff_cancelled: std::collections::BTreeSet<AgentIdentity>,
    pub member_kickoff_error: std::collections::BTreeMap<AgentIdentity, String>,
    pub member_restore_failures: std::collections::BTreeMap<AgentIdentity, String>,
    pub member_revival_pending: std::collections::BTreeSet<AgentIdentity>,
    pub spawn_exec_phase: std::collections::BTreeMap<AgentIdentity, SpawnExecPhase>,
    pub member_state_markers: std::collections::BTreeMap<AgentRuntimeId, MobMemberState>,
    pub wiring_edges: std::collections::BTreeSet<WiringEdge>,
    pub external_peer_edges: std::collections::BTreeSet<ExternalPeerEdge>,
    pub external_peer_edges_by_key: std::collections::BTreeMap<ExternalPeerKey, ExternalPeerEdge>,
    pub supervisor_authority_peer_id: Option<PeerId>,
    pub supervisor_authority_signing_key: Option<PeerSigningKey>,
    pub supervisor_authority_epoch: Option<u64>,
    pub supervisor_authority_protocol_version: Option<SupervisorProtocolVersion>,
    pub supervisor_pending_authority_peer_id: Option<PeerId>,
    pub supervisor_pending_authority_signing_key: Option<PeerSigningKey>,
    pub supervisor_pending_authority_epoch: Option<u64>,
    pub supervisor_pending_authority_protocol_version: Option<SupervisorProtocolVersion>,
    pub supervisor_pending_authority_accepted_peer_ids: std::collections::BTreeSet<PeerId>,
    pub pending_recipient_trust: std::collections::BTreeSet<PeerId>,
    pub owner_bridge_session_id: Option<SessionId>,
    pub owner_bridge_destroy_on_archive: bool,
    pub implicit_delegation_mob: bool,
    pub identity_to_runtime: std::collections::BTreeMap<AgentIdentity, AgentRuntimeId>,
    pub member_session_bindings: std::collections::BTreeMap<AgentIdentity, SessionId>,
    pub member_profile_names: std::collections::BTreeMap<AgentIdentity, String>,
    pub member_runtime_modes: std::collections::BTreeMap<AgentIdentity, SpawnPolicyRuntimeMode>,
    pub member_peer_ids: std::collections::BTreeMap<AgentIdentity, PeerId>,
    pub member_peer_endpoints: std::collections::BTreeMap<AgentIdentity, MemberPeerEndpoint>,
    pub pending_session_ingress_detach_runtime_ids: std::collections::BTreeSet<AgentRuntimeId>,
    pub spawn_policy_enabled: bool,
    pub spawn_policy_revision: u64,
    pub spawn_policy_resolution_revision: std::collections::BTreeMap<AgentIdentity, u64>,
    pub spawn_policy_resolution_profiles: std::collections::BTreeMap<AgentIdentity, String>,
    pub spawn_policy_resolution_runtime_modes:
        std::collections::BTreeMap<AgentIdentity, Option<SpawnPolicyRuntimeMode>>,
    pub spawn_policy_resolution_absent: std::collections::BTreeSet<AgentIdentity>,
    pub spawn_profile_authority_profile_names: std::collections::BTreeMap<AgentIdentity, String>,
    pub spawn_profile_authority_models: std::collections::BTreeMap<AgentIdentity, String>,
    pub spawn_profile_authority_material_digests: std::collections::BTreeMap<AgentIdentity, String>,
    pub spawn_profile_authority_tool_config_digests:
        std::collections::BTreeMap<AgentIdentity, String>,
    pub spawn_profile_authority_skills_digests: std::collections::BTreeMap<AgentIdentity, String>,
    pub spawn_profile_authority_provider_params_digests:
        std::collections::BTreeMap<AgentIdentity, Option<String>>,
    pub spawn_profile_authority_output_schema_digests:
        std::collections::BTreeMap<AgentIdentity, Option<String>>,
    pub spawn_profile_authority_external_addressable:
        std::collections::BTreeMap<AgentIdentity, bool>,
    pub topology_epoch: u64,
    pub work_intent_status:
        std::collections::BTreeMap<WorkIntentId, MobCoordinationWorkIntentStatus>,
    pub work_intent_revision: std::collections::BTreeMap<WorkIntentId, u64>,
    pub work_intent_resources: std::collections::BTreeMap<
        WorkIntentId,
        std::collections::BTreeSet<CoordinationResourceRef>,
    >,
    pub work_intent_owner_present: std::collections::BTreeMap<WorkIntentId, bool>,
    pub work_intent_expires_at_ms: std::collections::BTreeMap<WorkIntentId, Option<u64>>,
    pub resource_claim_status:
        std::collections::BTreeMap<ResourceClaimId, MobCoordinationResourceClaimStatus>,
    pub resource_claim_kind:
        std::collections::BTreeMap<ResourceClaimId, MobCoordinationResourceClaimKind>,
    pub resource_claim_revision: std::collections::BTreeMap<ResourceClaimId, u64>,
    pub resource_claim_resources: std::collections::BTreeMap<
        ResourceClaimId,
        std::collections::BTreeSet<CoordinationResourceRef>,
    >,
    pub resource_claim_owner_present: std::collections::BTreeMap<ResourceClaimId, bool>,
    pub resource_claim_expires_at_ms: std::collections::BTreeMap<ResourceClaimId, Option<u64>>,
    pub coordination_event_next_sequence: u64,
    pub topology_default_policy: PolicyDecision,
    pub external_member_rebind_capability:
        std::collections::BTreeMap<AgentIdentity, ExternalMemberRebindCapability>,
    pub orphan_budget: u64,
    pub desired_members: std::collections::BTreeSet<AgentIdentity>,
    pub members_to_spawn: std::collections::BTreeSet<AgentIdentity>,
    pub members_to_retire: std::collections::BTreeSet<AgentIdentity>,
    pub adaptive_active_run: Option<AdaptiveRunId>,
    pub adaptive_run_phase: std::collections::BTreeMap<AdaptiveRunId, AdaptiveRunPhase>,
    pub adaptive_stop_reason: std::collections::BTreeMap<AdaptiveRunId, AdaptiveStopReason>,
    pub adaptive_limit_max_depth: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_total_decisions: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_repair_attempts: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_layer_failures: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_attempts_per_layer: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_members_per_layer: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_total_spawned_members: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_active_members: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_retained_layer_mobs: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_aggregate_tokens: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_max_aggregate_tool_calls: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_limit_allowed_model_classes:
        std::collections::BTreeMap<AdaptiveRunId, std::collections::BTreeSet<String>>,
    pub adaptive_limit_allowed_tool_classes:
        std::collections::BTreeMap<AdaptiveRunId, std::collections::BTreeSet<String>>,
    pub adaptive_limit_allowed_skill_identities:
        std::collections::BTreeMap<AdaptiveRunId, std::collections::BTreeSet<String>>,
    pub adaptive_limit_allowed_auth_binding_refs:
        std::collections::BTreeMap<AdaptiveRunId, std::collections::BTreeSet<String>>,
    pub adaptive_deadline_ms: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_depth: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_total_decisions: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_repair_attempts: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_layer_failures: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_total_spawned_members: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_active_members: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_retained_layer_mobs: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_aggregate_token_reserved: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_aggregate_token_actual: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_aggregate_tool_call_reserved: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_aggregate_tool_call_actual: std::collections::BTreeMap<AdaptiveRunId, u64>,
    pub adaptive_active_layer: std::collections::BTreeMap<AdaptiveRunId, AdaptiveLayerId>,
    pub adaptive_layer_adaptive_run: std::collections::BTreeMap<AdaptiveLayerId, AdaptiveRunId>,
    pub adaptive_layer_phase: std::collections::BTreeMap<AdaptiveLayerId, AdaptiveLayerPhase>,
    pub adaptive_layer_attempt: std::collections::BTreeMap<AdaptiveLayerId, u64>,
    pub adaptive_layer_member_count: std::collections::BTreeMap<AdaptiveLayerId, u64>,
    pub adaptive_layer_plan_digest: std::collections::BTreeMap<AdaptiveLayerId, String>,
    pub adaptive_layer_child_mob_id: std::collections::BTreeMap<AdaptiveLayerId, MobId>,
    pub adaptive_layer_token_reservation: std::collections::BTreeMap<AdaptiveLayerId, u64>,
    pub adaptive_layer_tool_call_reservation: std::collections::BTreeMap<AdaptiveLayerId, u64>,
    pub adaptive_layer_run_id: std::collections::BTreeMap<AdaptiveLayerId, RunId>,
    pub adaptive_layer_result_digest: std::collections::BTreeMap<AdaptiveLayerId, String>,
    pub adaptive_layer_fault:
        std::collections::BTreeMap<AdaptiveLayerId, AdaptiveLayerSetupFaultKind>,
    pub adaptive_layer_disposition:
        std::collections::BTreeMap<AdaptiveLayerId, AdaptiveLayerDispositionKind>,
    pub adaptive_missing_body_digest: std::collections::BTreeMap<AdaptiveRunId, String>,
}
impl Default for State {
    fn default() -> Self {
        initial_state()
    }
}

pub mod inputs {
    #[allow(unused_imports)]
    use super::*;
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RunFlow {
        pub run_id: RunId,
        pub step_ids: std::collections::BTreeSet<StepId>,
        pub ordered_steps: Vec<StepId>,
        pub step_status: std::collections::BTreeMap<StepId, Option<StepRunStatus>>,
        pub output_recorded: std::collections::BTreeMap<StepId, bool>,
        pub step_condition_results: std::collections::BTreeMap<StepId, Option<bool>>,
        pub step_has_conditions: std::collections::BTreeMap<StepId, bool>,
        pub step_dependencies: std::collections::BTreeMap<StepId, Vec<StepId>>,
        pub step_dependency_modes: std::collections::BTreeMap<StepId, DependencyMode>,
        pub step_branches: std::collections::BTreeMap<StepId, Option<BranchId>>,
        pub step_collection_policies: std::collections::BTreeMap<StepId, CollectionPolicyKind>,
        pub step_quorum_thresholds: std::collections::BTreeMap<StepId, u32>,
        pub step_target_counts: std::collections::BTreeMap<StepId, u64>,
        pub step_target_success_counts: std::collections::BTreeMap<StepId, u64>,
        pub step_target_terminal_failure_counts: std::collections::BTreeMap<StepId, u64>,
        pub escalation_threshold: u64,
        pub max_step_retries: u32,
        pub max_active_nodes: u64,
        pub max_active_frames: u64,
        pub max_frame_depth: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CreateRunSeed {
        pub run_id: RunId,
        pub step_ids: std::collections::BTreeSet<StepId>,
        pub ordered_steps: Vec<StepId>,
        pub step_status: std::collections::BTreeMap<StepId, Option<StepRunStatus>>,
        pub output_recorded: std::collections::BTreeMap<StepId, bool>,
        pub step_condition_results: std::collections::BTreeMap<StepId, Option<bool>>,
        pub step_has_conditions: std::collections::BTreeMap<StepId, bool>,
        pub step_dependencies: std::collections::BTreeMap<StepId, Vec<StepId>>,
        pub step_dependency_modes: std::collections::BTreeMap<StepId, DependencyMode>,
        pub step_branches: std::collections::BTreeMap<StepId, Option<BranchId>>,
        pub step_collection_policies: std::collections::BTreeMap<StepId, CollectionPolicyKind>,
        pub step_quorum_thresholds: std::collections::BTreeMap<StepId, u32>,
        pub step_target_counts: std::collections::BTreeMap<StepId, u64>,
        pub step_target_success_counts: std::collections::BTreeMap<StepId, u64>,
        pub step_target_terminal_failure_counts: std::collections::BTreeMap<StepId, u64>,
        pub escalation_threshold: u64,
        pub max_step_retries: u32,
        pub max_active_nodes: u64,
        pub max_active_frames: u64,
        pub max_frame_depth: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CreateFrameSeed {
        pub run_id: RunId,
        pub frame_id: FrameId,
        pub frame_scope: FrameScope,
        pub loop_instance_id: Option<LoopInstanceId>,
        pub iteration: u32,
        pub tracked_nodes: std::collections::BTreeSet<FlowNodeId>,
        pub ordered_nodes: Vec<FlowNodeId>,
        pub node_kind: std::collections::BTreeMap<FlowNodeId, FlowNodeKind>,
        pub node_dependencies: std::collections::BTreeMap<FlowNodeId, Vec<FlowNodeId>>,
        pub node_dependency_modes: std::collections::BTreeMap<FlowNodeId, DependencyMode>,
        pub node_branches: std::collections::BTreeMap<FlowNodeId, Option<BranchId>>,
        pub node_step_ids: std::collections::BTreeMap<FlowNodeId, StepId>,
        pub node_loop_ids: std::collections::BTreeMap<FlowNodeId, LoopId>,
        pub node_status: std::collections::BTreeMap<FlowNodeId, NodeRunStatus>,
        pub ready_queue: Vec<FlowNodeId>,
        pub output_recorded: std::collections::BTreeMap<FlowNodeId, bool>,
        pub node_condition_results: std::collections::BTreeMap<FlowNodeId, Option<bool>>,
        pub last_admitted_node: Option<FlowNodeId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CreateLoopSeed {
        pub loop_instance_id: LoopInstanceId,
        pub parent_frame_id: FrameId,
        pub parent_node_id: FlowNodeId,
        pub loop_id: LoopId,
        pub depth: u32,
        pub max_iterations: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLoopBodyFrameCompleted {
        pub loop_instance_id: LoopInstanceId,
        pub iteration: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLoopUntilConditionMet {
        pub loop_instance_id: LoopInstanceId,
        pub iteration: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLoopUntilConditionFailed {
        pub loop_instance_id: LoopInstanceId,
        pub iteration: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeFlowRunReducerCommand {
        pub run_id: RunId,
        pub command: FlowRunReducerCommandKind,
        pub step_id: Option<StepId>,
        pub step_status: Option<StepRunStatus>,
        pub target_count: Option<u64>,
        pub frame_id: Option<FrameId>,
        pub node_id: Option<FlowNodeId>,
        pub loop_instance_id: Option<LoopInstanceId>,
        pub retry_key: Option<String>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeFlowFrameReducerCommand {
        pub frame_id: FrameId,
        pub command: FlowFrameReducerCommandKind,
        pub node_id: Option<FlowNodeId>,
        pub node_status: Option<NodeRunStatus>,
        pub terminal_status: Option<FrameStatus>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeLoopIterationReducerCommand {
        pub loop_instance_id: LoopInstanceId,
        pub command: LoopIterationReducerCommandKind,
        pub body_frame_id: Option<FrameId>,
        pub body_frame_iteration: Option<u64>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CancelFlow {
        pub run_id: RunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowStatus {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyFlowRunTerminality {
        pub run_id: RunId,
        pub status: FlowRunStatus,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyFlowStepTerminality {
        pub run_id: RunId,
        pub step_id: StepId,
        pub status: StepRunStatus,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyFlowFrameTerminalStatus {
        pub frame_id: FrameId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyFlowRunPublicResult {
        pub run_id: RunId,
        pub status: FlowRunStatus,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct BeginSpawnExec {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Generation,
        pub profile_material_digest: String,
        pub external_addressable: bool,
        pub runtime_mode: SpawnPolicyRuntimeMode,
        pub bridge_session_id: Option<SessionId>,
        pub replacing: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CommitSpawnMembership {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Generation,
        pub profile_material_digest: String,
        pub external_addressable: bool,
        pub runtime_mode: SpawnPolicyRuntimeMode,
        pub bridge_session_id: Option<SessionId>,
        pub replacing: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CommitSpawnActivation {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AbortSpawnExec {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeSpawnProfile {
        pub agent_identity: AgentIdentity,
        pub profile_name: String,
        pub model: String,
        pub profile_material_digest: String,
        pub tool_config_digest: String,
        pub skills_digest: String,
        pub provider_params_digest: Option<String>,
        pub output_schema_digest: Option<String>,
        pub external_addressable: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifySpawnManyFailure {
        pub observation: MobSpawnManyFailureObservationKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyMemberWait {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveFlowDelegationEdgeAdmission {
        pub from_role: String,
        pub to_role: String,
        pub rule_verdict: MobFlowDelegationEdgeRuleVerdictKind,
        pub mode: MobFlowDelegationEdgeModeKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyRemoteMemberRuntimeObservation {
        pub observed_state: MobRemoteMemberRuntimeObservedState,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveSpawnMemberAdmission {
        pub manage_scope_present: bool,
        pub profile_scope_contains: bool,
        pub privileged_resume_bridge_session_present: bool,
        pub privileged_resume_session_present: bool,
        pub privileged_backend_present: bool,
        pub privileged_runtime_mode_present: bool,
        pub privileged_launch_mode_present: bool,
        pub privileged_tool_access_policy_present: bool,
        pub privileged_budget_split_policy_present: bool,
        pub privileged_tooling_present: bool,
        pub privileged_auth_binding_present: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveCurrentMobAdmission {
        pub can_manage_mob: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveSpawnToolAdmission {
        pub can_manage_mob: bool,
        pub spawn_profile_scope_present: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveCreateMobAdmission {
        pub can_create_mobs: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveProfileMutationAdmission {
        pub can_mutate_profiles: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyMemberOperationEligibility {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyBridgeRejectionRecovery {
        pub rejection_cause: MobBridgeRejectionCause,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyPendingSupervisorAcceptance {
        pub rejection_cause: MobBridgeRejectionCause,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EnsureMember {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Reconcile {
        pub desired: std::collections::BTreeSet<AgentIdentity>,
        pub retire_stale: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Retire {
        pub mob_id: MobId,
        pub agent_runtime_id: AgentRuntimeId,
        pub agent_identity: AgentIdentity,
        pub generation: Generation,
        pub releasing: Option<SessionId>,
        pub session_id: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RetireAbsent {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestPendingSessionIngressDetachForMobDestroy {
        pub mob_id: MobId,
        pub agent_runtime_id: AgentRuntimeId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Respawn {
        pub agent_runtime_id: AgentRuntimeId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RetireAll {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct BindOwnerBridgeSession {
        pub bridge_session_id: SessionId,
        pub destroy_on_owner_archive: bool,
        pub implicit_delegation_mob: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct WireMembers {
        pub edge: WiringEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct WireMembersWithTrust {
        pub edge: WiringEdge,
        pub a_identity: AgentIdentity,
        pub b_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct UnwireMembers {
        pub edge: WiringEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct WireExternalPeer {
        pub key: ExternalPeerKey,
        pub edge: ExternalPeerEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RegisterMemberPeer {
        pub agent_identity: AgentIdentity,
        pub peer_endpoint: MemberPeerEndpoint,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMemberPeerRebind {
        pub agent_identity: AgentIdentity,
        pub expected_peer_endpoint: MemberPeerEndpoint,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMemberPeerOverlay {
        pub agent_identity: AgentIdentity,
        pub expected_peer_endpoint: MemberPeerEndpoint,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMemberTrustWiring {
        pub edge: WiringEdge,
        pub a_identity: AgentIdentity,
        pub b_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMemberTrustUnwiring {
        pub edge: WiringEdge,
        pub a_identity: AgentIdentity,
        pub b_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMemberTrustCleanup {
        pub edge: WiringEdge,
        pub a_identity: AgentIdentity,
        pub b_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMemberTrustCleanupObserved {
        pub edge: WiringEdge,
        pub a_identity: AgentIdentity,
        pub a_peer_id: PeerId,
        pub b_identity: AgentIdentity,
        pub b_peer_id: PeerId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeExternalPeerReciprocalTrust {
        pub key: ExternalPeerKey,
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct UnwireExternalPeer {
        pub key: ExternalPeerKey,
        pub edge: ExternalPeerEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ProvisionSupervisorAuthority {
        pub peer_id: PeerId,
        pub signing_key: PeerSigningKey,
        pub epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClearSupervisorPendingRotation {
        pub current_peer_id: PeerId,
        pub current_epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordSupervisorPendingRotation {
        pub current_peer_id: PeerId,
        pub current_epoch: u64,
        pub pending_peer_id: PeerId,
        pub pending_signing_key: PeerSigningKey,
        pub pending_epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
        pub accepted_peer_ids: std::collections::BTreeSet<PeerId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CommitSupervisorRotation {
        pub current_peer_id: PeerId,
        pub current_epoch: u64,
        pub next_peer_id: PeerId,
        pub next_signing_key: PeerSigningKey,
        pub next_epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClearSupervisorAuthorityForDestroy {
        pub current_peer_id: PeerId,
        pub current_signing_key: PeerSigningKey,
        pub current_epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RestoreSupervisorAuthorityAfterDestroyRollback {
        pub peer_id: PeerId,
        pub signing_key: PeerSigningKey,
        pub epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
        pub pending_peer_id: Option<PeerId>,
        pub pending_signing_key: Option<PeerSigningKey>,
        pub pending_epoch: Option<u64>,
        pub pending_protocol_version: Option<SupervisorProtocolVersion>,
        pub pending_accepted_peer_ids: std::collections::BTreeSet<PeerId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordPendingRecipientTrust {
        pub peer_id: PeerId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolvePendingRecipientTrust {
        pub peer_id: PeerId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RollbackPendingRecipientTrust {
        pub peer_id: PeerId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SessionIngressDetachedForMobDestroy {
        pub mob_id: MobId,
        pub agent_runtime_id: AgentRuntimeId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SessionIngressDetachFailedForMobDestroy {
        pub mob_id: MobId,
        pub agent_runtime_id: AgentRuntimeId,
        pub reason: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SubmitWork {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub work_id: WorkId,
        pub origin: WorkOrigin,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveSubmitWorkRejection {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub origin: WorkOrigin,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CancelWork {
        pub work_id: WorkId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CancelAllWork {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveCancelAllWorkRejection {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Stop {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Resume {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Complete {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Reset {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Destroy {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RosterSnapshot {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ListMembers {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ListMembersIncludingRetiring {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ListAllMembers {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberStatus {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SubscribeAgentEvents {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SubscribeAllAgentEvents {
        pub session_bound_runtimes: std::collections::BTreeSet<AgentRuntimeId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SubscribeMobEvents {
        pub initial_cursor: u64,
        pub channel_capacity: u64,
        pub poll_interval_ms: u64,
        pub session_bound_runtimes: std::collections::BTreeSet<AgentRuntimeId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SubscribeStructuralEvents {
        pub after_cursor: u64,
        pub latest_cursor: u64,
        pub explicit_after_cursor: bool,
        pub batch_limit: u64,
        pub channel_capacity: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMobEventRouterMemberSubscription {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMobEventRouterMemberRemoval {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct PollEvents {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct PollEventsStrict {
        pub after_cursor: u64,
        pub latest_cursor: u64,
        pub limit: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ReplayAllEvents {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordOperatorActionProvenance {
        pub tool_name: String,
        pub principal_token: OpaquePrincipalToken,
        pub caller_provenance: Option<MobToolCallerProvenance>,
        pub audit_invocation_id: Option<String>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct GetMember {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SetSpawnPolicy {
        pub enabled: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveSpawnPolicy {
        pub agent_identity: AgentIdentity,
        pub revision: u64,
        pub profile_name: Option<String>,
        pub runtime_mode: Option<SpawnPolicyRuntimeMode>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct Shutdown {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ForceCancel {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct KickoffMarkPending {
        pub member_id: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct KickoffMarkStarting {
        pub member_id: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct StartupMarkReady {
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct KickoffResolveStarted {
        pub member_id: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct KickoffResolveCallbackPending {
        pub member_id: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct KickoffResolveFailed {
        pub member_id: AgentIdentity,
        pub error: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct KickoffCancelRequested {
        pub member_id: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct KickoffClear {
        pub member_id: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct KickoffQuiesced {
        pub member_id: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CancelPendingSpawn {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ProbeMemberAdmission {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ComputeRespawnGeneration {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyStepOutputFault {
        pub run_id: RunId,
        pub step_id: StepId,
        pub target_retry_key: String,
        pub fault: StepOutputFaultKind,
        pub attempt: u32,
        pub max_retries: u32,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EscalateToSupervisor {
        pub run_id: RunId,
        pub step_id: StepId,
        pub supervisor_identity: AgentIdentity,
        pub turn_timeout_ms: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EscalateToSupervisorNoEligibleTarget {
        pub run_id: RunId,
        pub step_id: StepId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EvaluateTopologyEdge {
        pub from_role: String,
        pub to_role: String,
        pub rule_match: Option<PolicyDecision>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SetExternalMemberRebindCapability {
        pub agent_identity: AgentIdentity,
        pub capability: ExternalMemberRebindCapability,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyTurnTimeoutDisposition {
        pub timed_out_run_id: RunId,
        pub retryable: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SeedOrphanBudget {
        pub budget: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordCoordinationWorkIntent {
        pub intent_id: WorkIntentId,
        pub requested_status: MobCoordinationWorkIntentStatus,
        pub owner_present: bool,
        pub summary_present: bool,
        pub metadata_public: bool,
        pub draft_mob_id: MobId,
        pub authority_mob_id: MobId,
        pub resource_tokens: std::collections::BTreeSet<CoordinationResourceRef>,
        pub expires_at_ms: Option<u64>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordCoordinationResourceClaim {
        pub claim_id: ResourceClaimId,
        pub requested_kind: MobCoordinationResourceClaimKind,
        pub requested_status: MobCoordinationResourceClaimStatus,
        pub owner_present: bool,
        pub metadata_public: bool,
        pub draft_mob_id: MobId,
        pub authority_mob_id: MobId,
        pub resource_tokens: std::collections::BTreeSet<CoordinationResourceRef>,
        pub expires_at_ms: Option<u64>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct UpdateCoordinationWorkIntentStatus {
        pub intent_id: WorkIntentId,
        pub expected_revision: u64,
        pub requested_status: MobCoordinationWorkIntentStatus,
        pub now_ms: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct UpdateCoordinationResourceClaimStatus {
        pub claim_id: ResourceClaimId,
        pub expected_revision: u64,
        pub requested_status: MobCoordinationResourceClaimStatus,
        pub now_ms: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ObserveCoordinationResourceClaimOverlap {
        pub claim_id: ResourceClaimId,
        pub now_ms: u64,
        pub candidate_overlap_ids: Vec<ResourceClaimId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct InitializeAdaptiveRun {
        pub adaptive_run_id: AdaptiveRunId,
        pub max_depth: u64,
        pub max_total_decisions: u64,
        pub max_repair_attempts: u64,
        pub max_layer_failures: u64,
        pub max_attempts_per_layer: u64,
        pub max_members_per_layer: u64,
        pub max_total_spawned_members: u64,
        pub max_active_members: u64,
        pub max_retained_layer_mobs: u64,
        pub max_aggregate_tokens: u64,
        pub max_aggregate_tool_calls: u64,
        pub allowed_model_classes: std::collections::BTreeSet<String>,
        pub allowed_tool_classes: std::collections::BTreeSet<String>,
        pub allowed_skill_identities: std::collections::BTreeSet<String>,
        pub allowed_auth_binding_refs: std::collections::BTreeSet<String>,
        pub deadline_ms: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordPlanningDecision {
        pub adaptive_run_id: AdaptiveRunId,
        pub decision_kind: AdaptiveDecisionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordPlanRejected {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveLayerAdmission {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
        pub plan_digest: String,
        pub child_mob_id: MobId,
        pub member_count: u64,
        pub token_reservation: u64,
        pub tool_call_reservation: u64,
        pub used_model_classes: std::collections::BTreeSet<String>,
        pub used_tool_classes: std::collections::BTreeSet<String>,
        pub used_skill_identities: std::collections::BTreeSet<String>,
        pub used_auth_binding_refs: std::collections::BTreeSet<String>,
        pub observed_at_ms: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLayerProvisioned {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLayerRunStarted {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
        pub child_run_id: RunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct IngestLayerTerminal {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
        pub result_class: FlowRunPublicResultClassKind,
        pub actual_tokens: u64,
        pub actual_tool_calls: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLayerSetupFault {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
        pub fault: AdaptiveLayerSetupFaultKind,
        pub spawned_members: u64,
        pub requested_members: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLayerResultValidated {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
        pub result_digest: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLayerResultInvalid {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLayerMobDestroyed {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordLayerMobRetained {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
        pub disposition: AdaptiveLayerDispositionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordCleanupResolved {
        pub adaptive_run_id: AdaptiveRunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordBodyEvidenceMissing {
        pub adaptive_run_id: AdaptiveRunId,
        pub missing_digest: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveAdaptiveFinish {
        pub adaptive_run_id: AdaptiveRunId,
        pub final_result_digest: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestAdaptiveCancel {
        pub adaptive_run_id: AdaptiveRunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecordDeadlineObserved {
        pub adaptive_run_id: AdaptiveRunId,
        pub observed_at_ms: u64,
    }
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum Input {
    RunFlow(inputs::RunFlow),
    CreateRunSeed(inputs::CreateRunSeed),
    CreateFrameSeed(inputs::CreateFrameSeed),
    CreateLoopSeed(inputs::CreateLoopSeed),
    RecordLoopBodyFrameCompleted(inputs::RecordLoopBodyFrameCompleted),
    RecordLoopUntilConditionMet(inputs::RecordLoopUntilConditionMet),
    RecordLoopUntilConditionFailed(inputs::RecordLoopUntilConditionFailed),
    AuthorizeFlowRunReducerCommand(inputs::AuthorizeFlowRunReducerCommand),
    AuthorizeFlowFrameReducerCommand(inputs::AuthorizeFlowFrameReducerCommand),
    AuthorizeLoopIterationReducerCommand(inputs::AuthorizeLoopIterationReducerCommand),
    CancelFlow(inputs::CancelFlow),
    FlowStatus(inputs::FlowStatus),
    ClassifyFlowRunTerminality(inputs::ClassifyFlowRunTerminality),
    ClassifyFlowStepTerminality(inputs::ClassifyFlowStepTerminality),
    ClassifyFlowFrameTerminalStatus(inputs::ClassifyFlowFrameTerminalStatus),
    ClassifyFlowRunPublicResult(inputs::ClassifyFlowRunPublicResult),
    BeginSpawnExec(inputs::BeginSpawnExec),
    CommitSpawnMembership(inputs::CommitSpawnMembership),
    CommitSpawnActivation(inputs::CommitSpawnActivation),
    AbortSpawnExec(inputs::AbortSpawnExec),
    AuthorizeSpawnProfile(inputs::AuthorizeSpawnProfile),
    ClassifySpawnManyFailure(inputs::ClassifySpawnManyFailure),
    ClassifyMemberWait(inputs::ClassifyMemberWait),
    ResolveFlowDelegationEdgeAdmission(inputs::ResolveFlowDelegationEdgeAdmission),
    ClassifyRemoteMemberRuntimeObservation(inputs::ClassifyRemoteMemberRuntimeObservation),
    ResolveSpawnMemberAdmission(inputs::ResolveSpawnMemberAdmission),
    ResolveCurrentMobAdmission(inputs::ResolveCurrentMobAdmission),
    ResolveSpawnToolAdmission(inputs::ResolveSpawnToolAdmission),
    ResolveCreateMobAdmission(inputs::ResolveCreateMobAdmission),
    ResolveProfileMutationAdmission(inputs::ResolveProfileMutationAdmission),
    ClassifyMemberOperationEligibility(inputs::ClassifyMemberOperationEligibility),
    ClassifyBridgeRejectionRecovery(inputs::ClassifyBridgeRejectionRecovery),
    ClassifyPendingSupervisorAcceptance(inputs::ClassifyPendingSupervisorAcceptance),
    EnsureMember(inputs::EnsureMember),
    Reconcile(inputs::Reconcile),
    Retire(inputs::Retire),
    RetireAbsent(inputs::RetireAbsent),
    RequestPendingSessionIngressDetachForMobDestroy(
        inputs::RequestPendingSessionIngressDetachForMobDestroy,
    ),
    Respawn(inputs::Respawn),
    RetireAll(inputs::RetireAll),
    BindOwnerBridgeSession(inputs::BindOwnerBridgeSession),
    WireMembers(inputs::WireMembers),
    WireMembersWithTrust(inputs::WireMembersWithTrust),
    UnwireMembers(inputs::UnwireMembers),
    WireExternalPeer(inputs::WireExternalPeer),
    RegisterMemberPeer(inputs::RegisterMemberPeer),
    AuthorizeMemberPeerRebind(inputs::AuthorizeMemberPeerRebind),
    AuthorizeMemberPeerOverlay(inputs::AuthorizeMemberPeerOverlay),
    AuthorizeMemberTrustWiring(inputs::AuthorizeMemberTrustWiring),
    AuthorizeMemberTrustUnwiring(inputs::AuthorizeMemberTrustUnwiring),
    AuthorizeMemberTrustCleanup(inputs::AuthorizeMemberTrustCleanup),
    AuthorizeMemberTrustCleanupObserved(inputs::AuthorizeMemberTrustCleanupObserved),
    AuthorizeExternalPeerReciprocalTrust(inputs::AuthorizeExternalPeerReciprocalTrust),
    UnwireExternalPeer(inputs::UnwireExternalPeer),
    ProvisionSupervisorAuthority(inputs::ProvisionSupervisorAuthority),
    ClearSupervisorPendingRotation(inputs::ClearSupervisorPendingRotation),
    RecordSupervisorPendingRotation(inputs::RecordSupervisorPendingRotation),
    CommitSupervisorRotation(inputs::CommitSupervisorRotation),
    ClearSupervisorAuthorityForDestroy(inputs::ClearSupervisorAuthorityForDestroy),
    RestoreSupervisorAuthorityAfterDestroyRollback(
        inputs::RestoreSupervisorAuthorityAfterDestroyRollback,
    ),
    RecordPendingRecipientTrust(inputs::RecordPendingRecipientTrust),
    ResolvePendingRecipientTrust(inputs::ResolvePendingRecipientTrust),
    RollbackPendingRecipientTrust(inputs::RollbackPendingRecipientTrust),
    SessionIngressDetachedForMobDestroy(inputs::SessionIngressDetachedForMobDestroy),
    SessionIngressDetachFailedForMobDestroy(inputs::SessionIngressDetachFailedForMobDestroy),
    SubmitWork(inputs::SubmitWork),
    ResolveSubmitWorkRejection(inputs::ResolveSubmitWorkRejection),
    CancelWork(inputs::CancelWork),
    CancelAllWork(inputs::CancelAllWork),
    ResolveCancelAllWorkRejection(inputs::ResolveCancelAllWorkRejection),
    Stop(inputs::Stop),
    Resume(inputs::Resume),
    Complete(inputs::Complete),
    Reset(inputs::Reset),
    Destroy(inputs::Destroy),
    RosterSnapshot(inputs::RosterSnapshot),
    ListMembers(inputs::ListMembers),
    ListMembersIncludingRetiring(inputs::ListMembersIncludingRetiring),
    ListAllMembers(inputs::ListAllMembers),
    MemberStatus(inputs::MemberStatus),
    SubscribeAgentEvents(inputs::SubscribeAgentEvents),
    SubscribeAllAgentEvents(inputs::SubscribeAllAgentEvents),
    SubscribeMobEvents(inputs::SubscribeMobEvents),
    SubscribeStructuralEvents(inputs::SubscribeStructuralEvents),
    AuthorizeMobEventRouterMemberSubscription(inputs::AuthorizeMobEventRouterMemberSubscription),
    AuthorizeMobEventRouterMemberRemoval(inputs::AuthorizeMobEventRouterMemberRemoval),
    PollEvents(inputs::PollEvents),
    PollEventsStrict(inputs::PollEventsStrict),
    ReplayAllEvents(inputs::ReplayAllEvents),
    RecordOperatorActionProvenance(inputs::RecordOperatorActionProvenance),
    GetMember(inputs::GetMember),
    SetSpawnPolicy(inputs::SetSpawnPolicy),
    ResolveSpawnPolicy(inputs::ResolveSpawnPolicy),
    Shutdown(inputs::Shutdown),
    ForceCancel(inputs::ForceCancel),
    KickoffMarkPending(inputs::KickoffMarkPending),
    KickoffMarkStarting(inputs::KickoffMarkStarting),
    StartupMarkReady(inputs::StartupMarkReady),
    KickoffResolveStarted(inputs::KickoffResolveStarted),
    KickoffResolveCallbackPending(inputs::KickoffResolveCallbackPending),
    KickoffResolveFailed(inputs::KickoffResolveFailed),
    KickoffCancelRequested(inputs::KickoffCancelRequested),
    KickoffClear(inputs::KickoffClear),
    KickoffQuiesced(inputs::KickoffQuiesced),
    CancelPendingSpawn(inputs::CancelPendingSpawn),
    ProbeMemberAdmission(inputs::ProbeMemberAdmission),
    ComputeRespawnGeneration(inputs::ComputeRespawnGeneration),
    ClassifyStepOutputFault(inputs::ClassifyStepOutputFault),
    EscalateToSupervisor(inputs::EscalateToSupervisor),
    EscalateToSupervisorNoEligibleTarget(inputs::EscalateToSupervisorNoEligibleTarget),
    EvaluateTopologyEdge(inputs::EvaluateTopologyEdge),
    SetExternalMemberRebindCapability(inputs::SetExternalMemberRebindCapability),
    ClassifyTurnTimeoutDisposition(inputs::ClassifyTurnTimeoutDisposition),
    SeedOrphanBudget(inputs::SeedOrphanBudget),
    RecordCoordinationWorkIntent(inputs::RecordCoordinationWorkIntent),
    RecordCoordinationResourceClaim(inputs::RecordCoordinationResourceClaim),
    UpdateCoordinationWorkIntentStatus(inputs::UpdateCoordinationWorkIntentStatus),
    UpdateCoordinationResourceClaimStatus(inputs::UpdateCoordinationResourceClaimStatus),
    ObserveCoordinationResourceClaimOverlap(inputs::ObserveCoordinationResourceClaimOverlap),
    InitializeAdaptiveRun(inputs::InitializeAdaptiveRun),
    RecordPlanningDecision(inputs::RecordPlanningDecision),
    RecordPlanRejected(inputs::RecordPlanRejected),
    ResolveLayerAdmission(inputs::ResolveLayerAdmission),
    RecordLayerProvisioned(inputs::RecordLayerProvisioned),
    RecordLayerRunStarted(inputs::RecordLayerRunStarted),
    IngestLayerTerminal(inputs::IngestLayerTerminal),
    RecordLayerSetupFault(inputs::RecordLayerSetupFault),
    RecordLayerResultValidated(inputs::RecordLayerResultValidated),
    RecordLayerResultInvalid(inputs::RecordLayerResultInvalid),
    RecordLayerMobDestroyed(inputs::RecordLayerMobDestroyed),
    RecordLayerMobRetained(inputs::RecordLayerMobRetained),
    RecordCleanupResolved(inputs::RecordCleanupResolved),
    RecordBodyEvidenceMissing(inputs::RecordBodyEvidenceMissing),
    ResolveAdaptiveFinish(inputs::ResolveAdaptiveFinish),
    RequestAdaptiveCancel(inputs::RequestAdaptiveCancel),
    RecordDeadlineObserved(inputs::RecordDeadlineObserved),
}
impl Input {
    pub fn kind(&self) -> InputKind {
        match self {
            Self::RunFlow(_) => InputKind::RunFlow,
            Self::CreateRunSeed(_) => InputKind::CreateRunSeed,
            Self::CreateFrameSeed(_) => InputKind::CreateFrameSeed,
            Self::CreateLoopSeed(_) => InputKind::CreateLoopSeed,
            Self::RecordLoopBodyFrameCompleted(_) => InputKind::RecordLoopBodyFrameCompleted,
            Self::RecordLoopUntilConditionMet(_) => InputKind::RecordLoopUntilConditionMet,
            Self::RecordLoopUntilConditionFailed(_) => InputKind::RecordLoopUntilConditionFailed,
            Self::AuthorizeFlowRunReducerCommand(_) => InputKind::AuthorizeFlowRunReducerCommand,
            Self::AuthorizeFlowFrameReducerCommand(_) => {
                InputKind::AuthorizeFlowFrameReducerCommand
            }
            Self::AuthorizeLoopIterationReducerCommand(_) => {
                InputKind::AuthorizeLoopIterationReducerCommand
            }
            Self::CancelFlow(_) => InputKind::CancelFlow,
            Self::FlowStatus(_) => InputKind::FlowStatus,
            Self::ClassifyFlowRunTerminality(_) => InputKind::ClassifyFlowRunTerminality,
            Self::ClassifyFlowStepTerminality(_) => InputKind::ClassifyFlowStepTerminality,
            Self::ClassifyFlowFrameTerminalStatus(_) => InputKind::ClassifyFlowFrameTerminalStatus,
            Self::ClassifyFlowRunPublicResult(_) => InputKind::ClassifyFlowRunPublicResult,
            Self::BeginSpawnExec(_) => InputKind::BeginSpawnExec,
            Self::CommitSpawnMembership(_) => InputKind::CommitSpawnMembership,
            Self::CommitSpawnActivation(_) => InputKind::CommitSpawnActivation,
            Self::AbortSpawnExec(_) => InputKind::AbortSpawnExec,
            Self::AuthorizeSpawnProfile(_) => InputKind::AuthorizeSpawnProfile,
            Self::ClassifySpawnManyFailure(_) => InputKind::ClassifySpawnManyFailure,
            Self::ClassifyMemberWait(_) => InputKind::ClassifyMemberWait,
            Self::ResolveFlowDelegationEdgeAdmission(_) => {
                InputKind::ResolveFlowDelegationEdgeAdmission
            }
            Self::ClassifyRemoteMemberRuntimeObservation(_) => {
                InputKind::ClassifyRemoteMemberRuntimeObservation
            }
            Self::ResolveSpawnMemberAdmission(_) => InputKind::ResolveSpawnMemberAdmission,
            Self::ResolveCurrentMobAdmission(_) => InputKind::ResolveCurrentMobAdmission,
            Self::ResolveSpawnToolAdmission(_) => InputKind::ResolveSpawnToolAdmission,
            Self::ResolveCreateMobAdmission(_) => InputKind::ResolveCreateMobAdmission,
            Self::ResolveProfileMutationAdmission(_) => InputKind::ResolveProfileMutationAdmission,
            Self::ClassifyMemberOperationEligibility(_) => {
                InputKind::ClassifyMemberOperationEligibility
            }
            Self::ClassifyBridgeRejectionRecovery(_) => InputKind::ClassifyBridgeRejectionRecovery,
            Self::ClassifyPendingSupervisorAcceptance(_) => {
                InputKind::ClassifyPendingSupervisorAcceptance
            }
            Self::EnsureMember(_) => InputKind::EnsureMember,
            Self::Reconcile(_) => InputKind::Reconcile,
            Self::Retire(_) => InputKind::Retire,
            Self::RetireAbsent(_) => InputKind::RetireAbsent,
            Self::RequestPendingSessionIngressDetachForMobDestroy(_) => {
                InputKind::RequestPendingSessionIngressDetachForMobDestroy
            }
            Self::Respawn(_) => InputKind::Respawn,
            Self::RetireAll(_) => InputKind::RetireAll,
            Self::BindOwnerBridgeSession(_) => InputKind::BindOwnerBridgeSession,
            Self::WireMembers(_) => InputKind::WireMembers,
            Self::WireMembersWithTrust(_) => InputKind::WireMembersWithTrust,
            Self::UnwireMembers(_) => InputKind::UnwireMembers,
            Self::WireExternalPeer(_) => InputKind::WireExternalPeer,
            Self::RegisterMemberPeer(_) => InputKind::RegisterMemberPeer,
            Self::AuthorizeMemberPeerRebind(_) => InputKind::AuthorizeMemberPeerRebind,
            Self::AuthorizeMemberPeerOverlay(_) => InputKind::AuthorizeMemberPeerOverlay,
            Self::AuthorizeMemberTrustWiring(_) => InputKind::AuthorizeMemberTrustWiring,
            Self::AuthorizeMemberTrustUnwiring(_) => InputKind::AuthorizeMemberTrustUnwiring,
            Self::AuthorizeMemberTrustCleanup(_) => InputKind::AuthorizeMemberTrustCleanup,
            Self::AuthorizeMemberTrustCleanupObserved(_) => {
                InputKind::AuthorizeMemberTrustCleanupObserved
            }
            Self::AuthorizeExternalPeerReciprocalTrust(_) => {
                InputKind::AuthorizeExternalPeerReciprocalTrust
            }
            Self::UnwireExternalPeer(_) => InputKind::UnwireExternalPeer,
            Self::ProvisionSupervisorAuthority(_) => InputKind::ProvisionSupervisorAuthority,
            Self::ClearSupervisorPendingRotation(_) => InputKind::ClearSupervisorPendingRotation,
            Self::RecordSupervisorPendingRotation(_) => InputKind::RecordSupervisorPendingRotation,
            Self::CommitSupervisorRotation(_) => InputKind::CommitSupervisorRotation,
            Self::ClearSupervisorAuthorityForDestroy(_) => {
                InputKind::ClearSupervisorAuthorityForDestroy
            }
            Self::RestoreSupervisorAuthorityAfterDestroyRollback(_) => {
                InputKind::RestoreSupervisorAuthorityAfterDestroyRollback
            }
            Self::RecordPendingRecipientTrust(_) => InputKind::RecordPendingRecipientTrust,
            Self::ResolvePendingRecipientTrust(_) => InputKind::ResolvePendingRecipientTrust,
            Self::RollbackPendingRecipientTrust(_) => InputKind::RollbackPendingRecipientTrust,
            Self::SessionIngressDetachedForMobDestroy(_) => {
                InputKind::SessionIngressDetachedForMobDestroy
            }
            Self::SessionIngressDetachFailedForMobDestroy(_) => {
                InputKind::SessionIngressDetachFailedForMobDestroy
            }
            Self::SubmitWork(_) => InputKind::SubmitWork,
            Self::ResolveSubmitWorkRejection(_) => InputKind::ResolveSubmitWorkRejection,
            Self::CancelWork(_) => InputKind::CancelWork,
            Self::CancelAllWork(_) => InputKind::CancelAllWork,
            Self::ResolveCancelAllWorkRejection(_) => InputKind::ResolveCancelAllWorkRejection,
            Self::Stop(_) => InputKind::Stop,
            Self::Resume(_) => InputKind::Resume,
            Self::Complete(_) => InputKind::Complete,
            Self::Reset(_) => InputKind::Reset,
            Self::Destroy(_) => InputKind::Destroy,
            Self::RosterSnapshot(_) => InputKind::RosterSnapshot,
            Self::ListMembers(_) => InputKind::ListMembers,
            Self::ListMembersIncludingRetiring(_) => InputKind::ListMembersIncludingRetiring,
            Self::ListAllMembers(_) => InputKind::ListAllMembers,
            Self::MemberStatus(_) => InputKind::MemberStatus,
            Self::SubscribeAgentEvents(_) => InputKind::SubscribeAgentEvents,
            Self::SubscribeAllAgentEvents(_) => InputKind::SubscribeAllAgentEvents,
            Self::SubscribeMobEvents(_) => InputKind::SubscribeMobEvents,
            Self::SubscribeStructuralEvents(_) => InputKind::SubscribeStructuralEvents,
            Self::AuthorizeMobEventRouterMemberSubscription(_) => {
                InputKind::AuthorizeMobEventRouterMemberSubscription
            }
            Self::AuthorizeMobEventRouterMemberRemoval(_) => {
                InputKind::AuthorizeMobEventRouterMemberRemoval
            }
            Self::PollEvents(_) => InputKind::PollEvents,
            Self::PollEventsStrict(_) => InputKind::PollEventsStrict,
            Self::ReplayAllEvents(_) => InputKind::ReplayAllEvents,
            Self::RecordOperatorActionProvenance(_) => InputKind::RecordOperatorActionProvenance,
            Self::GetMember(_) => InputKind::GetMember,
            Self::SetSpawnPolicy(_) => InputKind::SetSpawnPolicy,
            Self::ResolveSpawnPolicy(_) => InputKind::ResolveSpawnPolicy,
            Self::Shutdown(_) => InputKind::Shutdown,
            Self::ForceCancel(_) => InputKind::ForceCancel,
            Self::KickoffMarkPending(_) => InputKind::KickoffMarkPending,
            Self::KickoffMarkStarting(_) => InputKind::KickoffMarkStarting,
            Self::StartupMarkReady(_) => InputKind::StartupMarkReady,
            Self::KickoffResolveStarted(_) => InputKind::KickoffResolveStarted,
            Self::KickoffResolveCallbackPending(_) => InputKind::KickoffResolveCallbackPending,
            Self::KickoffResolveFailed(_) => InputKind::KickoffResolveFailed,
            Self::KickoffCancelRequested(_) => InputKind::KickoffCancelRequested,
            Self::KickoffClear(_) => InputKind::KickoffClear,
            Self::KickoffQuiesced(_) => InputKind::KickoffQuiesced,
            Self::CancelPendingSpawn(_) => InputKind::CancelPendingSpawn,
            Self::ProbeMemberAdmission(_) => InputKind::ProbeMemberAdmission,
            Self::ComputeRespawnGeneration(_) => InputKind::ComputeRespawnGeneration,
            Self::ClassifyStepOutputFault(_) => InputKind::ClassifyStepOutputFault,
            Self::EscalateToSupervisor(_) => InputKind::EscalateToSupervisor,
            Self::EscalateToSupervisorNoEligibleTarget(_) => {
                InputKind::EscalateToSupervisorNoEligibleTarget
            }
            Self::EvaluateTopologyEdge(_) => InputKind::EvaluateTopologyEdge,
            Self::SetExternalMemberRebindCapability(_) => {
                InputKind::SetExternalMemberRebindCapability
            }
            Self::ClassifyTurnTimeoutDisposition(_) => InputKind::ClassifyTurnTimeoutDisposition,
            Self::SeedOrphanBudget(_) => InputKind::SeedOrphanBudget,
            Self::RecordCoordinationWorkIntent(_) => InputKind::RecordCoordinationWorkIntent,
            Self::RecordCoordinationResourceClaim(_) => InputKind::RecordCoordinationResourceClaim,
            Self::UpdateCoordinationWorkIntentStatus(_) => {
                InputKind::UpdateCoordinationWorkIntentStatus
            }
            Self::UpdateCoordinationResourceClaimStatus(_) => {
                InputKind::UpdateCoordinationResourceClaimStatus
            }
            Self::ObserveCoordinationResourceClaimOverlap(_) => {
                InputKind::ObserveCoordinationResourceClaimOverlap
            }
            Self::InitializeAdaptiveRun(_) => InputKind::InitializeAdaptiveRun,
            Self::RecordPlanningDecision(_) => InputKind::RecordPlanningDecision,
            Self::RecordPlanRejected(_) => InputKind::RecordPlanRejected,
            Self::ResolveLayerAdmission(_) => InputKind::ResolveLayerAdmission,
            Self::RecordLayerProvisioned(_) => InputKind::RecordLayerProvisioned,
            Self::RecordLayerRunStarted(_) => InputKind::RecordLayerRunStarted,
            Self::IngestLayerTerminal(_) => InputKind::IngestLayerTerminal,
            Self::RecordLayerSetupFault(_) => InputKind::RecordLayerSetupFault,
            Self::RecordLayerResultValidated(_) => InputKind::RecordLayerResultValidated,
            Self::RecordLayerResultInvalid(_) => InputKind::RecordLayerResultInvalid,
            Self::RecordLayerMobDestroyed(_) => InputKind::RecordLayerMobDestroyed,
            Self::RecordLayerMobRetained(_) => InputKind::RecordLayerMobRetained,
            Self::RecordCleanupResolved(_) => InputKind::RecordCleanupResolved,
            Self::RecordBodyEvidenceMissing(_) => InputKind::RecordBodyEvidenceMissing,
            Self::ResolveAdaptiveFinish(_) => InputKind::ResolveAdaptiveFinish,
            Self::RequestAdaptiveCancel(_) => InputKind::RequestAdaptiveCancel,
            Self::RecordDeadlineObserved(_) => InputKind::RecordDeadlineObserved,
        }
    }
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum InputKind {
    RunFlow,
    CreateRunSeed,
    CreateFrameSeed,
    CreateLoopSeed,
    RecordLoopBodyFrameCompleted,
    RecordLoopUntilConditionMet,
    RecordLoopUntilConditionFailed,
    AuthorizeFlowRunReducerCommand,
    AuthorizeFlowFrameReducerCommand,
    AuthorizeLoopIterationReducerCommand,
    CancelFlow,
    FlowStatus,
    ClassifyFlowRunTerminality,
    ClassifyFlowStepTerminality,
    ClassifyFlowFrameTerminalStatus,
    ClassifyFlowRunPublicResult,
    BeginSpawnExec,
    CommitSpawnMembership,
    CommitSpawnActivation,
    AbortSpawnExec,
    AuthorizeSpawnProfile,
    ClassifySpawnManyFailure,
    ClassifyMemberWait,
    ResolveFlowDelegationEdgeAdmission,
    ClassifyRemoteMemberRuntimeObservation,
    ResolveSpawnMemberAdmission,
    ResolveCurrentMobAdmission,
    ResolveSpawnToolAdmission,
    ResolveCreateMobAdmission,
    ResolveProfileMutationAdmission,
    ClassifyMemberOperationEligibility,
    ClassifyBridgeRejectionRecovery,
    ClassifyPendingSupervisorAcceptance,
    EnsureMember,
    Reconcile,
    Retire,
    RetireAbsent,
    RequestPendingSessionIngressDetachForMobDestroy,
    Respawn,
    RetireAll,
    BindOwnerBridgeSession,
    WireMembers,
    WireMembersWithTrust,
    UnwireMembers,
    WireExternalPeer,
    RegisterMemberPeer,
    AuthorizeMemberPeerRebind,
    AuthorizeMemberPeerOverlay,
    AuthorizeMemberTrustWiring,
    AuthorizeMemberTrustUnwiring,
    AuthorizeMemberTrustCleanup,
    AuthorizeMemberTrustCleanupObserved,
    AuthorizeExternalPeerReciprocalTrust,
    UnwireExternalPeer,
    ProvisionSupervisorAuthority,
    ClearSupervisorPendingRotation,
    RecordSupervisorPendingRotation,
    CommitSupervisorRotation,
    ClearSupervisorAuthorityForDestroy,
    RestoreSupervisorAuthorityAfterDestroyRollback,
    RecordPendingRecipientTrust,
    ResolvePendingRecipientTrust,
    RollbackPendingRecipientTrust,
    SessionIngressDetachedForMobDestroy,
    SessionIngressDetachFailedForMobDestroy,
    SubmitWork,
    ResolveSubmitWorkRejection,
    CancelWork,
    CancelAllWork,
    ResolveCancelAllWorkRejection,
    Stop,
    Resume,
    Complete,
    Reset,
    Destroy,
    RosterSnapshot,
    ListMembers,
    ListMembersIncludingRetiring,
    ListAllMembers,
    MemberStatus,
    SubscribeAgentEvents,
    SubscribeAllAgentEvents,
    SubscribeMobEvents,
    SubscribeStructuralEvents,
    AuthorizeMobEventRouterMemberSubscription,
    AuthorizeMobEventRouterMemberRemoval,
    PollEvents,
    PollEventsStrict,
    ReplayAllEvents,
    RecordOperatorActionProvenance,
    GetMember,
    SetSpawnPolicy,
    ResolveSpawnPolicy,
    Shutdown,
    ForceCancel,
    KickoffMarkPending,
    KickoffMarkStarting,
    StartupMarkReady,
    KickoffResolveStarted,
    KickoffResolveCallbackPending,
    KickoffResolveFailed,
    KickoffCancelRequested,
    KickoffClear,
    KickoffQuiesced,
    CancelPendingSpawn,
    ProbeMemberAdmission,
    ComputeRespawnGeneration,
    ClassifyStepOutputFault,
    EscalateToSupervisor,
    EscalateToSupervisorNoEligibleTarget,
    EvaluateTopologyEdge,
    SetExternalMemberRebindCapability,
    ClassifyTurnTimeoutDisposition,
    SeedOrphanBudget,
    RecordCoordinationWorkIntent,
    RecordCoordinationResourceClaim,
    UpdateCoordinationWorkIntentStatus,
    UpdateCoordinationResourceClaimStatus,
    ObserveCoordinationResourceClaimOverlap,
    InitializeAdaptiveRun,
    RecordPlanningDecision,
    RecordPlanRejected,
    ResolveLayerAdmission,
    RecordLayerProvisioned,
    RecordLayerRunStarted,
    IngestLayerTerminal,
    RecordLayerSetupFault,
    RecordLayerResultValidated,
    RecordLayerResultInvalid,
    RecordLayerMobDestroyed,
    RecordLayerMobRetained,
    RecordCleanupResolved,
    RecordBodyEvidenceMissing,
    ResolveAdaptiveFinish,
    RequestAdaptiveCancel,
    RecordDeadlineObserved,
}

pub mod signals {
    #[allow(unused_imports)]
    use super::*;
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ObserveRuntimeReady {
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RetireMember {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub session_id: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdmitDestroyMemberRetire {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub session_id: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ObserveRuntimeRetired {
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ObserveMemberRetirementArchived {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ObserveDestroyMemberRetirementArchived {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Generation,
        pub session_id: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResetMember {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Generation,
        pub profile_name: String,
        pub runtime_mode: SpawnPolicyRuntimeMode,
        pub external_addressable: bool,
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RespawnMember {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Generation,
        pub profile_name: String,
        pub runtime_mode: SpawnPolicyRuntimeMode,
        pub external_addressable: bool,
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveRespawnTopologyRestore {
        pub agent_identity: AgentIdentity,
        pub failed_peer_ids: Vec<RespawnTopologyPeerId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct DestroyMob {
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ObserveRuntimeDestroyed {
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverRosterMember {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Generation,
        pub profile_name: String,
        pub runtime_mode: SpawnPolicyRuntimeMode,
        pub external_addressable: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverMemberSessionBinding {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub bridge_session_id: SessionId,
        pub replacing: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverRosterMemberReset {
        pub agent_identity: AgentIdentity,
        pub previous_agent_runtime_id: AgentRuntimeId,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Generation,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverRosterMemberRetired {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverMemberKickoff {
        pub member_id: AgentIdentity,
        pub phase: KickoffPhase,
        pub error: Option<String>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverRosterWiring {
        pub edge: WiringEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverRosterUnwire {
        pub edge: WiringEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverExternalPeerWiring {
        pub key: ExternalPeerKey,
        pub edge: ExternalPeerEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverExternalPeerUnwire {
        pub key: ExternalPeerKey,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverSupervisorAuthority {
        pub peer_id: PeerId,
        pub signing_key: PeerSigningKey,
        pub epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
        pub pending_peer_id: Option<PeerId>,
        pub pending_signing_key: Option<PeerSigningKey>,
        pub pending_epoch: Option<u64>,
        pub pending_protocol_version: Option<SupervisorProtocolVersion>,
        pub pending_accepted_peer_ids: std::collections::BTreeSet<PeerId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverOwnerBridgeSession {
        pub bridge_session_id: SessionId,
        pub destroy_on_owner_archive: bool,
        pub implicit_delegation_mob: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RecoverMemberRestoreFailure {
        pub agent_identity: AgentIdentity,
        pub reason: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ClassifyMemberLiveMaterialization {
        pub agent_identity: AgentIdentity,
        pub observation: MemberLiveMaterializationObservationKind,
        pub reason: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveMemberRevivalSucceeded {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResolveMemberRevivalFailed {
        pub agent_identity: AgentIdentity,
        pub reason: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdmitDestroyCleanup {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdmitDestroyStorageFinalizing {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MarkCompleted {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct StartRun {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FinishRun {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct BeginCleanup {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FinishCleanup {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct InitializeOrchestrator {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct BindCoordinator {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct UnbindCoordinator {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct StageSpawn {
        pub agent_identity: AgentIdentity,
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CompleteSpawn {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct StartFlow {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CompleteFlow {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct StopOrchestrator {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResumeOrchestrator {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct DestroyOrchestrator {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ForceCancelMember {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberPeerExposed {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberTerminalized {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct OperationPeerTrusted {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct PeerInputAdmitted {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CreateRun {}
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum Signal {
    ObserveRuntimeReady(signals::ObserveRuntimeReady),
    RetireMember(signals::RetireMember),
    AdmitDestroyMemberRetire(signals::AdmitDestroyMemberRetire),
    ObserveRuntimeRetired(signals::ObserveRuntimeRetired),
    ObserveMemberRetirementArchived(signals::ObserveMemberRetirementArchived),
    ObserveDestroyMemberRetirementArchived(signals::ObserveDestroyMemberRetirementArchived),
    ResetMember(signals::ResetMember),
    RespawnMember(signals::RespawnMember),
    ResolveRespawnTopologyRestore(signals::ResolveRespawnTopologyRestore),
    DestroyMob(signals::DestroyMob),
    ObserveRuntimeDestroyed(signals::ObserveRuntimeDestroyed),
    RecoverRosterMember(signals::RecoverRosterMember),
    RecoverMemberSessionBinding(signals::RecoverMemberSessionBinding),
    RecoverRosterMemberReset(signals::RecoverRosterMemberReset),
    RecoverRosterMemberRetired(signals::RecoverRosterMemberRetired),
    RecoverMemberKickoff(signals::RecoverMemberKickoff),
    RecoverRosterWiring(signals::RecoverRosterWiring),
    RecoverRosterUnwire(signals::RecoverRosterUnwire),
    RecoverExternalPeerWiring(signals::RecoverExternalPeerWiring),
    RecoverExternalPeerUnwire(signals::RecoverExternalPeerUnwire),
    RecoverSupervisorAuthority(signals::RecoverSupervisorAuthority),
    RecoverOwnerBridgeSession(signals::RecoverOwnerBridgeSession),
    RecoverMemberRestoreFailure(signals::RecoverMemberRestoreFailure),
    ClassifyMemberLiveMaterialization(signals::ClassifyMemberLiveMaterialization),
    ResolveMemberRevivalSucceeded(signals::ResolveMemberRevivalSucceeded),
    ResolveMemberRevivalFailed(signals::ResolveMemberRevivalFailed),
    AdmitDestroyCleanup(signals::AdmitDestroyCleanup),
    AdmitDestroyStorageFinalizing(signals::AdmitDestroyStorageFinalizing),
    MarkCompleted(signals::MarkCompleted),
    StartRun(signals::StartRun),
    FinishRun(signals::FinishRun),
    BeginCleanup(signals::BeginCleanup),
    FinishCleanup(signals::FinishCleanup),
    InitializeOrchestrator(signals::InitializeOrchestrator),
    BindCoordinator(signals::BindCoordinator),
    UnbindCoordinator(signals::UnbindCoordinator),
    StageSpawn(signals::StageSpawn),
    CompleteSpawn(signals::CompleteSpawn),
    StartFlow(signals::StartFlow),
    CompleteFlow(signals::CompleteFlow),
    StopOrchestrator(signals::StopOrchestrator),
    ResumeOrchestrator(signals::ResumeOrchestrator),
    DestroyOrchestrator(signals::DestroyOrchestrator),
    ForceCancelMember(signals::ForceCancelMember),
    MemberPeerExposed(signals::MemberPeerExposed),
    MemberTerminalized(signals::MemberTerminalized),
    OperationPeerTrusted(signals::OperationPeerTrusted),
    PeerInputAdmitted(signals::PeerInputAdmitted),
    CreateRun(signals::CreateRun),
}
impl Signal {
    pub fn kind(&self) -> SignalKind {
        match self {
            Self::ObserveRuntimeReady(_) => SignalKind::ObserveRuntimeReady,
            Self::RetireMember(_) => SignalKind::RetireMember,
            Self::AdmitDestroyMemberRetire(_) => SignalKind::AdmitDestroyMemberRetire,
            Self::ObserveRuntimeRetired(_) => SignalKind::ObserveRuntimeRetired,
            Self::ObserveMemberRetirementArchived(_) => SignalKind::ObserveMemberRetirementArchived,
            Self::ObserveDestroyMemberRetirementArchived(_) => {
                SignalKind::ObserveDestroyMemberRetirementArchived
            }
            Self::ResetMember(_) => SignalKind::ResetMember,
            Self::RespawnMember(_) => SignalKind::RespawnMember,
            Self::ResolveRespawnTopologyRestore(_) => SignalKind::ResolveRespawnTopologyRestore,
            Self::DestroyMob(_) => SignalKind::DestroyMob,
            Self::ObserveRuntimeDestroyed(_) => SignalKind::ObserveRuntimeDestroyed,
            Self::RecoverRosterMember(_) => SignalKind::RecoverRosterMember,
            Self::RecoverMemberSessionBinding(_) => SignalKind::RecoverMemberSessionBinding,
            Self::RecoverRosterMemberReset(_) => SignalKind::RecoverRosterMemberReset,
            Self::RecoverRosterMemberRetired(_) => SignalKind::RecoverRosterMemberRetired,
            Self::RecoverMemberKickoff(_) => SignalKind::RecoverMemberKickoff,
            Self::RecoverRosterWiring(_) => SignalKind::RecoverRosterWiring,
            Self::RecoverRosterUnwire(_) => SignalKind::RecoverRosterUnwire,
            Self::RecoverExternalPeerWiring(_) => SignalKind::RecoverExternalPeerWiring,
            Self::RecoverExternalPeerUnwire(_) => SignalKind::RecoverExternalPeerUnwire,
            Self::RecoverSupervisorAuthority(_) => SignalKind::RecoverSupervisorAuthority,
            Self::RecoverOwnerBridgeSession(_) => SignalKind::RecoverOwnerBridgeSession,
            Self::RecoverMemberRestoreFailure(_) => SignalKind::RecoverMemberRestoreFailure,
            Self::ClassifyMemberLiveMaterialization(_) => {
                SignalKind::ClassifyMemberLiveMaterialization
            }
            Self::ResolveMemberRevivalSucceeded(_) => SignalKind::ResolveMemberRevivalSucceeded,
            Self::ResolveMemberRevivalFailed(_) => SignalKind::ResolveMemberRevivalFailed,
            Self::AdmitDestroyCleanup(_) => SignalKind::AdmitDestroyCleanup,
            Self::AdmitDestroyStorageFinalizing(_) => SignalKind::AdmitDestroyStorageFinalizing,
            Self::MarkCompleted(_) => SignalKind::MarkCompleted,
            Self::StartRun(_) => SignalKind::StartRun,
            Self::FinishRun(_) => SignalKind::FinishRun,
            Self::BeginCleanup(_) => SignalKind::BeginCleanup,
            Self::FinishCleanup(_) => SignalKind::FinishCleanup,
            Self::InitializeOrchestrator(_) => SignalKind::InitializeOrchestrator,
            Self::BindCoordinator(_) => SignalKind::BindCoordinator,
            Self::UnbindCoordinator(_) => SignalKind::UnbindCoordinator,
            Self::StageSpawn(_) => SignalKind::StageSpawn,
            Self::CompleteSpawn(_) => SignalKind::CompleteSpawn,
            Self::StartFlow(_) => SignalKind::StartFlow,
            Self::CompleteFlow(_) => SignalKind::CompleteFlow,
            Self::StopOrchestrator(_) => SignalKind::StopOrchestrator,
            Self::ResumeOrchestrator(_) => SignalKind::ResumeOrchestrator,
            Self::DestroyOrchestrator(_) => SignalKind::DestroyOrchestrator,
            Self::ForceCancelMember(_) => SignalKind::ForceCancelMember,
            Self::MemberPeerExposed(_) => SignalKind::MemberPeerExposed,
            Self::MemberTerminalized(_) => SignalKind::MemberTerminalized,
            Self::OperationPeerTrusted(_) => SignalKind::OperationPeerTrusted,
            Self::PeerInputAdmitted(_) => SignalKind::PeerInputAdmitted,
            Self::CreateRun(_) => SignalKind::CreateRun,
        }
    }
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum SignalKind {
    ObserveRuntimeReady,
    RetireMember,
    AdmitDestroyMemberRetire,
    ObserveRuntimeRetired,
    ObserveMemberRetirementArchived,
    ObserveDestroyMemberRetirementArchived,
    ResetMember,
    RespawnMember,
    ResolveRespawnTopologyRestore,
    DestroyMob,
    ObserveRuntimeDestroyed,
    RecoverRosterMember,
    RecoverMemberSessionBinding,
    RecoverRosterMemberReset,
    RecoverRosterMemberRetired,
    RecoverMemberKickoff,
    RecoverRosterWiring,
    RecoverRosterUnwire,
    RecoverExternalPeerWiring,
    RecoverExternalPeerUnwire,
    RecoverSupervisorAuthority,
    RecoverOwnerBridgeSession,
    RecoverMemberRestoreFailure,
    ClassifyMemberLiveMaterialization,
    ResolveMemberRevivalSucceeded,
    ResolveMemberRevivalFailed,
    AdmitDestroyCleanup,
    AdmitDestroyStorageFinalizing,
    MarkCompleted,
    StartRun,
    FinishRun,
    BeginCleanup,
    FinishCleanup,
    InitializeOrchestrator,
    BindCoordinator,
    UnbindCoordinator,
    StageSpawn,
    CompleteSpawn,
    StartFlow,
    CompleteFlow,
    StopOrchestrator,
    ResumeOrchestrator,
    DestroyOrchestrator,
    ForceCancelMember,
    MemberPeerExposed,
    MemberTerminalized,
    OperationPeerTrusted,
    PeerInputAdmitted,
    CreateRun,
}

pub mod effects {
    #[allow(unused_imports)]
    use super::*;
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestRuntimeBinding {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Option<Generation>,
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SpawnProfileAuthorized {
        pub agent_identity: AgentIdentity,
        pub profile_name: String,
        pub model: String,
        pub profile_material_digest: String,
        pub tool_config_digest: String,
        pub skills_digest: String,
        pub provider_params_digest: Option<String>,
        pub output_schema_digest: Option<String>,
        pub external_addressable: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestRuntimeIngress {
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Option<Generation>,
        pub session_id: SessionId,
        pub work_id: WorkId,
        pub origin: WorkOrigin,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestPeerRuntimeIngress {
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub generation: Option<Generation>,
        pub work_id: WorkId,
        pub origin: WorkOrigin,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SubmitWorkRejected {
        pub agent_runtime_id: AgentRuntimeId,
        pub origin: WorkOrigin,
        pub reason: SubmitWorkRejectReasonKind,
        pub expected_fence_token: Option<FenceToken>,
        pub actual_fence_token: Option<FenceToken>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CancelAllWorkRejected {
        pub agent_runtime_id: AgentRuntimeId,
        pub reason: CancelAllWorkRejectReasonKind,
        pub expected_fence_token: Option<FenceToken>,
        pub actual_fence_token: Option<FenceToken>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestRuntimeRetire {
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestRuntimeDestroy {
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct PendingSpawnOperationOwnerAuthorized {
        pub agent_identity: AgentIdentity,
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestSessionIngressDetachForMobDestroy {
        pub mob_id: MobId,
        pub agent_runtime_id: AgentRuntimeId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AppendLifecycleJournal {
        pub kind: MobLifecycleJournalKind,
        pub agent_identity: Option<AgentIdentity>,
        pub agent_runtime_id: Option<AgentRuntimeId>,
        pub fence_token: Option<FenceToken>,
        pub generation: Option<Generation>,
        pub session_id: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AppendOperatorActionProvenance {
        pub tool_name: String,
        pub principal_token: OpaquePrincipalToken,
        pub caller_provenance: Option<MobToolCallerProvenance>,
        pub audit_invocation_id: Option<String>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EmitMemberLifecycleNotice {
        pub kind: MemberLifecycleKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EmitRunLifecycleNotice {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EmitFlowRunNotice {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AppendFailureLedger {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowTerminalized {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowRunTerminal {
        pub run_id: RunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowRunNonTerminal {
        pub run_id: RunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowStepTerminal {
        pub run_id: RunId,
        pub step_id: StepId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowStepNonTerminal {
        pub run_id: RunId,
        pub step_id: StepId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowFrameTerminalStatusClassified {
        pub frame_id: FrameId,
        pub terminal_status: FrameStatus,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowFrameTerminalStatusUnavailable {
        pub frame_id: FrameId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowRunPublicResultClassified {
        pub run_id: RunId,
        pub result: FlowRunPublicResultClassKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EscalateSupervisor {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct NotifyCoordinator {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ExposePendingSpawn {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EmitMemberTerminalNotice {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdmitPeerInput {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EmitProgressNote {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct PersistKickoffUpdate {
        pub member_id: AgentIdentity,
        pub phase: KickoffPhase,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct PersistKickoffFailureUpdate {
        pub member_id: AgentIdentity,
        pub phase: KickoffPhase,
        pub error: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EmitKickoffLifecycleNotice {
        pub member_id: AgentIdentity,
        pub intent: KickoffIntent,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestKickoffQuiesce {
        pub member_id: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RequestPendingSpawnQuiesceForDestroy {}
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberAdmissionProbed {
        pub agent_identity: AgentIdentity,
        pub verdict: MemberAdmissionVerdictKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RespawnGenerationComputed {
        pub agent_identity: AgentIdentity,
        pub next_generation: Generation,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct StepOutputFaultClassified {
        pub run_id: RunId,
        pub step_id: StepId,
        pub target_retry_key: String,
        pub disposition: StepFaultDispositionKind,
        pub terminal_cause: StepOutputFaultKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SupervisorEscalationRequested {
        pub run_id: RunId,
        pub step_id: StepId,
        pub supervisor_identity: AgentIdentity,
        pub turn_timeout_ms: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SupervisorEscalationFailed {
        pub run_id: RunId,
        pub step_id: StepId,
        pub cause: SupervisorEscalationFailureCause,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct TopologyEdgeVerdictResolved {
        pub from_role: String,
        pub to_role: String,
        pub verdict: PolicyDecision,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct TurnTimeoutDispositionClassified {
        pub timed_out_run_id: RunId,
        pub disposition: TurnTimeoutDisposition,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberSpawnRequired {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberRetainRequired {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberRetireRequired {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SpawnPolicyResolutionRecorded {
        pub agent_identity: AgentIdentity,
        pub revision: u64,
        pub profile_name: Option<String>,
        pub runtime_mode: Option<SpawnPolicyRuntimeMode>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct OwnerBridgeSessionBound {
        pub bridge_session_id: SessionId,
        pub destroy_on_owner_archive: bool,
        pub implicit_delegation_mob: bool,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RespawnTopologyRestoreResolved {
        pub agent_identity: AgentIdentity,
        pub result: RespawnTopologyRestoreResultKind,
        pub failed_peer_ids: Vec<RespawnTopologyPeerId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberLiveMaterializationClassified {
        pub agent_identity: AgentIdentity,
        pub observation: MemberLiveMaterializationObservationKind,
        pub verdict: MemberRevivalVerdictKind,
        pub reason: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SpawnManyFailureClassified {
        pub observation: MobSpawnManyFailureObservationKind,
        pub cause: MobSpawnManyFailureCauseKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberWaitClassified {
        pub agent_identity: AgentIdentity,
        pub result: MemberWaitClassificationKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FlowDelegationEdgeAdmissionResolved {
        pub from_role: String,
        pub to_role: String,
        pub admission: MobFlowDelegationEdgeAdmissionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RemoteMemberRuntimeTerminalityClassified {
        pub observed_state: MobRemoteMemberRuntimeObservedState,
        pub terminality: MobRemoteMemberRuntimeTerminality,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SpawnMemberAdmissionResolved {
        pub admission: MobSpawnMemberAdmissionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CurrentMobAdmissionResolved {
        pub admission: MobCurrentMobAdmissionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SpawnToolAdmissionResolved {
        pub admission: MobSpawnToolAdmissionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct CreateMobAdmissionResolved {
        pub admission: MobCreateMobAdmissionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ProfileMutationAdmissionResolved {
        pub admission: MobProfileMutationAdmissionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberOperationEligibilityResolved {
        pub admission: MobMemberOperationEligibilityKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct BridgeRejectionRecoveryClassified {
        pub rejection_cause: MobBridgeRejectionCause,
        pub recovery: MobBridgeRejectionRecovery,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct PendingSupervisorAcceptanceClassified {
        pub rejection_cause: MobBridgeRejectionCause,
        pub verdict: MobPendingSupervisorAcceptanceKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct FrameSeedConfirmed {
        pub frame_id: FrameId,
        pub disposition: MobFrameSeedDisposition,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct WiringGraphChanged {
        pub epoch: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberSessionBindingChanged {
        pub epoch: u64,
        pub agent_identity: AgentIdentity,
        pub old_session_id: Option<SessionId>,
        pub new_session_id: Option<SessionId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct SessionProvisionOperationOwnerAuthorized {
        pub agent_identity: AgentIdentity,
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberTrustWiringRequested {
        pub edge: WiringEdge,
        pub a_peer_id: PeerId,
        pub b_peer_id: PeerId,
        pub a_endpoint: MemberPeerEndpoint,
        pub b_endpoint: MemberPeerEndpoint,
        pub epoch: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberTrustUnwiringRequested {
        pub edge: WiringEdge,
        pub a_peer_id: PeerId,
        pub b_peer_id: PeerId,
        pub epoch: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct WiringTrustRepairRequested {
        pub edge: WiringEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ExternalPeerTrustWiringRequested {
        pub edge: ExternalPeerEdge,
        pub local_peer_id: PeerId,
        pub peer_id: PeerId,
        pub epoch: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ExternalPeerTrustUnwiringRequested {
        pub edge: ExternalPeerEdge,
        pub local_peer_id: PeerId,
        pub peer_id: PeerId,
        pub epoch: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ExternalPeerTrustRepairRequested {
        pub edge: ExternalPeerEdge,
        pub local_peer_id: PeerId,
        pub peer_id: PeerId,
        pub epoch: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberPeerRegistered {
        pub agent_identity: AgentIdentity,
        pub peer_id: PeerId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberPeerRebindAuthorized {
        pub agent_identity: AgentIdentity,
        pub peer_id: PeerId,
        pub peer_endpoint: MemberPeerEndpoint,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct MemberPeerOverlayAuthorized {
        pub agent_identity: AgentIdentity,
        pub peer_id: PeerId,
        pub peer_overlay_endpoints: std::collections::BTreeSet<MemberPeerEndpoint>,
        pub epoch: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ExternalPeerReciprocalTrustRequested {
        pub key: ExternalPeerKey,
        pub edge: ExternalPeerEdge,
        pub peer_id: PeerId,
        pub peer_endpoint: MemberPeerEndpoint,
        pub epoch: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct PersistSupervisorAuthority {
        pub peer_id: PeerId,
        pub signing_key: PeerSigningKey,
        pub epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
        pub pending_peer_id: Option<PeerId>,
        pub pending_signing_key: Option<PeerSigningKey>,
        pub pending_epoch: Option<u64>,
        pub pending_protocol_version: Option<SupervisorProtocolVersion>,
        pub pending_accepted_peer_ids: std::collections::BTreeSet<PeerId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct DeleteSupervisorAuthority {
        pub peer_id: PeerId,
        pub signing_key: PeerSigningKey,
        pub epoch: u64,
        pub protocol_version: SupervisorProtocolVersion,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EmitWiringLifecycleNotice {
        pub kind: WiringLifecycleKind,
        pub edge: WiringEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct EmitExternalPeerWiringLifecycleNotice {
        pub kind: WiringLifecycleKind,
        pub edge: ExternalPeerEdge,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeAgentEventSubscription {
        pub agent_identity: AgentIdentity,
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RejectAgentEventSubscription {
        pub agent_identity: AgentIdentity,
        pub reason: EventSubscriptionRejectReasonKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeAllAgentEventSubscription {
        pub session_bound_runtimes: std::collections::BTreeSet<AgentRuntimeId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RejectAllAgentEventSubscription {
        pub reason: EventSubscriptionRejectReasonKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMobEventRouter {
        pub initial_cursor: u64,
        pub channel_capacity: u64,
        pub poll_interval_ms: u64,
        pub session_bound_runtimes: std::collections::BTreeSet<AgentRuntimeId>,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMobEventRouterMemberSubscription {
        pub agent_identity: AgentIdentity,
        pub agent_runtime_id: AgentRuntimeId,
        pub fence_token: FenceToken,
        pub session_id: SessionId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeMobEventRouterMemberRemoval {
        pub agent_identity: AgentIdentity,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeStructuralEventSubscription {
        pub after_cursor: u64,
        pub explicit_after_cursor: bool,
        pub batch_limit: u64,
        pub channel_capacity: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RejectStructuralEventSubscription {
        pub after_cursor: u64,
        pub latest_cursor: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AuthorizeStrictEventPoll {
        pub after_cursor: u64,
        pub limit: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct RejectStrictEventPoll {
        pub after_cursor: u64,
        pub latest_cursor: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct WorkIntentRecorded {
        pub intent_id: WorkIntentId,
        pub status: MobCoordinationWorkIntentStatus,
        pub revision: u64,
        pub resource_tokens: std::collections::BTreeSet<CoordinationResourceRef>,
        pub expires_at_ms: Option<u64>,
        pub event_kind: MobCoordinationEventKind,
        pub sequence: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResourceClaimRecorded {
        pub claim_id: ResourceClaimId,
        pub kind: MobCoordinationResourceClaimKind,
        pub status: MobCoordinationResourceClaimStatus,
        pub revision: u64,
        pub resource_tokens: std::collections::BTreeSet<CoordinationResourceRef>,
        pub expires_at_ms: Option<u64>,
        pub event_kind: MobCoordinationEventKind,
        pub sequence: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct WorkIntentStatusChanged {
        pub intent_id: WorkIntentId,
        pub status: MobCoordinationWorkIntentStatus,
        pub revision: u64,
        pub event_kind: MobCoordinationEventKind,
        pub sequence: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResourceClaimStatusChanged {
        pub claim_id: ResourceClaimId,
        pub status: MobCoordinationResourceClaimStatus,
        pub revision: u64,
        pub event_kind: MobCoordinationEventKind,
        pub sequence: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct ResourceClaimOverlapObserved {
        pub claim_id: ResourceClaimId,
        pub overlap_ids: Vec<ResourceClaimId>,
        pub event_kind: MobCoordinationEventKind,
        pub sequence: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveRunInitialized {
        pub adaptive_run_id: AdaptiveRunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptivePlanningDecisionRecorded {
        pub adaptive_run_id: AdaptiveRunId,
        pub decision_kind: AdaptiveDecisionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptivePlanRejected {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveLayerAdmissionResolved {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub admission: AdaptiveLayerAdmissionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveLayerProvisioned {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveLayerRunStarted {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub attempt: u64,
        pub child_run_id: RunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveLayerTerminalIngested {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub result_class: FlowRunPublicResultClassKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveLayerSetupFaultRecorded {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub fault: AdaptiveLayerSetupFaultKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveLayerResultValidated {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub result_digest: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveLayerResultInvalid {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveLayerCleanupObserved {
        pub adaptive_run_id: AdaptiveRunId,
        pub layer_id: AdaptiveLayerId,
        pub disposition: AdaptiveLayerDispositionKind,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveCleanupResolved {
        pub adaptive_run_id: AdaptiveRunId,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveBodyEvidenceMissing {
        pub adaptive_run_id: AdaptiveRunId,
        pub missing_digest: String,
    }
    #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
    pub struct AdaptiveRunTerminalized {
        pub adaptive_run_id: AdaptiveRunId,
        pub reason: AdaptiveStopReason,
    }
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum Effect {
    RequestRuntimeBinding(effects::RequestRuntimeBinding),
    SpawnProfileAuthorized(effects::SpawnProfileAuthorized),
    RequestRuntimeIngress(effects::RequestRuntimeIngress),
    RequestPeerRuntimeIngress(effects::RequestPeerRuntimeIngress),
    SubmitWorkRejected(effects::SubmitWorkRejected),
    CancelAllWorkRejected(effects::CancelAllWorkRejected),
    RequestRuntimeRetire(effects::RequestRuntimeRetire),
    RequestRuntimeDestroy(effects::RequestRuntimeDestroy),
    PendingSpawnOperationOwnerAuthorized(effects::PendingSpawnOperationOwnerAuthorized),
    RequestSessionIngressDetachForMobDestroy(effects::RequestSessionIngressDetachForMobDestroy),
    AppendLifecycleJournal(effects::AppendLifecycleJournal),
    AppendOperatorActionProvenance(effects::AppendOperatorActionProvenance),
    EmitMemberLifecycleNotice(effects::EmitMemberLifecycleNotice),
    EmitRunLifecycleNotice(effects::EmitRunLifecycleNotice),
    EmitFlowRunNotice(effects::EmitFlowRunNotice),
    AppendFailureLedger(effects::AppendFailureLedger),
    FlowTerminalized(effects::FlowTerminalized),
    FlowRunTerminal(effects::FlowRunTerminal),
    FlowRunNonTerminal(effects::FlowRunNonTerminal),
    FlowStepTerminal(effects::FlowStepTerminal),
    FlowStepNonTerminal(effects::FlowStepNonTerminal),
    FlowFrameTerminalStatusClassified(effects::FlowFrameTerminalStatusClassified),
    FlowFrameTerminalStatusUnavailable(effects::FlowFrameTerminalStatusUnavailable),
    FlowRunPublicResultClassified(effects::FlowRunPublicResultClassified),
    EscalateSupervisor(effects::EscalateSupervisor),
    NotifyCoordinator(effects::NotifyCoordinator),
    ExposePendingSpawn(effects::ExposePendingSpawn),
    EmitMemberTerminalNotice(effects::EmitMemberTerminalNotice),
    AdmitPeerInput(effects::AdmitPeerInput),
    EmitProgressNote(effects::EmitProgressNote),
    PersistKickoffUpdate(effects::PersistKickoffUpdate),
    PersistKickoffFailureUpdate(effects::PersistKickoffFailureUpdate),
    EmitKickoffLifecycleNotice(effects::EmitKickoffLifecycleNotice),
    RequestKickoffQuiesce(effects::RequestKickoffQuiesce),
    RequestPendingSpawnQuiesceForDestroy(effects::RequestPendingSpawnQuiesceForDestroy),
    MemberAdmissionProbed(effects::MemberAdmissionProbed),
    RespawnGenerationComputed(effects::RespawnGenerationComputed),
    StepOutputFaultClassified(effects::StepOutputFaultClassified),
    SupervisorEscalationRequested(effects::SupervisorEscalationRequested),
    SupervisorEscalationFailed(effects::SupervisorEscalationFailed),
    TopologyEdgeVerdictResolved(effects::TopologyEdgeVerdictResolved),
    TurnTimeoutDispositionClassified(effects::TurnTimeoutDispositionClassified),
    MemberSpawnRequired(effects::MemberSpawnRequired),
    MemberRetainRequired(effects::MemberRetainRequired),
    MemberRetireRequired(effects::MemberRetireRequired),
    SpawnPolicyResolutionRecorded(effects::SpawnPolicyResolutionRecorded),
    OwnerBridgeSessionBound(effects::OwnerBridgeSessionBound),
    RespawnTopologyRestoreResolved(effects::RespawnTopologyRestoreResolved),
    MemberLiveMaterializationClassified(effects::MemberLiveMaterializationClassified),
    SpawnManyFailureClassified(effects::SpawnManyFailureClassified),
    MemberWaitClassified(effects::MemberWaitClassified),
    FlowDelegationEdgeAdmissionResolved(effects::FlowDelegationEdgeAdmissionResolved),
    RemoteMemberRuntimeTerminalityClassified(effects::RemoteMemberRuntimeTerminalityClassified),
    SpawnMemberAdmissionResolved(effects::SpawnMemberAdmissionResolved),
    CurrentMobAdmissionResolved(effects::CurrentMobAdmissionResolved),
    SpawnToolAdmissionResolved(effects::SpawnToolAdmissionResolved),
    CreateMobAdmissionResolved(effects::CreateMobAdmissionResolved),
    ProfileMutationAdmissionResolved(effects::ProfileMutationAdmissionResolved),
    MemberOperationEligibilityResolved(effects::MemberOperationEligibilityResolved),
    BridgeRejectionRecoveryClassified(effects::BridgeRejectionRecoveryClassified),
    PendingSupervisorAcceptanceClassified(effects::PendingSupervisorAcceptanceClassified),
    FrameSeedConfirmed(effects::FrameSeedConfirmed),
    WiringGraphChanged(effects::WiringGraphChanged),
    MemberSessionBindingChanged(effects::MemberSessionBindingChanged),
    SessionProvisionOperationOwnerAuthorized(effects::SessionProvisionOperationOwnerAuthorized),
    MemberTrustWiringRequested(effects::MemberTrustWiringRequested),
    MemberTrustUnwiringRequested(effects::MemberTrustUnwiringRequested),
    WiringTrustRepairRequested(effects::WiringTrustRepairRequested),
    ExternalPeerTrustWiringRequested(effects::ExternalPeerTrustWiringRequested),
    ExternalPeerTrustUnwiringRequested(effects::ExternalPeerTrustUnwiringRequested),
    ExternalPeerTrustRepairRequested(effects::ExternalPeerTrustRepairRequested),
    MemberPeerRegistered(effects::MemberPeerRegistered),
    MemberPeerRebindAuthorized(effects::MemberPeerRebindAuthorized),
    MemberPeerOverlayAuthorized(effects::MemberPeerOverlayAuthorized),
    ExternalPeerReciprocalTrustRequested(effects::ExternalPeerReciprocalTrustRequested),
    PersistSupervisorAuthority(effects::PersistSupervisorAuthority),
    DeleteSupervisorAuthority(effects::DeleteSupervisorAuthority),
    EmitWiringLifecycleNotice(effects::EmitWiringLifecycleNotice),
    EmitExternalPeerWiringLifecycleNotice(effects::EmitExternalPeerWiringLifecycleNotice),
    AuthorizeAgentEventSubscription(effects::AuthorizeAgentEventSubscription),
    RejectAgentEventSubscription(effects::RejectAgentEventSubscription),
    AuthorizeAllAgentEventSubscription(effects::AuthorizeAllAgentEventSubscription),
    RejectAllAgentEventSubscription(effects::RejectAllAgentEventSubscription),
    AuthorizeMobEventRouter(effects::AuthorizeMobEventRouter),
    AuthorizeMobEventRouterMemberSubscription(effects::AuthorizeMobEventRouterMemberSubscription),
    AuthorizeMobEventRouterMemberRemoval(effects::AuthorizeMobEventRouterMemberRemoval),
    AuthorizeStructuralEventSubscription(effects::AuthorizeStructuralEventSubscription),
    RejectStructuralEventSubscription(effects::RejectStructuralEventSubscription),
    AuthorizeStrictEventPoll(effects::AuthorizeStrictEventPoll),
    RejectStrictEventPoll(effects::RejectStrictEventPoll),
    WorkIntentRecorded(effects::WorkIntentRecorded),
    ResourceClaimRecorded(effects::ResourceClaimRecorded),
    WorkIntentStatusChanged(effects::WorkIntentStatusChanged),
    ResourceClaimStatusChanged(effects::ResourceClaimStatusChanged),
    ResourceClaimOverlapObserved(effects::ResourceClaimOverlapObserved),
    AdaptiveRunInitialized(effects::AdaptiveRunInitialized),
    AdaptivePlanningDecisionRecorded(effects::AdaptivePlanningDecisionRecorded),
    AdaptivePlanRejected(effects::AdaptivePlanRejected),
    AdaptiveLayerAdmissionResolved(effects::AdaptiveLayerAdmissionResolved),
    AdaptiveLayerProvisioned(effects::AdaptiveLayerProvisioned),
    AdaptiveLayerRunStarted(effects::AdaptiveLayerRunStarted),
    AdaptiveLayerTerminalIngested(effects::AdaptiveLayerTerminalIngested),
    AdaptiveLayerSetupFaultRecorded(effects::AdaptiveLayerSetupFaultRecorded),
    AdaptiveLayerResultValidated(effects::AdaptiveLayerResultValidated),
    AdaptiveLayerResultInvalid(effects::AdaptiveLayerResultInvalid),
    AdaptiveLayerCleanupObserved(effects::AdaptiveLayerCleanupObserved),
    AdaptiveCleanupResolved(effects::AdaptiveCleanupResolved),
    AdaptiveBodyEvidenceMissing(effects::AdaptiveBodyEvidenceMissing),
    AdaptiveRunTerminalized(effects::AdaptiveRunTerminalized),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum EffectKind {
    RequestRuntimeBinding,
    SpawnProfileAuthorized,
    RequestRuntimeIngress,
    RequestPeerRuntimeIngress,
    SubmitWorkRejected,
    CancelAllWorkRejected,
    RequestRuntimeRetire,
    RequestRuntimeDestroy,
    PendingSpawnOperationOwnerAuthorized,
    RequestSessionIngressDetachForMobDestroy,
    AppendLifecycleJournal,
    AppendOperatorActionProvenance,
    EmitMemberLifecycleNotice,
    EmitRunLifecycleNotice,
    EmitFlowRunNotice,
    AppendFailureLedger,
    FlowTerminalized,
    FlowRunTerminal,
    FlowRunNonTerminal,
    FlowStepTerminal,
    FlowStepNonTerminal,
    FlowFrameTerminalStatusClassified,
    FlowFrameTerminalStatusUnavailable,
    FlowRunPublicResultClassified,
    EscalateSupervisor,
    NotifyCoordinator,
    ExposePendingSpawn,
    EmitMemberTerminalNotice,
    AdmitPeerInput,
    EmitProgressNote,
    PersistKickoffUpdate,
    PersistKickoffFailureUpdate,
    EmitKickoffLifecycleNotice,
    RequestKickoffQuiesce,
    RequestPendingSpawnQuiesceForDestroy,
    MemberAdmissionProbed,
    RespawnGenerationComputed,
    StepOutputFaultClassified,
    SupervisorEscalationRequested,
    SupervisorEscalationFailed,
    TopologyEdgeVerdictResolved,
    TurnTimeoutDispositionClassified,
    MemberSpawnRequired,
    MemberRetainRequired,
    MemberRetireRequired,
    SpawnPolicyResolutionRecorded,
    OwnerBridgeSessionBound,
    RespawnTopologyRestoreResolved,
    MemberLiveMaterializationClassified,
    SpawnManyFailureClassified,
    MemberWaitClassified,
    FlowDelegationEdgeAdmissionResolved,
    RemoteMemberRuntimeTerminalityClassified,
    SpawnMemberAdmissionResolved,
    CurrentMobAdmissionResolved,
    SpawnToolAdmissionResolved,
    CreateMobAdmissionResolved,
    ProfileMutationAdmissionResolved,
    MemberOperationEligibilityResolved,
    BridgeRejectionRecoveryClassified,
    PendingSupervisorAcceptanceClassified,
    FrameSeedConfirmed,
    WiringGraphChanged,
    MemberSessionBindingChanged,
    SessionProvisionOperationOwnerAuthorized,
    MemberTrustWiringRequested,
    MemberTrustUnwiringRequested,
    WiringTrustRepairRequested,
    ExternalPeerTrustWiringRequested,
    ExternalPeerTrustUnwiringRequested,
    ExternalPeerTrustRepairRequested,
    MemberPeerRegistered,
    MemberPeerRebindAuthorized,
    MemberPeerOverlayAuthorized,
    ExternalPeerReciprocalTrustRequested,
    PersistSupervisorAuthority,
    DeleteSupervisorAuthority,
    EmitWiringLifecycleNotice,
    EmitExternalPeerWiringLifecycleNotice,
    AuthorizeAgentEventSubscription,
    RejectAgentEventSubscription,
    AuthorizeAllAgentEventSubscription,
    RejectAllAgentEventSubscription,
    AuthorizeMobEventRouter,
    AuthorizeMobEventRouterMemberSubscription,
    AuthorizeMobEventRouterMemberRemoval,
    AuthorizeStructuralEventSubscription,
    RejectStructuralEventSubscription,
    AuthorizeStrictEventPoll,
    RejectStrictEventPoll,
    WorkIntentRecorded,
    ResourceClaimRecorded,
    WorkIntentStatusChanged,
    ResourceClaimStatusChanged,
    ResourceClaimOverlapObserved,
    AdaptiveRunInitialized,
    AdaptivePlanningDecisionRecorded,
    AdaptivePlanRejected,
    AdaptiveLayerAdmissionResolved,
    AdaptiveLayerProvisioned,
    AdaptiveLayerRunStarted,
    AdaptiveLayerTerminalIngested,
    AdaptiveLayerSetupFaultRecorded,
    AdaptiveLayerResultValidated,
    AdaptiveLayerResultInvalid,
    AdaptiveLayerCleanupObserved,
    AdaptiveCleanupResolved,
    AdaptiveBodyEvidenceMissing,
    AdaptiveRunTerminalized,
}

pub mod command_capabilities {
    mod private {
        #[derive(Debug, PartialEq, Eq)]
        pub struct Sealed;
    }

    #[derive(Debug, Clone, Copy, PartialEq, Eq)]
    pub enum CommandPlanKind {
        AuthorizedMobSpawnStart,
        CanStartSpawn,
        SpawnStarted,
        SpawnEffect,
        FailSpawn,
    }

    impl CommandPlanKind {
        #[must_use]
        pub const fn as_str(self) -> &'static str {
            match self {
                Self::AuthorizedMobSpawnStart => "AuthorizedMobSpawnStart",
                Self::CanStartSpawn => "CanStartSpawn",
                Self::SpawnStarted => "SpawnStarted",
                Self::SpawnEffect => "SpawnEffect",
                Self::FailSpawn => "FailSpawn",
            }
        }
    }

    #[must_use = "generated command capability `PendingSpawnOperationOwnerAuthorized` must be consumed by the shell action it authorizes"]
    #[derive(Debug, PartialEq, Eq)]
    pub struct PendingSpawnOperationOwnerAuthorized {
        _sealed: private::Sealed,
    }

    impl PendingSpawnOperationOwnerAuthorized {
        #[doc(hidden)]
        #[allow(dead_code)]
        pub(crate) fn mint_from_generated_command_plan() -> Self {
            Self {
                _sealed: private::Sealed,
            }
        }

        #[must_use]
        pub const fn plan(&self) -> CommandPlanKind {
            CommandPlanKind::AuthorizedMobSpawnStart
        }
    }

    #[must_use = "generated command capability `CanStartSpawn` must be consumed by the shell action it authorizes"]
    #[derive(Debug, PartialEq, Eq)]
    pub struct CanStartSpawn {
        _sealed: private::Sealed,
    }

    impl CanStartSpawn {
        #[doc(hidden)]
        #[allow(dead_code)]
        pub(crate) fn mint_from_generated_command_plan() -> Self {
            Self {
                _sealed: private::Sealed,
            }
        }

        #[must_use]
        pub const fn plan(&self) -> CommandPlanKind {
            CommandPlanKind::CanStartSpawn
        }
    }

    #[must_use = "generated command capability `SpawnStarted` must be consumed by the shell action it authorizes"]
    #[derive(Debug, PartialEq, Eq)]
    pub struct SpawnStarted {
        _sealed: private::Sealed,
    }

    impl SpawnStarted {
        #[doc(hidden)]
        #[allow(dead_code)]
        pub(crate) fn mint_from_generated_command_plan() -> Self {
            Self {
                _sealed: private::Sealed,
            }
        }

        #[must_use]
        pub const fn plan(&self) -> CommandPlanKind {
            CommandPlanKind::SpawnStarted
        }
    }

    #[must_use = "generated command capability `SpawnEffect` must be consumed by the shell action it authorizes"]
    #[derive(Debug, PartialEq, Eq)]
    pub struct SpawnEffect {
        _sealed: private::Sealed,
    }

    impl SpawnEffect {
        #[doc(hidden)]
        #[allow(dead_code)]
        pub(crate) fn mint_from_generated_command_plan() -> Self {
            Self {
                _sealed: private::Sealed,
            }
        }

        #[must_use]
        pub const fn plan(&self) -> CommandPlanKind {
            CommandPlanKind::SpawnEffect
        }
    }

    #[must_use = "generated command capability `FailSpawn` must be consumed by the shell action it authorizes"]
    #[derive(Debug, PartialEq, Eq)]
    pub struct FailSpawn {
        _sealed: private::Sealed,
    }

    impl FailSpawn {
        #[doc(hidden)]
        #[allow(dead_code)]
        pub(crate) fn mint_from_generated_command_plan() -> Self {
            Self {
                _sealed: private::Sealed,
            }
        }

        #[must_use]
        pub const fn plan(&self) -> CommandPlanKind {
            CommandPlanKind::FailSpawn
        }
    }
}

#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum TransitionId {
    ClassifyFlowRunTerminalityTerminalRunning,
    ClassifyFlowRunTerminalityNonTerminalRunning,
    ClassifyFlowStepTerminalityTerminalRunning,
    ClassifyFlowStepTerminalityNonTerminalRunning,
    ClassifyFlowFrameTerminalStatusFailedRunning,
    ClassifyFlowFrameTerminalStatusFailedStopped,
    ClassifyFlowFrameTerminalStatusFailedCompleted,
    ClassifyFlowFrameTerminalStatusCanceledRunning,
    ClassifyFlowFrameTerminalStatusCanceledStopped,
    ClassifyFlowFrameTerminalStatusCanceledCompleted,
    ClassifyFlowFrameTerminalStatusCompletedRunning,
    ClassifyFlowFrameTerminalStatusCompletedStopped,
    ClassifyFlowFrameTerminalStatusCompletedCompleted,
    ClassifyFlowFrameTerminalStatusUnavailableRunning,
    ClassifyFlowFrameTerminalStatusUnavailableStopped,
    ClassifyFlowFrameTerminalStatusUnavailableCompleted,
    ClassifyFlowRunPublicResultSuccessRunning,
    ClassifyFlowRunPublicResultFailureRunning,
    ClassifyMemberWaitRuntimeMaterialPresentRunning,
    ClassifyMemberWaitRuntimeMaterialPresentStopped,
    ClassifyMemberWaitRuntimeMaterialPresentCompleted,
    ClassifyMemberWaitRuntimeMaterialPresentDestroyed,
    ClassifyMemberWaitMissingRuntimeMaterialRunning,
    ClassifyMemberWaitMissingRuntimeMaterialStopped,
    ClassifyMemberWaitMissingRuntimeMaterialCompleted,
    ClassifyMemberWaitMissingRuntimeMaterialDestroyed,
    ResolveFlowDelegationEdgeAdmissionAllowedRunning,
    ResolveFlowDelegationEdgeAdmissionAllowedStopped,
    ResolveFlowDelegationEdgeAdmissionAllowedCompleted,
    ResolveFlowDelegationEdgeAdmissionAllowedDestroyed,
    ResolveFlowDelegationEdgeAdmissionDeniedStrictRunning,
    ResolveFlowDelegationEdgeAdmissionDeniedStrictStopped,
    ResolveFlowDelegationEdgeAdmissionDeniedStrictCompleted,
    ResolveFlowDelegationEdgeAdmissionDeniedStrictDestroyed,
    ResolveFlowDelegationEdgeAdmissionDeniedAdvisoryRunning,
    ResolveFlowDelegationEdgeAdmissionDeniedAdvisoryStopped,
    ResolveFlowDelegationEdgeAdmissionDeniedAdvisoryCompleted,
    ResolveFlowDelegationEdgeAdmissionDeniedAdvisoryDestroyed,
    ClassifyRemoteMemberRuntimeObservationTerminalRunning,
    ClassifyRemoteMemberRuntimeObservationTerminalStopped,
    ClassifyRemoteMemberRuntimeObservationTerminalCompleted,
    ClassifyRemoteMemberRuntimeObservationTerminalDestroyed,
    ClassifyRemoteMemberRuntimeObservationNonTerminalRunning,
    ClassifyRemoteMemberRuntimeObservationNonTerminalStopped,
    ClassifyRemoteMemberRuntimeObservationNonTerminalCompleted,
    ClassifyRemoteMemberRuntimeObservationNonTerminalDestroyed,
    ResolveSpawnMemberAdmissionManageScopeRunning,
    ResolveSpawnMemberAdmissionManageScopeStopped,
    ResolveSpawnMemberAdmissionManageScopeCompleted,
    ResolveSpawnMemberAdmissionManageScopeDestroyed,
    ResolveSpawnMemberAdmissionPrivilegedArgsDeniedRunning,
    ResolveSpawnMemberAdmissionPrivilegedArgsDeniedStopped,
    ResolveSpawnMemberAdmissionPrivilegedArgsDeniedCompleted,
    ResolveSpawnMemberAdmissionPrivilegedArgsDeniedDestroyed,
    ResolveSpawnMemberAdmissionProfileScopeRunning,
    ResolveSpawnMemberAdmissionProfileScopeStopped,
    ResolveSpawnMemberAdmissionProfileScopeCompleted,
    ResolveSpawnMemberAdmissionProfileScopeDestroyed,
    ResolveSpawnMemberAdmissionDeniedRunning,
    ResolveSpawnMemberAdmissionDeniedStopped,
    ResolveSpawnMemberAdmissionDeniedCompleted,
    ResolveSpawnMemberAdmissionDeniedDestroyed,
    ResolveCurrentMobAdmissionAllowedRunning,
    ResolveCurrentMobAdmissionAllowedStopped,
    ResolveCurrentMobAdmissionAllowedCompleted,
    ResolveCurrentMobAdmissionAllowedDestroyed,
    ResolveCurrentMobAdmissionDeniedRunning,
    ResolveCurrentMobAdmissionDeniedStopped,
    ResolveCurrentMobAdmissionDeniedCompleted,
    ResolveCurrentMobAdmissionDeniedDestroyed,
    ResolveSpawnToolAdmissionAllowedRunning,
    ResolveSpawnToolAdmissionAllowedStopped,
    ResolveSpawnToolAdmissionAllowedCompleted,
    ResolveSpawnToolAdmissionAllowedDestroyed,
    ResolveSpawnToolAdmissionDeniedRunning,
    ResolveSpawnToolAdmissionDeniedStopped,
    ResolveSpawnToolAdmissionDeniedCompleted,
    ResolveSpawnToolAdmissionDeniedDestroyed,
    ResolveCreateMobAdmissionAllowedRunning,
    ResolveCreateMobAdmissionAllowedStopped,
    ResolveCreateMobAdmissionAllowedCompleted,
    ResolveCreateMobAdmissionAllowedDestroyed,
    ResolveCreateMobAdmissionDeniedRunning,
    ResolveCreateMobAdmissionDeniedStopped,
    ResolveCreateMobAdmissionDeniedCompleted,
    ResolveCreateMobAdmissionDeniedDestroyed,
    InitializeAdaptiveRunRunningRunning,
    RecordAdaptivePlanningDecisionActiveRunning,
    RecordAdaptivePlanningDecisionPlanLimitRunning,
    RecordAdaptivePlanRejectedActiveRunning,
    RecordAdaptivePlanRejectedRepairLimitRunning,
    ResolveAdaptiveLayerAdmissionAllowedRunning,
    ResolveAdaptiveLayerAdmissionRejectedRunning,
    RecordAdaptiveLayerProvisionedRunning,
    RecordAdaptiveLayerRunStartedRunning,
    IngestAdaptiveLayerTerminalSuccessRunning,
    IngestAdaptiveLayerTerminalFailureRunning,
    RecordAdaptiveLayerSetupFaultRunning,
    RecordAdaptiveLayerResultValidatedRunning,
    RecordAdaptiveLayerResultInvalidRunning,
    RecordAdaptiveLayerMobDestroyedRunning,
    RecordAdaptiveLayerMobRetainedRunning,
    RecordAdaptiveLayerMobRetainedCleanupRequiredRunning,
    RecordAdaptiveCleanupResolvedRunning,
    RecordAdaptiveBodyEvidenceMissingRunning,
    ResolveAdaptiveFinishRunningRunning,
    RequestAdaptiveCancelRunningRunning,
    RecordAdaptiveDeadlineObservedExpiredRunning,
    ResolveProfileMutationAdmissionAllowedRunning,
    ResolveProfileMutationAdmissionAllowedStopped,
    ResolveProfileMutationAdmissionAllowedCompleted,
    ResolveProfileMutationAdmissionAllowedDestroyed,
    ResolveProfileMutationAdmissionDeniedRunning,
    ResolveProfileMutationAdmissionDeniedStopped,
    ResolveProfileMutationAdmissionDeniedCompleted,
    ResolveProfileMutationAdmissionDeniedDestroyed,
    ClassifyMemberOperationEligibilityAdmittedRunning,
    ClassifyMemberOperationEligibilityRunningDestroyDeniedRunning,
    ClassifyMemberOperationEligibilityNotRunningStopped,
    ClassifyMemberOperationEligibilityNotRunningCompleted,
    ClassifyMemberOperationEligibilityNotRunningDestroyed,
    ClassifyBridgeRejectionRecoveryRebindRunning,
    ClassifyBridgeRejectionRecoveryRebindStopped,
    ClassifyBridgeRejectionRecoveryRebindCompleted,
    ClassifyBridgeRejectionRecoveryRebindDestroyed,
    ClassifyBridgeRejectionRecoveryFatalRunning,
    ClassifyBridgeRejectionRecoveryFatalStopped,
    ClassifyBridgeRejectionRecoveryFatalCompleted,
    ClassifyBridgeRejectionRecoveryFatalDestroyed,
    ClassifyPendingSupervisorAcceptanceNotConfirmedRunning,
    ClassifyPendingSupervisorAcceptanceNotConfirmedStopped,
    ClassifyPendingSupervisorAcceptanceNotConfirmedCompleted,
    ClassifyPendingSupervisorAcceptanceNotConfirmedDestroyed,
    ClassifyPendingSupervisorAcceptanceStaleRunning,
    ClassifyPendingSupervisorAcceptanceStaleStopped,
    ClassifyPendingSupervisorAcceptanceStaleCompleted,
    ClassifyPendingSupervisorAcceptanceStaleDestroyed,
    ClassifyPendingSupervisorAcceptanceFatalRunning,
    ClassifyPendingSupervisorAcceptanceFatalStopped,
    ClassifyPendingSupervisorAcceptanceFatalCompleted,
    ClassifyPendingSupervisorAcceptanceFatalDestroyed,
    ClassifySpawnManyFailureProfileNotFoundRunning,
    ClassifySpawnManyFailureProfileNotFoundStopped,
    ClassifySpawnManyFailureProfileNotFoundCompleted,
    ClassifySpawnManyFailureProfileNotFoundDestroyed,
    ClassifySpawnManyFailureMemberNotFoundRunning,
    ClassifySpawnManyFailureMemberNotFoundStopped,
    ClassifySpawnManyFailureMemberNotFoundCompleted,
    ClassifySpawnManyFailureMemberNotFoundDestroyed,
    ClassifySpawnManyFailureMemberAlreadyExistsRunning,
    ClassifySpawnManyFailureMemberAlreadyExistsStopped,
    ClassifySpawnManyFailureMemberAlreadyExistsCompleted,
    ClassifySpawnManyFailureMemberAlreadyExistsDestroyed,
    ClassifySpawnManyFailureNotExternallyAddressableRunning,
    ClassifySpawnManyFailureNotExternallyAddressableStopped,
    ClassifySpawnManyFailureNotExternallyAddressableCompleted,
    ClassifySpawnManyFailureNotExternallyAddressableDestroyed,
    ClassifySpawnManyFailureInvalidTransitionRunning,
    ClassifySpawnManyFailureInvalidTransitionStopped,
    ClassifySpawnManyFailureInvalidTransitionCompleted,
    ClassifySpawnManyFailureInvalidTransitionDestroyed,
    ClassifySpawnManyFailureWiringErrorRunning,
    ClassifySpawnManyFailureWiringErrorStopped,
    ClassifySpawnManyFailureWiringErrorCompleted,
    ClassifySpawnManyFailureWiringErrorDestroyed,
    ClassifySpawnManyFailureBridgeCommandRejectedRunning,
    ClassifySpawnManyFailureBridgeCommandRejectedStopped,
    ClassifySpawnManyFailureBridgeCommandRejectedCompleted,
    ClassifySpawnManyFailureBridgeCommandRejectedDestroyed,
    ClassifySpawnManyFailureMemberRestoreFailedRunning,
    ClassifySpawnManyFailureMemberRestoreFailedStopped,
    ClassifySpawnManyFailureMemberRestoreFailedCompleted,
    ClassifySpawnManyFailureMemberRestoreFailedDestroyed,
    ClassifySpawnManyFailureKickoffWaitTimedOutRunning,
    ClassifySpawnManyFailureKickoffWaitTimedOutStopped,
    ClassifySpawnManyFailureKickoffWaitTimedOutCompleted,
    ClassifySpawnManyFailureKickoffWaitTimedOutDestroyed,
    ClassifySpawnManyFailureReadyWaitTimedOutRunning,
    ClassifySpawnManyFailureReadyWaitTimedOutStopped,
    ClassifySpawnManyFailureReadyWaitTimedOutCompleted,
    ClassifySpawnManyFailureReadyWaitTimedOutDestroyed,
    ClassifySpawnManyFailureDefinitionErrorRunning,
    ClassifySpawnManyFailureDefinitionErrorStopped,
    ClassifySpawnManyFailureDefinitionErrorCompleted,
    ClassifySpawnManyFailureDefinitionErrorDestroyed,
    ClassifySpawnManyFailureFlowNotFoundRunning,
    ClassifySpawnManyFailureFlowNotFoundStopped,
    ClassifySpawnManyFailureFlowNotFoundCompleted,
    ClassifySpawnManyFailureFlowNotFoundDestroyed,
    ClassifySpawnManyFailureFlowFailedRunning,
    ClassifySpawnManyFailureFlowFailedStopped,
    ClassifySpawnManyFailureFlowFailedCompleted,
    ClassifySpawnManyFailureFlowFailedDestroyed,
    ClassifySpawnManyFailureRunNotFoundRunning,
    ClassifySpawnManyFailureRunNotFoundStopped,
    ClassifySpawnManyFailureRunNotFoundCompleted,
    ClassifySpawnManyFailureRunNotFoundDestroyed,
    ClassifySpawnManyFailureRunCanceledRunning,
    ClassifySpawnManyFailureRunCanceledStopped,
    ClassifySpawnManyFailureRunCanceledCompleted,
    ClassifySpawnManyFailureRunCanceledDestroyed,
    ClassifySpawnManyFailureFlowTurnTimedOutRunning,
    ClassifySpawnManyFailureFlowTurnTimedOutStopped,
    ClassifySpawnManyFailureFlowTurnTimedOutCompleted,
    ClassifySpawnManyFailureFlowTurnTimedOutDestroyed,
    ClassifySpawnManyFailureFrameDepthLimitExceededRunning,
    ClassifySpawnManyFailureFrameDepthLimitExceededStopped,
    ClassifySpawnManyFailureFrameDepthLimitExceededCompleted,
    ClassifySpawnManyFailureFrameDepthLimitExceededDestroyed,
    ClassifySpawnManyFailureFrameAtomicPersistenceUnavailableRunning,
    ClassifySpawnManyFailureFrameAtomicPersistenceUnavailableStopped,
    ClassifySpawnManyFailureFrameAtomicPersistenceUnavailableCompleted,
    ClassifySpawnManyFailureFrameAtomicPersistenceUnavailableDestroyed,
    ClassifySpawnManyFailureSpecRevisionConflictRunning,
    ClassifySpawnManyFailureSpecRevisionConflictStopped,
    ClassifySpawnManyFailureSpecRevisionConflictCompleted,
    ClassifySpawnManyFailureSpecRevisionConflictDestroyed,
    ClassifySpawnManyFailureSchemaValidationRunning,
    ClassifySpawnManyFailureSchemaValidationStopped,
    ClassifySpawnManyFailureSchemaValidationCompleted,
    ClassifySpawnManyFailureSchemaValidationDestroyed,
    ClassifySpawnManyFailureInsufficientTargetsRunning,
    ClassifySpawnManyFailureInsufficientTargetsStopped,
    ClassifySpawnManyFailureInsufficientTargetsCompleted,
    ClassifySpawnManyFailureInsufficientTargetsDestroyed,
    ClassifySpawnManyFailureTopologyViolationRunning,
    ClassifySpawnManyFailureTopologyViolationStopped,
    ClassifySpawnManyFailureTopologyViolationCompleted,
    ClassifySpawnManyFailureTopologyViolationDestroyed,
    ClassifySpawnManyFailureBridgeDeliveryRejectedRunning,
    ClassifySpawnManyFailureBridgeDeliveryRejectedStopped,
    ClassifySpawnManyFailureBridgeDeliveryRejectedCompleted,
    ClassifySpawnManyFailureBridgeDeliveryRejectedDestroyed,
    ClassifySpawnManyFailureSupervisorEscalationRunning,
    ClassifySpawnManyFailureSupervisorEscalationStopped,
    ClassifySpawnManyFailureSupervisorEscalationCompleted,
    ClassifySpawnManyFailureSupervisorEscalationDestroyed,
    ClassifySpawnManyFailureUnsupportedForModeRunning,
    ClassifySpawnManyFailureUnsupportedForModeStopped,
    ClassifySpawnManyFailureUnsupportedForModeCompleted,
    ClassifySpawnManyFailureUnsupportedForModeDestroyed,
    ClassifySpawnManyFailureMissingMemberCapabilityRunning,
    ClassifySpawnManyFailureMissingMemberCapabilityStopped,
    ClassifySpawnManyFailureMissingMemberCapabilityCompleted,
    ClassifySpawnManyFailureMissingMemberCapabilityDestroyed,
    ClassifySpawnManyFailureResetBarrierRunning,
    ClassifySpawnManyFailureResetBarrierStopped,
    ClassifySpawnManyFailureResetBarrierCompleted,
    ClassifySpawnManyFailureResetBarrierDestroyed,
    ClassifySpawnManyFailureStorageErrorRunning,
    ClassifySpawnManyFailureStorageErrorStopped,
    ClassifySpawnManyFailureStorageErrorCompleted,
    ClassifySpawnManyFailureStorageErrorDestroyed,
    ClassifySpawnManyFailureSessionErrorRunning,
    ClassifySpawnManyFailureSessionErrorStopped,
    ClassifySpawnManyFailureSessionErrorCompleted,
    ClassifySpawnManyFailureSessionErrorDestroyed,
    ClassifySpawnManyFailureCommsErrorRunning,
    ClassifySpawnManyFailureCommsErrorStopped,
    ClassifySpawnManyFailureCommsErrorCompleted,
    ClassifySpawnManyFailureCommsErrorDestroyed,
    ClassifySpawnManyFailureCallbackPendingRunning,
    ClassifySpawnManyFailureCallbackPendingStopped,
    ClassifySpawnManyFailureCallbackPendingCompleted,
    ClassifySpawnManyFailureCallbackPendingDestroyed,
    ClassifySpawnManyFailureStaleFenceTokenRunning,
    ClassifySpawnManyFailureStaleFenceTokenStopped,
    ClassifySpawnManyFailureStaleFenceTokenCompleted,
    ClassifySpawnManyFailureStaleFenceTokenDestroyed,
    ClassifySpawnManyFailureStaleEventCursorRunning,
    ClassifySpawnManyFailureStaleEventCursorStopped,
    ClassifySpawnManyFailureStaleEventCursorCompleted,
    ClassifySpawnManyFailureStaleEventCursorDestroyed,
    ClassifySpawnManyFailureWorkNotFoundRunning,
    ClassifySpawnManyFailureWorkNotFoundStopped,
    ClassifySpawnManyFailureWorkNotFoundCompleted,
    ClassifySpawnManyFailureWorkNotFoundDestroyed,
    ClassifySpawnManyFailureInternalRunning,
    ClassifySpawnManyFailureInternalStopped,
    ClassifySpawnManyFailureInternalCompleted,
    ClassifySpawnManyFailureInternalDestroyed,
    CommitSpawnMembershipFresh,
    CommitSpawnMembershipFreshPeerOnly,
    CommitSpawnMembershipReplacing,
    BeginSpawnExecFresh,
    BeginSpawnExecFreshPeerOnly,
    BeginSpawnExecReplacing,
    CommitSpawnActivationFinalRunning,
    CommitSpawnActivationFinalStopped,
    CommitSpawnActivationFinalCompleted,
    CommitSpawnActivationLateArrivalRunning,
    CommitSpawnActivationLateArrivalStopped,
    CommitSpawnActivationLateArrivalCompleted,
    CommitSpawnActivationDestroyed,
    AbortSpawnExecActiveRunning,
    AbortSpawnExecActiveStopped,
    AbortSpawnExecActiveCompleted,
    AbortSpawnExecLateArrivalRunning,
    AbortSpawnExecLateArrivalStopped,
    AbortSpawnExecLateArrivalCompleted,
    AbortSpawnExecDestroyed,
    AuthorizeSpawnProfileRunning,
    EnsureMemberRunningExisting,
    EnsureMemberRunningMissing,
    RecoverRosterMemberRunning,
    RecoverRosterMemberAddressabilityRunning,
    RecoverMemberSessionBindingFreshRunning,
    RecoverMemberSessionBindingReplacingRunning,
    RecoverMemberSessionBindingAlreadyCurrentRunning,
    RecoverRosterMemberResetRunning,
    RecoverRosterMemberRetiredRunning,
    RecoverRosterMemberRetiredAlreadyAbsent,
    RecoverMemberKickoffPending,
    RecoverMemberKickoffStarting,
    RecoverMemberKickoffCallbackPending,
    RecoverMemberKickoffStarted,
    RecoverMemberKickoffFailed,
    RecoverMemberKickoffCancelled,
    ReconcileRunning,
    ReconcileStopped,
    ReconcileCompleted,
    ReconcileDestroyed,
    ObserveRuntimeReady,
    StartupMarkReadyRunning,
    StartupMarkReadyStopped,
    StartupMarkReadyCompleted,
    KickoffMarkPendingRunning,
    KickoffMarkPendingStopped,
    KickoffMarkPendingCompleted,
    KickoffMarkStartingRunning,
    KickoffMarkStartingStopped,
    KickoffMarkStartingCompleted,
    KickoffResolveStartedRunning,
    KickoffResolveStartedStopped,
    KickoffResolveStartedCompleted,
    KickoffResolveCallbackPendingRunning,
    KickoffResolveCallbackPendingStopped,
    KickoffResolveCallbackPendingCompleted,
    KickoffResolveFailedFromStartingRunning,
    KickoffResolveFailedFromStartingStopped,
    KickoffResolveFailedFromStartingCompleted,
    KickoffCancelRequestedRunning,
    KickoffCancelRequestedStopped,
    KickoffCancelRequestedCompleted,
    KickoffClearRunning,
    KickoffClearStopped,
    KickoffClearCompleted,
    KickoffQuiescedInFlightRunning,
    KickoffQuiescedInFlightStopped,
    KickoffQuiescedInFlightCompleted,
    KickoffQuiescedIdleRunning,
    KickoffQuiescedIdleStopped,
    KickoffQuiescedIdleCompleted,
    KickoffQuiescedDestroyed,
    KickoffResolveStartedLateArrivalRunning,
    KickoffResolveStartedLateArrivalStopped,
    KickoffResolveStartedLateArrivalCompleted,
    KickoffResolveStartedDestroyed,
    KickoffResolveCallbackPendingLateArrivalRunning,
    KickoffResolveCallbackPendingLateArrivalStopped,
    KickoffResolveCallbackPendingLateArrivalCompleted,
    KickoffResolveCallbackPendingDestroyed,
    KickoffResolveFailedLateArrivalRunning,
    KickoffResolveFailedLateArrivalStopped,
    KickoffResolveFailedLateArrivalCompleted,
    KickoffResolveFailedDestroyed,
    KickoffCancelRequestedLateArrivalRunning,
    KickoffCancelRequestedLateArrivalStopped,
    KickoffCancelRequestedLateArrivalCompleted,
    KickoffCancelRequestedDestroyed,
    ProbeMemberAdmissionDuplicateRunning,
    ProbeMemberAdmissionDuplicateStopped,
    ProbeMemberAdmissionDuplicateCompleted,
    ProbeMemberAdmissionDuplicateDestroyed,
    ProbeMemberAdmissionAdmittedRunning,
    ProbeMemberAdmissionAdmittedStopped,
    ProbeMemberAdmissionAdmittedCompleted,
    ProbeMemberAdmissionAdmittedDestroyed,
    ComputeRespawnGenerationRunning,
    ComputeRespawnGenerationStopped,
    ComputeRespawnGenerationCompleted,
    ComputeRespawnGenerationDestroyed,
    ClassifyStepOutputFaultRetryRunning,
    ClassifyStepOutputFaultRetryStopped,
    ClassifyStepOutputFaultRetryCompleted,
    ClassifyStepOutputFaultRetryDestroyed,
    ClassifyStepOutputFaultTerminalRunning,
    ClassifyStepOutputFaultTerminalStopped,
    ClassifyStepOutputFaultTerminalCompleted,
    ClassifyStepOutputFaultTerminalDestroyed,
    EscalateToSupervisorTargetFoundRunning,
    EscalateToSupervisorTargetFoundStopped,
    EscalateToSupervisorTargetFoundCompleted,
    EscalateToSupervisorTargetFoundDestroyed,
    EscalateToSupervisorTargetMissingRunning,
    EscalateToSupervisorTargetMissingStopped,
    EscalateToSupervisorTargetMissingCompleted,
    EscalateToSupervisorTargetMissingDestroyed,
    EvaluateTopologyEdgeRuleAllowRunning,
    EvaluateTopologyEdgeRuleAllowStopped,
    EvaluateTopologyEdgeRuleAllowCompleted,
    EvaluateTopologyEdgeRuleAllowDestroyed,
    EvaluateTopologyEdgeRuleDenyRunning,
    EvaluateTopologyEdgeRuleDenyStopped,
    EvaluateTopologyEdgeRuleDenyCompleted,
    EvaluateTopologyEdgeRuleDenyDestroyed,
    EvaluateTopologyEdgeDefaultAllowRunning,
    EvaluateTopologyEdgeDefaultAllowStopped,
    EvaluateTopologyEdgeDefaultAllowCompleted,
    EvaluateTopologyEdgeDefaultAllowDestroyed,
    EvaluateTopologyEdgeDefaultDenyRunning,
    EvaluateTopologyEdgeDefaultDenyStopped,
    EvaluateTopologyEdgeDefaultDenyCompleted,
    EvaluateTopologyEdgeDefaultDenyDestroyed,
    SetExternalMemberRebindCapabilityRunning,
    SetExternalMemberRebindCapabilityStopped,
    SetExternalMemberRebindCapabilityCompleted,
    SetExternalMemberRebindCapabilityDestroyed,
    SeedOrphanBudgetRunning,
    SeedOrphanBudgetStopped,
    SeedOrphanBudgetCompleted,
    SeedOrphanBudgetDestroyed,
    ClassifyTurnTimeoutDispositionRetryableRunning,
    ClassifyTurnTimeoutDispositionRetryableStopped,
    ClassifyTurnTimeoutDispositionRetryableCompleted,
    ClassifyTurnTimeoutDispositionRetryableDestroyed,
    ClassifyTurnTimeoutDispositionDetachedRunning,
    ClassifyTurnTimeoutDispositionDetachedStopped,
    ClassifyTurnTimeoutDispositionDetachedCompleted,
    ClassifyTurnTimeoutDispositionDetachedDestroyed,
    ClassifyTurnTimeoutDispositionCanceledRunning,
    ClassifyTurnTimeoutDispositionCanceledStopped,
    ClassifyTurnTimeoutDispositionCanceledCompleted,
    ClassifyTurnTimeoutDispositionCanceledDestroyed,
    SubmitWorkRunningExternal,
    SubmitWorkRunningExternalPeerOnly,
    SubmitWorkRunningInternal,
    SubmitWorkRunningInternalPeerOnly,
    ResolveSubmitWorkRejectionStopped,
    ResolveSubmitWorkRejectionCompleted,
    ResolveSubmitWorkRejectionDestroyed,
    ResolveSubmitWorkRejectionMemberNotFound,
    ResolveSubmitWorkRejectionCurrentRuntimeNotLive,
    ResolveSubmitWorkRejectionStaleFenceToken,
    ResolveSubmitWorkRejectionRetiringAsMemberNotFound,
    ResolveSubmitWorkRejectionNotExternallyAddressable,
    ResolveSubmitWorkRejectionPeerOnlyNotExternallyAddressable,
    RetireMember,
    RetireMemberPeerOnly,
    AdmitDestroyMemberRetireLiveRunning,
    AdmitDestroyMemberRetireLiveStopped,
    AdmitDestroyMemberRetirePeerOnlyRunning,
    AdmitDestroyMemberRetirePeerOnlyStopped,
    AdmitDestroyMemberRetireAlreadyRetiringRunning,
    AdmitDestroyMemberRetireAlreadyRetiringStopped,
    ObserveRuntimeRetired,
    ObserveMemberRetirementArchivedLive,
    ObserveMemberRetirementArchivedLiveStopped,
    ObserveMemberRetirementArchivedRetired,
    ObserveMemberRetirementArchivedRetiredStopped,
    ObserveMemberRetirementArchivedStaleRuntime,
    ObserveMemberRetirementArchivedStaleRuntimeStopped,
    ObserveMemberRetirementArchivedAlreadyCleared,
    ObserveMemberRetirementArchivedAlreadyClearedStopped,
    ObserveDestroyMemberRetirementArchivedLiveRunning,
    ObserveDestroyMemberRetirementArchivedLiveStopped,
    ObserveDestroyMemberRetirementArchivedRetiredRunning,
    ObserveDestroyMemberRetirementArchivedRetiredStopped,
    ResetMember,
    RespawnMember,
    ResolveRespawnTopologyRestoreCompleted,
    ResolveRespawnTopologyRestoreFailed,
    RecoverMemberRestoreFailureRunning,
    ClassifyMemberLiveMaterializationRevivable,
    ClassifyMemberLiveMaterializationTerminal,
    ResolveMemberRevivalSucceededRunning,
    ResolveMemberRevivalFailedRunning,
    AdmitDestroyCleanup,
    AdmitDestroyStorageFinalizing,
    MarkCompleted,
    DestroyMob,
    ObserveRuntimeDestroyed,
    RecordOperatorActionProvenanceRunning,
    RecordOperatorActionProvenanceStopped,
    RecordOperatorActionProvenanceCompleted,
    RecordOperatorActionProvenanceDestroyed,
    SetSpawnPolicyRunning,
    SetSpawnPolicyStopped,
    SetSpawnPolicyCompleted,
    SetSpawnPolicyDestroyed,
    ResolveSpawnPolicyAdmitted,
    ResolveSpawnPolicyNoMatch,
    BindOwnerBridgeSessionRunning,
    RecoverOwnerBridgeSessionRunning,
    RecoverOwnerBridgeSessionAlreadyCurrent,
    StopRunning,
    ResumeStopped,
    CompleteRunning,
    ResetToRunning,
    WireMembersRunning,
    WireMembersWithTrustRunning,
    WireMembersWithTrustAlreadyWired,
    WireMembersAlreadyWired,
    RecoverRosterWiringRunning,
    RecoverRosterWiringAlreadyRecovered,
    RecoverRosterUnwireRunning,
    RecoverRosterUnwireAlreadyAbsent,
    UnwireMembersRunning,
    UnwireMembersAlreadyAbsent,
    WireExternalPeerRunning,
    WireExternalPeerAlreadyWired,
    RegisterMemberPeerRunning,
    AuthorizeMemberPeerRebindRunning,
    AuthorizeMemberPeerOverlayRunning,
    AuthorizeMemberTrustWiringRunning,
    AuthorizeMemberTrustUnwiringRunning,
    AuthorizeMemberTrustCleanupRunning,
    AuthorizeMemberTrustCleanupObservedRunning,
    AuthorizeExternalPeerReciprocalTrustRunning,
    RecoverExternalPeerWiringRunning,
    RecoverExternalPeerWiringAlreadyRecovered,
    RecoverExternalPeerUnwireRunning,
    RecoverExternalPeerUnwireAlreadyAbsent,
    UnwireExternalPeerRunning,
    UnwireExternalPeerAlreadyAbsent,
    ProvisionSupervisorAuthorityRunning,
    ProvisionSupervisorAuthorityStopped,
    ProvisionSupervisorAuthorityCompleted,
    ProvisionSupervisorAuthorityDestroyed,
    RecoverSupervisorAuthorityRunning,
    RecoverSupervisorAuthorityStopped,
    RecoverSupervisorAuthorityCompleted,
    RecoverSupervisorAuthorityDestroyed,
    ClearSupervisorPendingRotationRunning,
    ClearSupervisorPendingRotationStopped,
    ClearSupervisorPendingRotationCompleted,
    RecordSupervisorPendingRotationRunning,
    RecordSupervisorPendingRotationStopped,
    RecordSupervisorPendingRotationCompleted,
    RecordPendingRecipientTrustRunning,
    RecordPendingRecipientTrustStopped,
    RecordPendingRecipientTrustCompleted,
    RecordPendingRecipientTrustDestroyed,
    ResolvePendingRecipientTrustRunning,
    ResolvePendingRecipientTrustStopped,
    ResolvePendingRecipientTrustCompleted,
    ResolvePendingRecipientTrustDestroyed,
    RollbackPendingRecipientTrustRunning,
    RollbackPendingRecipientTrustStopped,
    RollbackPendingRecipientTrustCompleted,
    RollbackPendingRecipientTrustDestroyed,
    CommitSupervisorRotationRunning,
    CommitSupervisorRotationStopped,
    CommitSupervisorRotationCompleted,
    ClearSupervisorAuthorityForDestroy,
    RestoreSupervisorAuthorityAfterDestroyRollback,
    ForceCancelRunning,
    SubscribeAgentEventsRunning,
    SubscribeAgentEventsStopped,
    SubscribeAgentEventsCompleted,
    SubscribeAgentEventsDestroyed,
    SubscribeAgentEventsMissingMemberRunning,
    SubscribeAgentEventsMissingMemberStopped,
    SubscribeAgentEventsMissingMemberCompleted,
    SubscribeAgentEventsMissingMemberDestroyed,
    SubscribeAgentEventsMissingSessionRunning,
    SubscribeAgentEventsMissingSessionStopped,
    SubscribeAgentEventsMissingSessionCompleted,
    SubscribeAgentEventsMissingSessionDestroyed,
    SubscribeAgentEventsRuntimeNotLiveRunning,
    SubscribeAgentEventsRuntimeNotLiveStopped,
    SubscribeAgentEventsRuntimeNotLiveCompleted,
    SubscribeAgentEventsRuntimeNotLiveDestroyed,
    SubscribeAllAgentEventsRunning,
    SubscribeAllAgentEventsStopped,
    SubscribeAllAgentEventsCompleted,
    SubscribeAllAgentEventsDestroyed,
    SubscribeAllAgentEventsNoSessionBindingsRunning,
    SubscribeAllAgentEventsNoSessionBindingsStopped,
    SubscribeAllAgentEventsNoSessionBindingsCompleted,
    SubscribeAllAgentEventsNoSessionBindingsDestroyed,
    SubscribeMobEventsRunning,
    SubscribeMobEventsStopped,
    SubscribeMobEventsCompleted,
    SubscribeMobEventsDestroyed,
    SubscribeStructuralEventsRunning,
    SubscribeStructuralEventsStopped,
    SubscribeStructuralEventsCompleted,
    SubscribeStructuralEventsDestroyed,
    SubscribeStructuralEventsStaleRunning,
    SubscribeStructuralEventsStaleStopped,
    SubscribeStructuralEventsStaleCompleted,
    SubscribeStructuralEventsStaleDestroyed,
    PollEventsStrictRunning,
    PollEventsStrictStopped,
    PollEventsStrictCompleted,
    PollEventsStrictDestroyed,
    PollEventsStrictStaleRunning,
    PollEventsStrictStaleStopped,
    PollEventsStrictStaleCompleted,
    PollEventsStrictStaleDestroyed,
    AuthorizeMobEventRouterMemberSubscriptionRunning,
    AuthorizeMobEventRouterMemberSubscriptionStopped,
    AuthorizeMobEventRouterMemberSubscriptionCompleted,
    AuthorizeMobEventRouterMemberSubscriptionDestroyed,
    AuthorizeMobEventRouterMemberRemovalMissingRunning,
    AuthorizeMobEventRouterMemberRemovalMissingStopped,
    AuthorizeMobEventRouterMemberRemovalMissingCompleted,
    AuthorizeMobEventRouterMemberRemovalMissingDestroyed,
    AuthorizeMobEventRouterMemberRemovalUnboundRunning,
    AuthorizeMobEventRouterMemberRemovalUnboundStopped,
    AuthorizeMobEventRouterMemberRemovalUnboundCompleted,
    AuthorizeMobEventRouterMemberRemovalUnboundDestroyed,
    AuthorizeMobEventRouterMemberRemovalRuntimeNotLiveRunning,
    AuthorizeMobEventRouterMemberRemovalRuntimeNotLiveStopped,
    AuthorizeMobEventRouterMemberRemovalRuntimeNotLiveCompleted,
    AuthorizeMobEventRouterMemberRemovalRuntimeNotLiveDestroyed,
    ShutdownRunning,
    ShutdownStopped,
    ShutdownCompleted,
    CancelFlowRunning,
    InitializeOrchestratorRunning,
    BindCoordinatorRunning,
    UnbindCoordinatorRunning,
    StageSpawnRunning,
    StopOrchestratorRunning,
    StopOrchestratorStopped,
    StopOrchestratorCompleted,
    ResumeOrchestratorRunning,
    ResumeOrchestratorStopped,
    ResumeOrchestratorCompleted,
    DestroyOrchestratorRunning,
    DestroyOrchestratorStopped,
    DestroyOrchestratorCompleted,
    ForceCancelMemberRunning,
    MemberPeerExposedRunning,
    MemberTerminalizedRunning,
    OperationPeerTrustedRunning,
    PeerInputAdmittedRunning,
    BeginCleanupStopped,
    BeginCleanupCompleted,
    FinishCleanupStopped,
    FinishCleanupCompleted,
    RunFlowRunning,
    CreateRunSeedRunning,
    CreateFrameSeedRunning,
    CreateFrameSeedAlreadySeededRunning,
    CreateFrameSeedAlreadySeededStopped,
    CreateFrameSeedAlreadySeededCompleted,
    CreateFrameSeedAlreadySeededDestroyed,
    CreateLoopSeedRunning,
    RecordLoopBodyFrameCompletedRunning,
    RecordLoopUntilConditionMetRunning,
    RecordLoopUntilConditionFailedRunning,
    RecordLoopUntilConditionFailedExhausted,
    AuthorizeFlowRunReducerCommandStartRun,
    AuthorizeFlowRunReducerCommandDispatchStep,
    AuthorizeFlowRunReducerCommandCompleteStep,
    AuthorizeFlowRunReducerCommandRecordStepOutput,
    AuthorizeFlowRunReducerCommandConditionPassed,
    AuthorizeFlowRunReducerCommandConditionRejected,
    AuthorizeFlowRunReducerCommandFailStep,
    AuthorizeFlowRunReducerCommandFailStepEscalating,
    AuthorizeFlowRunReducerCommandSkipStep,
    AuthorizeFlowRunReducerCommandProjectFrameStepStatus,
    AuthorizeFlowRunReducerCommandProjectFrameStepStatusFailed,
    AuthorizeFlowRunReducerCommandProjectFrameStepStatusFailedEscalating,
    AuthorizeFlowRunReducerCommandCancelStep,
    AuthorizeFlowRunReducerCommandRegisterTargets,
    AuthorizeFlowRunReducerCommandRecordTargetSuccess,
    AuthorizeFlowRunReducerCommandRecordTargetTerminalFailure,
    AuthorizeFlowRunReducerCommandRecordTargetCanceled,
    AuthorizeFlowRunReducerCommandRecordTargetFailure,
    AuthorizeFlowRunReducerCommandRegisterReadyFrame,
    AuthorizeFlowRunReducerCommandRegisterReadyFrameAlreadyReady,
    AuthorizeFlowRunReducerCommandPumpNodeScheduler,
    AuthorizeFlowRunReducerCommandRegisterPendingBodyFrame,
    AuthorizeFlowRunReducerCommandPumpFrameScheduler,
    AuthorizeFlowRunReducerCommandNodeExecutionReleased,
    AuthorizeFlowRunReducerCommandFrameTerminated,
    AuthorizeFlowRunReducerCommandFrameTerminatedNoActiveFrame,
    AuthorizeFlowRunReducerCommandTerminalCompleted,
    AuthorizeFlowRunReducerCommandTerminalFailed,
    AuthorizeFlowRunReducerCommandTerminalCanceled,
    AuthorizeFlowFrameReducerCommandAdmitNextReadyNode,
    AuthorizeFlowFrameReducerCommandCompleteNode,
    AuthorizeFlowFrameReducerCommandRecordNodeOutput,
    AuthorizeFlowFrameReducerCommandFailNode,
    AuthorizeFlowFrameReducerCommandSkipNode,
    AuthorizeFlowFrameReducerCommandCancelNode,
    AuthorizeFlowFrameReducerCommandSealFrameRunning,
    AuthorizeFlowFrameReducerCommandSealFrameStopped,
    AuthorizeFlowFrameReducerCommandSealFrameCompleted,
    AuthorizeLoopIterationReducerCommandBodyFrameStarted,
    AuthorizeLoopIterationReducerCommandBodyFrameCompleted,
    AuthorizeLoopIterationReducerCommandBodyFrameFailed,
    AuthorizeLoopIterationReducerCommandBodyFrameCanceled,
    AuthorizeLoopIterationReducerCommandUntilFeedback,
    AuthorizeLoopIterationReducerCommandCancelLoop,
    StartFlowRunning,
    CreateRunRunning,
    StartRunRunning,
    CompleteFlowRunning,
    CompleteFlowRunningZero,
    FinishRunRunning,
    FinishRunRunningZero,
    RetireRunningReleasing,
    RetireRunningPreservingBinding,
    RetireRunningNoBinding,
    RetireStoppedReleasing,
    RequestPendingSessionIngressDetachForMobDestroyRunning,
    RequestPendingSessionIngressDetachForMobDestroyStopped,
    SessionIngressDetachedForMobDestroyRunning,
    SessionIngressDetachedForMobDestroyStopped,
    SessionIngressDetachFailedForMobDestroyRunning,
    SessionIngressDetachFailedForMobDestroyStopped,
    RetireStoppedPreservingBinding,
    RetireStoppedNoBinding,
    RetireAbsentRunning,
    RetireAbsentStopped,
    RetireAllRunning,
    RetireAllStopped,
    RetireAllCompleted,
    CompleteSpawnRunning,
    CompleteSpawnLateArrivalRunning,
    CompleteSpawnLateArrivalStopped,
    CompleteSpawnLateArrivalCompleted,
    CompleteSpawnDestroyed,
    CancelPendingSpawnPresentRunning,
    CancelPendingSpawnPresentStopped,
    CancelPendingSpawnPresentCompleted,
    CancelPendingSpawnAbsentRunning,
    CancelPendingSpawnAbsentStopped,
    CancelPendingSpawnAbsentCompleted,
    CancelPendingSpawnDestroyed,
    DestroyFromAny,
    RespawnRunning,
    CancelAllWorkRunning,
    ResolveCancelAllWorkRejectionStopped,
    ResolveCancelAllWorkRejectionCompleted,
    ResolveCancelAllWorkRejectionDestroyed,
    ResolveCancelAllWorkRejectionMemberNotFound,
    ResolveCancelAllWorkRejectionCurrentRuntimeNotLive,
    ResolveCancelAllWorkRejectionStaleFenceToken,
    RecordCoordinationWorkIntent,
    RecordCoordinationResourceClaim,
    UpdateCoordinationWorkIntentPlanned,
    UpdateCoordinationWorkIntentActive,
    UpdateCoordinationWorkIntentBlocked,
    UpdateCoordinationWorkIntentCompleted,
    UpdateCoordinationWorkIntentCancelled,
    UpdateCoordinationResourceClaimActive,
    UpdateCoordinationResourceClaimReleased,
    UpdateCoordinationResourceClaimExpired,
    UpdateCoordinationResourceClaimCancelled,
    ObserveCoordinationResourceClaimOverlap,
}
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum GuardId {
    None,
}
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum HelperId {
    None,
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct GuardRejection {
    pub transition_id: TransitionId,
    pub guard_id: GuardId,
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum TriggerDiscriminant {
    Input(InputKind),
    Signal(SignalKind),
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum TransitionRefusal {
    NoMatchingTransition {
        phase: Phase,
        trigger: TriggerDiscriminant,
    },
    GuardRejected {
        rejections: Vec<GuardRejection>,
    },
    AmbiguousTransition {
        transitions: Vec<TransitionId>,
    },
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum KernelError {
    ContextViolation {
        transition_id: TransitionId,
        detail: String,
    },
    HelperEvaluation {
        helper_id: HelperId,
        detail: String,
    },
    CodegenInvariant {
        detail: String,
    },
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum TransitionError {
    Refusal(TransitionRefusal),
    Kernel(KernelError),
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct Outcome {
    pub transition_id: TransitionId,
    pub next_state: State,
    pub effects: Vec<Effect>,
}

pub mod helpers {
    #[allow(unused_imports)]
    use super::*;
    pub fn none<C: Context>(_: &State, context: &C) -> Result<(), KernelError> {
        let _ = context;
        Ok(())
    }
}

pub fn initial_state() -> State {
    State {
        phase: Phase::Running,
        destroy_admitted: false,
        live_runtime_ids: Default::default(),
        externally_addressable_runtime_ids: Default::default(),
        runtime_fence_tokens: Default::default(),
        identity_runtime_generations: Default::default(),
        identity_runtime_fence_tokens: Default::default(),
        active_run_count: 0,
        flow_authority_schema_version: 7,
        run_status: Default::default(),
        run_ordered_steps: Default::default(),
        run_tracked_steps: Default::default(),
        run_step_status: Default::default(),
        run_output_recorded: Default::default(),
        run_step_condition_results: Default::default(),
        run_step_has_conditions: Default::default(),
        run_step_dependencies: Default::default(),
        run_step_dependency_modes: Default::default(),
        run_step_branches: Default::default(),
        run_step_collection_policies: Default::default(),
        run_step_quorum_thresholds: Default::default(),
        run_step_target_counts: Default::default(),
        run_step_target_success_counts: Default::default(),
        run_step_target_terminal_failure_counts: Default::default(),
        run_target_retry_counts: Default::default(),
        run_failure_count: Default::default(),
        run_consecutive_failure_count: Default::default(),
        run_escalation_threshold: Default::default(),
        run_max_step_retries: Default::default(),
        run_ready_frames: Default::default(),
        run_ready_frame_membership: Default::default(),
        run_ready_frame_membership_flat: Default::default(),
        run_pending_body_frame_loops: Default::default(),
        run_pending_body_frame_loop_membership: Default::default(),
        run_pending_body_frame_loop_membership_flat: Default::default(),
        run_active_node_count: Default::default(),
        run_active_frame_count: Default::default(),
        run_last_granted_frame: Default::default(),
        run_last_granted_loop: Default::default(),
        run_max_active_nodes: Default::default(),
        run_max_active_frames: Default::default(),
        run_max_frame_depth: Default::default(),
        frame_scope: Default::default(),
        frame_phase: Default::default(),
        frame_run: Default::default(),
        frame_parent_loop: Default::default(),
        frame_iteration: Default::default(),
        frame_tracked_nodes: Default::default(),
        frame_ordered_nodes: Default::default(),
        frame_node_kind: Default::default(),
        frame_node_dependencies: Default::default(),
        frame_node_dependency_modes: Default::default(),
        frame_node_step_ids: Default::default(),
        frame_node_loop_ids: Default::default(),
        frame_node_status: Default::default(),
        frame_ready_queue: Default::default(),
        frame_output_recorded: Default::default(),
        frame_last_admitted_node: Default::default(),
        frame_node_condition_results: Default::default(),
        frame_node_branches: Default::default(),
        loop_phase: Default::default(),
        loop_parent_frame: Default::default(),
        loop_parent_node: Default::default(),
        loop_definition: Default::default(),
        loop_depth: Default::default(),
        loop_stage: Default::default(),
        loop_current_iteration: Default::default(),
        loop_last_completed_iteration: Default::default(),
        loop_max_iterations: Default::default(),
        loop_active_body_frame: Default::default(),
        pending_spawn_count: 0,
        pending_spawn_sessions: Default::default(),
        coordinator_bound: true,
        member_startup_binding_requested: Default::default(),
        member_startup_runtime_ready: Default::default(),
        member_startup_ready: Default::default(),
        member_kickoff_pending: Default::default(),
        member_kickoff_starting: Default::default(),
        member_kickoff_callback_pending: Default::default(),
        member_kickoff_started: Default::default(),
        member_kickoff_failed: Default::default(),
        member_kickoff_cancelled: Default::default(),
        member_kickoff_error: Default::default(),
        member_restore_failures: Default::default(),
        member_revival_pending: Default::default(),
        spawn_exec_phase: Default::default(),
        member_state_markers: Default::default(),
        wiring_edges: Default::default(),
        external_peer_edges: Default::default(),
        external_peer_edges_by_key: Default::default(),
        supervisor_authority_peer_id: None,
        supervisor_authority_signing_key: None,
        supervisor_authority_epoch: None,
        supervisor_authority_protocol_version: None,
        supervisor_pending_authority_peer_id: None,
        supervisor_pending_authority_signing_key: None,
        supervisor_pending_authority_epoch: None,
        supervisor_pending_authority_protocol_version: None,
        supervisor_pending_authority_accepted_peer_ids: Default::default(),
        pending_recipient_trust: Default::default(),
        owner_bridge_session_id: None,
        owner_bridge_destroy_on_archive: false,
        implicit_delegation_mob: false,
        identity_to_runtime: Default::default(),
        member_session_bindings: Default::default(),
        member_profile_names: Default::default(),
        member_runtime_modes: Default::default(),
        member_peer_ids: Default::default(),
        member_peer_endpoints: Default::default(),
        pending_session_ingress_detach_runtime_ids: Default::default(),
        spawn_policy_enabled: false,
        spawn_policy_revision: 0,
        spawn_policy_resolution_revision: Default::default(),
        spawn_policy_resolution_profiles: Default::default(),
        spawn_policy_resolution_runtime_modes: Default::default(),
        spawn_policy_resolution_absent: Default::default(),
        spawn_profile_authority_profile_names: Default::default(),
        spawn_profile_authority_models: Default::default(),
        spawn_profile_authority_material_digests: Default::default(),
        spawn_profile_authority_tool_config_digests: Default::default(),
        spawn_profile_authority_skills_digests: Default::default(),
        spawn_profile_authority_provider_params_digests: Default::default(),
        spawn_profile_authority_output_schema_digests: Default::default(),
        spawn_profile_authority_external_addressable: Default::default(),
        topology_epoch: 0,
        work_intent_status: Default::default(),
        work_intent_revision: Default::default(),
        work_intent_resources: Default::default(),
        work_intent_owner_present: Default::default(),
        work_intent_expires_at_ms: Default::default(),
        resource_claim_status: Default::default(),
        resource_claim_kind: Default::default(),
        resource_claim_revision: Default::default(),
        resource_claim_resources: Default::default(),
        resource_claim_owner_present: Default::default(),
        resource_claim_expires_at_ms: Default::default(),
        coordination_event_next_sequence: 1,
        topology_default_policy: PolicyDecision::Allow,
        external_member_rebind_capability: Default::default(),
        orphan_budget: 0,
        desired_members: Default::default(),
        members_to_spawn: Default::default(),
        members_to_retire: Default::default(),
        adaptive_active_run: None,
        adaptive_run_phase: Default::default(),
        adaptive_stop_reason: Default::default(),
        adaptive_limit_max_depth: Default::default(),
        adaptive_limit_max_total_decisions: Default::default(),
        adaptive_limit_max_repair_attempts: Default::default(),
        adaptive_limit_max_layer_failures: Default::default(),
        adaptive_limit_max_attempts_per_layer: Default::default(),
        adaptive_limit_max_members_per_layer: Default::default(),
        adaptive_limit_max_total_spawned_members: Default::default(),
        adaptive_limit_max_active_members: Default::default(),
        adaptive_limit_max_retained_layer_mobs: Default::default(),
        adaptive_limit_max_aggregate_tokens: Default::default(),
        adaptive_limit_max_aggregate_tool_calls: Default::default(),
        adaptive_limit_allowed_model_classes: Default::default(),
        adaptive_limit_allowed_tool_classes: Default::default(),
        adaptive_limit_allowed_skill_identities: Default::default(),
        adaptive_limit_allowed_auth_binding_refs: Default::default(),
        adaptive_deadline_ms: Default::default(),
        adaptive_depth: Default::default(),
        adaptive_total_decisions: Default::default(),
        adaptive_repair_attempts: Default::default(),
        adaptive_layer_failures: Default::default(),
        adaptive_total_spawned_members: Default::default(),
        adaptive_active_members: Default::default(),
        adaptive_retained_layer_mobs: Default::default(),
        adaptive_aggregate_token_reserved: Default::default(),
        adaptive_aggregate_token_actual: Default::default(),
        adaptive_aggregate_tool_call_reserved: Default::default(),
        adaptive_aggregate_tool_call_actual: Default::default(),
        adaptive_active_layer: Default::default(),
        adaptive_layer_adaptive_run: Default::default(),
        adaptive_layer_phase: Default::default(),
        adaptive_layer_attempt: Default::default(),
        adaptive_layer_member_count: Default::default(),
        adaptive_layer_plan_digest: Default::default(),
        adaptive_layer_child_mob_id: Default::default(),
        adaptive_layer_token_reservation: Default::default(),
        adaptive_layer_tool_call_reservation: Default::default(),
        adaptive_layer_run_id: Default::default(),
        adaptive_layer_result_digest: Default::default(),
        adaptive_layer_fault: Default::default(),
        adaptive_layer_disposition: Default::default(),
        adaptive_missing_body_digest: Default::default(),
    }
}
