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

Function path_to_subject

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

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

(path: &str)

Source from the content-addressed store, hash-verified

562
563/// Convert a vault path to a subject URI (simplified).
564fn path_to_subject(path: &str) -> String {
565 if path.starts_with("goals/") {
566 entry_subject(path, VaultEntryType::Session)
567 } else if path.starts_with("intents/") {
568 entry_subject(path, VaultEntryType::Intent)
569 } else if path.starts_with("memory/") {
570 entry_subject(path, VaultEntryType::Memory)
571 } else if path.starts_with("skills/") {
572 entry_subject(path, VaultEntryType::Skill)
573 } else {
574 format!("vault:{}", path.replace('/', ":"))
575 }
576}
577
578/// Extract KG edges (and populate node summary) from frontmatter fields.
579fn extract_frontmatter_kg(

Callers 1

vault_store_kgMethod · 0.85

Calls 1

entry_subjectFunction · 0.85

Tested by

no test coverage detected