Public declaration syntax from forge-rs/crates/forge-health/src/events.rs Original source SHA-256: 85d7e10cdb3da329b41d50aa496e755e7434dfd3e5a8ec417b19cfb5141d1c42 Function bodies and constant values are omitted. This is not the complete implementation. Source line 75 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct LifecycleEvent { /// The lifecycle transition that triggered this event. pub transition: LifecycleTransition, /// The agent's DID, if identity is bound. /// /// This is `None` for agents running in legacy mode (without OAS identity). /// When present, the DID is included in telemetry spans and audit trail /// entries. pub agent_did: Option, /// Optional metadata attached to this event. /// /// Common uses: /// - Error details when transitioning to the Error state /// - Initialization parameters when transitioning to Initializing /// - Shutdown reason when transitioning to Terminated pub metadata: Option } Source line 120 pub fn new(transition: LifecycleTransition) -> Self; Source line 153 pub fn with_agent_did(transition: LifecycleTransition, agent_did: String) -> Self; Source line 188 pub fn with_metadata(mut self, metadata: serde_json::Value) -> Self;