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

Function path_to_subject

atomic-repository/src/repository/vault_triples.rs:832–844  ·  view source on GitHub ↗

Convert a vault path to a subject URI (simplified).

(path: &str)

Source from the content-addressed store, hash-verified

830
831/// Convert a vault path to a subject URI (simplified).
832fn path_to_subject(path: &str) -> String {
833 if path.starts_with("goals/") {
834 entry_subject(path, VaultEntryType::Session)
835 } else if path.starts_with("intents/") {
836 entry_subject(path, VaultEntryType::Intent)
837 } else if path.starts_with("memory/") {
838 entry_subject(path, VaultEntryType::Memory)
839 } else if path.starts_with("skills/") {
840 entry_subject(path, VaultEntryType::Skill)
841 } else {
842 format!("vault:{}", path.replace('/', ":"))
843 }
844}
845
846/// Extract KG edges (and populate node summary) from frontmatter fields.
847fn extract_frontmatter_kg(

Callers 1

vault_store_kg_innerMethod · 0.85

Calls 1

entry_subjectFunction · 0.85

Tested by

no test coverage detected