cryochamber 0.1.2

A hibernation chamber for AI agents — schedule, wake, and manage long-running agent tasks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// src/session.rs
//! Pure business logic extracted from command handlers for testability.

use std::path::Path;

/// Check whether a plan file should be copied to the destination.
///
/// Returns false if both paths resolve to the same file (avoiding self-copy).
pub fn should_copy_plan(source: &Path, dest: &Path) -> bool {
    match (std::fs::canonicalize(source), std::fs::canonicalize(dest)) {
        (Ok(src), Ok(dst)) => src != dst,
        _ => true,
    }
}