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:641–647  ·  view source on GitHub ↗

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

(path: &str)

Source from the content-addressed store, hash-verified

639
640/// `memory/architecture.md` -> `memory:architecture`.
641fn memory_path_to_node_id(path: &str) -> Option<String> {
642 let name = path.strip_prefix("memory/")?.strip_suffix(".md")?;
643 if name.is_empty() {
644 return None;
645 }
646 Some(format!("memory:{}", name))
647}
648
649/// `intents/pimo-1/intent.md` -> `intent:PIMO-1` (nested paths keep
650/// 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