pub struct SessionState {
pub active: Option<RepoBinding>,
pub subagents: HashMap<String, RepoBinding>,
pub last_injected_repo: Option<String>,
pub active_project: Option<ProjectBinding>,
pub subagent_projects: HashMap<String, ProjectBinding>,
pub auto_bind_checked: Vec<String>,
pub auto_bind_off: bool,
}Expand description
Session-level active binding plus per-worktree subagent overrides (keyed by the subagent’s git worktree toplevel path — design §7).
Fields§
§active: Option<RepoBinding>§subagents: HashMap<String, RepoBinding>§last_injected_repo: Option<String>The repo id whose policies were last injected into a hook response for
this session (sub-plan C). Used by UserPromptSubmit to avoid
re-injecting unchanged context on every prompt. #[serde(default)]
keeps old on-disk session files (without this field) loadable.
active_project: Option<ProjectBinding>§subagent_projects: HashMap<String, ProjectBinding>§auto_bind_checked: Vec<String>Origin remote URLs this session already looked up without binding
(unregistered, or ambiguous), so auto_bind asks the server once per
remote, not once per hook event — and says so once.
auto_bind_off: boolSet by repo reset: the session stays unbound instead of being bound
again from its checkout’s remote on the next hook event.
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§impl Debug for SessionState
impl Debug for SessionState
Source§impl Default for SessionState
impl Default for SessionState
Source§impl<'de> Deserialize<'de> for SessionState
impl<'de> Deserialize<'de> for SessionState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SessionState
impl PartialEq for SessionState
Source§impl Serialize for SessionState
impl Serialize for SessionState
impl StructuralPartialEq for SessionState
Auto Trait Implementations§
impl Forget for SessionState
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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
Mutably borrows from an owned value. Read more