pub enum ControlEvent {
AgentAttached,
AgentActionStarted(String),
AgentActionFinished,
TakeControl,
HandBack,
RunEnded,
ControlHolderDisconnected,
GracePeriodExpired,
SignInRequested(String),
UserInput,
SignInResolved {
signed_in: bool,
},
}Expand description
One input to the control-ownership state machine.
Variants§
AgentAttached
An agent attaches to the browser at the start of a run — the first browse-related tool call of the run.
AgentActionStarted(String)
The agent is about to perform a labeled browse action, e.g. “Filling trip details on …” — sourced from the browse tool invocation.
AgentActionFinished
That action returned (or was cancelled). Paired with the event above
on EVERY exit from the browse call, because nothing else clears the
label: RunEnded was the only clear, so the drawer’s action strip
reported the last browse action as still running for the rest of the
turn — including while the agent was doing something else entirely,
or nothing at all.
TakeControl
User presses “Take control”.
HandBack
User presses “Hand back to CAR”. Also how a pending sign-in resolves early — it’s the SAME affordance, since a pending sign-in already hands page input to the user.
RunEnded
The run ends. Immediate, no grace period: the user’s browser again, zero ceremony.
ControlHolderDisconnected
The connection holding user control dropped. Starts a grace period —
the caller owns the actual clock; see ControlEffect::StartGracePeriod.
GracePeriodExpired
The stated grace period elapsed with no reconnect or hand-back.
SignInRequested(String)
An agent action needs the user to sign in.
UserInput
The person drove the browser — a click, a keystroke, a paste, a
navigation from the drawer. Not an ownership change: it is the evidence
that somebody is actually AT the browser right now, which is what
decides whether a sign-in timeout may end their window (see
ControlState::user_engaged).
SignInResolved
browser_await_signin’s own detection loop (URL heuristic, or its
timeout) settled the pending sign-in on its own, without a hand-back.
Trait Implementations§
Source§impl Clone for ControlEvent
impl Clone for ControlEvent
Source§impl Debug for ControlEvent
impl Debug for ControlEvent
impl Eq for ControlEvent
Source§impl PartialEq for ControlEvent
impl PartialEq for ControlEvent
impl StructuralPartialEq for ControlEvent
Auto Trait Implementations§
impl Freeze for ControlEvent
impl RefUnwindSafe for ControlEvent
impl Send for ControlEvent
impl Sync for ControlEvent
impl Unpin for ControlEvent
impl UnsafeUnpin for ControlEvent
impl UnwindSafe for ControlEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more