Get the next intent ID and advance the counter. Returns a string like "PIMO-1", "ATOM-42".
(&mut self)
| 282 | /// Get the next intent ID and advance the counter. |
| 283 | /// Returns a string like "PIMO-1", "ATOM-42". |
| 284 | pub fn allocate_intent_id(&mut self) -> String { |
| 285 | let id = self.next_intent_id; |
| 286 | self.next_intent_id = id.saturating_add(1); |
| 287 | let prefix = if self.intent_prefix.is_empty() { |
| 288 | "VAULT" |
| 289 | } else { |
| 290 | &self.intent_prefix |
| 291 | }; |
| 292 | format!("{}-{}", prefix, id) |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | // ── Knowledge Graph ───────────────────────────────────────────── |
no test coverage detected