Skip to main content

save_agents

Function save_agents 

Source
pub fn save_agents(agents: &HashMap<String, AgentEntry>) -> Result<()>
Expand description

Save agents atomically by writing to a temp file then renaming.

Prevents corruption if the process is killed mid-write (e.g., an agent crashing during bn close). The rename is atomic on the same filesystem.