Get the next intent ID and advance the counter. Returns a string like "PIMO-1", "ATOM-42". Legacy (pre-ULID) allocation. New intents use [`allocate_author_seq`](Self::allocate_author_seq) + [`compose_human_key`](Self::compose_human_key) and a ULID primary id.
(&mut self)
| 372 | /// [`allocate_author_seq`](Self::allocate_author_seq) + |
| 373 | /// [`compose_human_key`](Self::compose_human_key) and a ULID primary id. |
| 374 | pub fn allocate_intent_id(&mut self) -> String { |
| 375 | let id = self.next_intent_id; |
| 376 | self.next_intent_id = id.saturating_add(1); |
| 377 | let prefix = if self.intent_prefix.is_empty() { |
| 378 | "VAULT" |
| 379 | } else { |
| 380 | &self.intent_prefix |
| 381 | }; |
| 382 | format!("{}-{}", prefix, id) |
| 383 | } |
| 384 | |
| 385 | /// The project code used in human keys (falls back to `VAULT`). |
| 386 | pub fn project_code(&self) -> &str { |