Get the next intent ID and advance the counter. Returns a string like "PIMO-1", "ATOM-42".
(&mut self)
| 274 | /// Get the next intent ID and advance the counter. |
| 275 | /// Returns a string like "PIMO-1", "ATOM-42". |
| 276 | pub fn allocate_intent_id(&mut self) -> String { |
| 277 | let id = self.next_intent_id; |
| 278 | self.next_intent_id = id.saturating_add(1); |
| 279 | let prefix = if self.intent_prefix.is_empty() { |
| 280 | "VAULT" |
| 281 | } else { |
| 282 | &self.intent_prefix |
| 283 | }; |
| 284 | format!("{}-{}", prefix, id) |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | // ── Knowledge Graph ───────────────────────────────────────────── |
no test coverage detected