pub enum SessionRole {
Worker,
OrchestrationWorker,
OrchestrationResearcher,
Orchestrator,
}Expand description
Role one session plays in a multi-session workflow.
The role is orthogonal to SessionStatus: an orchestrator moves through
the same lifecycle states as any other session, but its worktree exists only
for repository reads and never receives commits. Diff, merge, and
review-request affordances are therefore gated on the role rather than on a
dedicated lifecycle state.
Variants§
Worker
Ordinary session that owns the changes on its own branch.
OrchestrationWorker
Worker whose write capabilities are owned exclusively by an orchestration coordinator.
OrchestrationResearcher
Temporary read-only researcher whose worktree changes are discarded after its report is captured.
Orchestrator
Controller session that plans and supervises child worker sessions.
Implementations§
Source§impl SessionRole
impl SessionRole
Sourcepub fn owns_branch_changes(self) -> bool
pub fn owns_branch_changes(self) -> bool
Returns whether this role produces commits on its own session branch.
Orchestrators read the repository to plan work but delegate every edit to child sessions, so their branch stays empty for the session’s whole lifetime.
Sourcepub fn tracks_worktree_changes(self) -> bool
pub fn tracks_worktree_changes(self) -> bool
Returns whether Agentty should observe worktree changes after a turn.
Research children do not own their changes, but the coordinator records whether a child attempted edits before discarding its worktree.
Sourcepub fn accepts_user_turns(self) -> bool
pub fn accepts_user_turns(self) -> bool
Returns whether an end user may submit turns or branch mutations directly to this session.
Sourcepub fn is_managed(self) -> bool
pub fn is_managed(self) -> bool
Returns whether this worker is owned by an orchestration coordinator.
Trait Implementations§
Source§impl Clone for SessionRole
impl Clone for SessionRole
Source§fn clone(&self) -> SessionRole
fn clone(&self) -> SessionRole
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SessionRole
Source§impl Debug for SessionRole
impl Debug for SessionRole
Source§impl Default for SessionRole
impl Default for SessionRole
Source§fn default() -> SessionRole
fn default() -> SessionRole
Source§impl Display for SessionRole
impl Display for SessionRole
impl Eq for SessionRole
Source§impl FromStr for SessionRole
impl FromStr for SessionRole
Source§impl PartialEq for SessionRole
impl PartialEq for SessionRole
impl StructuralPartialEq for SessionRole
Auto Trait Implementations§
impl Freeze for SessionRole
impl RefUnwindSafe for SessionRole
impl Send for SessionRole
impl Sync for SessionRole
impl Unpin for SessionRole
impl UnsafeUnpin for SessionRole
impl UnwindSafe for SessionRole
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.