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

Function integrations_root

atomic-agent/src/integrations/receipt.rs:27–37  ·  view source on GitHub ↗

Root directory for all integration state: `~/.atomic/integrations`. `ATOMIC_INTEGRATIONS_HOME` overrides the root — used by tests and by sandboxes that must not touch the real home directory.

()

Source from the content-addressed store, hash-verified

25/// `ATOMIC_INTEGRATIONS_HOME` overrides the root — used by tests and by
26/// sandboxes that must not touch the real home directory.
27pub fn integrations_root() -> AgentResult<PathBuf> {
28 if let Some(root) = std::env::var_os("ATOMIC_INTEGRATIONS_HOME") {
29 return Ok(PathBuf::from(root));
30 }
31 dirs::home_dir()
32 .map(|h| h.join(".atomic").join("integrations"))
33 .ok_or_else(|| AgentError::Integration {
34 agent: "<any>".to_string(),
35 reason: "cannot resolve home directory".to_string(),
36 })
37}
38
39/// Per-agent integration directory: `~/.atomic/integrations/<agent>`.
40pub fn agent_dir(agent: &str) -> AgentResult<PathBuf> {

Callers 1

agent_dirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected