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

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

(path: &str)

Source from the content-addressed store, hash-verified

589
590/// `memory/architecture.md` -> `memory:architecture`.
591fn memory_path_to_node_id(path: &str) -> Option<String> {
592 let name = path.strip_prefix("memory/")?.strip_suffix(".md")?;
593 if name.is_empty() {
594 return None;
595 }
596 Some(format!("memory:{}", name))
597}
598
599/// `intents/pimo-1/intent.md` -> `intent:PIMO-1` (nested paths keep
600/// 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