| 1055 | } |
| 1056 | |
| 1057 | fn managed_lifecycle(root: &Path) -> super::super::lifecycle::ManagedLifecycle { |
| 1058 | let now = Utc::now().timestamp(); |
| 1059 | super::super::lifecycle::ManagedLifecycle { |
| 1060 | run_id: "run-cb0c".into(), |
| 1061 | owner_agent: "sherpa".into(), |
| 1062 | owner_session_id: "owner-session".into(), |
| 1063 | executor_agent: Some("codex".into()), |
| 1064 | work_item_id: Some("CB-0C".into()), |
| 1065 | view: Some("agent-view".into()), |
| 1066 | refusal: None, |
| 1067 | workdir: root.to_path_buf(), |
| 1068 | created_at: now, |
| 1069 | updated_at: now, |
| 1070 | expires_at: now + 60, |
| 1071 | stop_state: None, |
| 1072 | } |
| 1073 | } |
| 1074 | |
| 1075 | fn save_managed_lifecycle(root: &Path, lifecycle: &super::super::lifecycle::ManagedLifecycle) { |
| 1076 | let directory = root.join(".atomic/agent-lifecycle"); |