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

Method intent_dir_for

atomic-repository/src/repository/vault_intent.rs:638–652  ·  view source on GitHub ↗

Build the vault-relative directory for an intent. Agent mode: `intents/ / / /` Manual mode: `intents/manual/ / /`

(&self, session_id: Option<&str>, turn_id: Option<u32>)

Source from the content-addressed store, hash-verified

636 /// Agent mode: `intents/<view>/<session>/<turn>/`
637 /// Manual mode: `intents/manual/<identity>/<N>/`
638 fn intent_dir_for(&self, session_id: Option<&str>, turn_id: Option<u32>) -> String {
639 let view = self.current_view();
640 match (session_id, turn_id) {
641 (Some(sid), Some(tid)) => format!("intents/{}/{}/{}", view, sid, tid),
642 _ => {
643 // Manual usage — scope under the user's identity name
644 let identity = self.resolve_vault_identity();
645 let manifest = self.vault_manifest().unwrap_or_default();
646 format!(
647 "intents/manual/{}/{}",
648 identity.name, manifest.next_intent_id
649 )
650 }
651 }
652 }
653
654 /// Build the vault-relative path for an intent file.
655 fn intent_file_for(&self, session_id: Option<&str>, turn_id: Option<u32>) -> String {

Callers 1

vault_intent_createMethod · 0.80

Calls 3

current_viewMethod · 0.80
vault_manifestMethod · 0.80

Tested by

no test coverage detected