pub enum UserAction {
Show 15 variants
SendMessage(String),
RunShell(String),
ConfirmPlan,
RejectPlan(String),
ApprovePlanMode,
RejectPlanMode(String),
Compact,
SetPlanningMode(bool),
Interrupt,
Shutdown,
SetGoal {
condition: String,
max_turns: u32,
},
ClearGoal,
RunSkillPrompt {
prompt: String,
},
ResumeSession {
session_dir: PathBuf,
},
ListMcpServers,
}Expand description
Actions originating from key events that the backend worker must
service against the [recursive::AgentRuntime].
Variants§
SendMessage(String)
Send a user message and run one turn.
RunShell(String)
Run a shell command directly via the runtime’s tool registry,
bypassing the LLM. The command is dispatched to the
run_shell tool and its result surfaces as a
UiEvent::ToolCall + UiEvent::ToolResult pair, but is
not appended to the runtime transcript.
Goal-145: this powers the !-prefixed bash mode of the
PromptInput so users get a quick scratch shell without
polluting the agent dialogue.
ConfirmPlan
Confirm the pending plan and resume execution.
RejectPlan(String)
Reject the pending plan with a free-form reason.
ApprovePlanMode
Goal-202: user approves the plan-mode entry request (request_plan_mode).
RejectPlanMode(String)
Goal-202: user rejects the plan-mode entry request; agent executes directly.
Compact
Goal-146: trigger a transcript compaction pass via
[AgentRuntime::compact_now]. The worker pushes a
Compacted event when summarisation succeeds.
SetPlanningMode(bool)
Goal-146: flip the runtime’s planning mode. true enables
plan-first mode, false reverts to immediate execution.
The worker echoes a System block confirming the new state.
Interrupt
Goal-147: signal the worker to abort the in-flight turn.
The worker flips its cancel_flag, and any tokio::select!
waiting on wait_for_cancel returns immediately. The runtime
is not cancelled mid-HTTP-request (reqwest doesn’t support
that); on the next tool-call boundary the next turn will
surface as a UiEvent::Error { message: "interrupted" }.
Shutdown
Tear down the worker and exit the runtime.
SetGoal
Start a condition-based autonomous loop. The backend will kick off
run_goal_loop and emit GoalContinuing/GoalAchieved events.
Fields
ClearGoal
Clear the active goal immediately.
RunSkillPrompt
Send an already-expanded skill prompt to the runtime.
ResumeSession
Load a previously saved session transcript into the runtime.
ListMcpServers
List configured MCP servers.
Trait Implementations§
Source§impl Clone for UserAction
impl Clone for UserAction
Source§fn clone(&self) -> UserAction
fn clone(&self) -> UserAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UserAction
impl Debug for UserAction
impl Eq for UserAction
Source§impl PartialEq for UserAction
impl PartialEq for UserAction
Source§fn eq(&self, other: &UserAction) -> bool
fn eq(&self, other: &UserAction) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UserAction
Auto Trait Implementations§
impl Freeze for UserAction
impl RefUnwindSafe for UserAction
impl Send for UserAction
impl Sync for UserAction
impl Unpin for UserAction
impl UnsafeUnpin for UserAction
impl UnwindSafe for UserAction
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§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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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