| 102 | } |
| 103 | |
| 104 | pub fn intent_status_from_proto(status: pb::VaultEntityStatus) -> Option<&'static str> { |
| 105 | match status { |
| 106 | pb::VaultEntityStatus::Backlog => Some("backlog"), |
| 107 | pb::VaultEntityStatus::InProgress => Some("in_progress"), |
| 108 | pb::VaultEntityStatus::NeedsReview => Some("needs-review"), |
| 109 | pb::VaultEntityStatus::Done => Some("done"), |
| 110 | pb::VaultEntityStatus::Planned => Some("planned"), |
| 111 | pb::VaultEntityStatus::Suspended => Some("icebox"), |
| 112 | _ => None, |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | /// The typed agent event (snake_case HookType serde names) → HookType. |
| 117 | pub fn hook_type(name: &str) -> Option<atomic_agent::event::HookType> { |