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

Function save_managed_lifecycle

atomic-cli/src/commands/agent/hooks.rs:849–857  ·  view source on GitHub ↗
(root: &Path, lifecycle: &super::super::lifecycle::ManagedLifecycle)

Source from the content-addressed store, hash-verified

847 }
848
849 fn save_managed_lifecycle(root: &Path, lifecycle: &super::super::lifecycle::ManagedLifecycle) {
850 let directory = root.join(".atomic/agent-lifecycle");
851 fs::create_dir_all(&directory).unwrap();
852 fs::write(
853 directory.join(format!("{}.json", lifecycle.run_id)),
854 serde_json::to_vec_pretty(lifecycle).unwrap(),
855 )
856 .unwrap();
857 }
858
859 #[test]
860 fn test_hooks_struct_fields() {

Calls 2

writeFunction · 0.50
unwrapMethod · 0.45