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 more