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

Method allocate_intent_id

atomic-core/src/pristine/vault.rs:276–285  ·  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

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

Callers 1

vault_intent_createMethod · 0.80

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected