rho-coding-agent 3.11.0

A fast Rust agent harness with a small footprint and opinionated defaults
Documentation
//! Which session's delete takes a loaded session with it: the delete
//! unloads such a session first, so the store can delete its file too.

use rho_sdk::SessionId;

/// The session whose delete takes a loaded session with it.
#[derive(Clone, Debug, PartialEq, Eq)]
pub(super) enum Owner {
    /// A fork's: the session it forks (see `fork.rs`).
    Forked(SessionId),
    /// A subagent's, which a person reopened: the session that started it.
    Delegated(SessionId),
}

impl Owner {
    pub(super) fn session(&self) -> &SessionId {
        match self {
            Self::Forked(session) | Self::Delegated(session) => session,
        }
    }
}