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

Method intent_dir_for

atomic-repository/src/repository/vault_intent.rs:684–698  ·  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

682 /// Agent mode: `intents/<view>/<session>/<turn>/`
683 /// Manual mode: `intents/manual/<identity>/<N>/`
684 fn intent_dir_for(&self, session_id: Option<&str>, turn_id: Option<u32>) -> String {
685 let view = self.current_view();
686 match (session_id, turn_id) {
687 (Some(sid), Some(tid)) => format!("intents/{}/{}/{}", view, sid, tid),
688 _ => {
689 // Manual usage — scope under the user's identity name
690 let identity = self.resolve_vault_identity();
691 let manifest = self.vault_manifest().unwrap_or_default();
692 format!(
693 "intents/manual/{}/{}",
694 identity.name, manifest.next_intent_id
695 )
696 }
697 }
698 }
699
700 /// Build the vault-relative path for an intent file.
701 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