MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / allocate_intent_id

Method allocate_intent_id

atomic-core/src/pristine/vault.rs:284–293  ·  view source on GitHub ↗

Get the next intent ID and advance the counter. Returns a string like "PIMO-1", "ATOM-42".

(&mut self)

Source from the content-addressed store, hash-verified

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 ─────────────────────────────────────────────

Callers 1

vault_intent_createMethod · 0.80

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected