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

Method add_active_session

atomic-cli/tests/it/git_shim_cb13d_test.rs:438–450  ·  view source on GitHub ↗

Write a minimal active managed-session record (the required non-defaulted CB-12A schema fields only).

(&self, session_id: &str)

Source from the content-addressed store, hash-verified

436 /// Write a minimal active managed-session record (the required
437 /// non-defaulted CB-12A schema fields only).
438 fn add_active_session(&self, session_id: &str) {
439 let sessions = self.root().join(".atomic/sessions");
440 fs::create_dir_all(&sessions).expect("create sessions dir");
441 fs::write(
442 sessions.join(format!("{session_id}.json")),
443 format!(
444 "{{\"session_id\":\"{session_id}\",\"view_name\":\"main\",\"phase\":\"active\",\
445 \"turn_count\":1,\"agent_name\":\"test\",\"agent_display_name\":\"Test\",\
446 \"started_at\":\"2026-09-14T00:00:00Z\"}}"
447 ),
448 )
449 .expect("write session");
450 }
451}
452
453/// AC1: an external Git commit is reconciled reactively, metadata only.

Calls 2

writeFunction · 0.70
rootMethod · 0.45

Tested by

no test coverage detected