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

Function memory_path_to_node_id

atomic-cli/src/commands/vault/context.rs:646–652  ·  view source on GitHub ↗

`memory/architecture.md` -> `memory:architecture`.

(path: &str)

Source from the content-addressed store, hash-verified

644
645/// `memory/architecture.md` -> `memory:architecture`.
646fn memory_path_to_node_id(path: &str) -> Option<String> {
647 let name = path.strip_prefix("memory/")?.strip_suffix(".md")?;
648 if name.is_empty() {
649 return None;
650 }
651 Some(format!("memory:{}", name))
652}
653
654/// `intents/pimo-1/intent.md` -> `intent:PIMO-1` (nested paths keep
655/// their inner segments, uppercased, matching the KG indexer).

Callers 2

gather_candidatesMethod · 0.85
scan_memory_bodiesMethod · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected