pub struct InputEvent {
pub user_input: Option<String>,
pub complex_user_input: Option<UserInput>,
pub tool_confirmation: Option<ToolConfirmation>,
pub tool_response: Option<ToolResponse>,
pub question_response: Option<UserQuestionsResponse>,
pub halt_request: Option<bool>,
pub automated_trigger: Option<String>,
pub call_hook_response: Option<CallHookResponse>,
pub session_end_request: Option<bool>,
pub policy_decision_response: Option<PolicyDecisionResponse>,
}Expand description
antigravity.localharness.InputEvent
Fields§
§user_input: Option<String>§complex_user_input: Option<UserInput>§tool_confirmation: Option<ToolConfirmation>§tool_response: Option<ToolResponse>§question_response: Option<UserQuestionsResponse>§halt_request: Option<bool>§automated_trigger: Option<String>§call_hook_response: Option<CallHookResponse>§session_end_request: Option<bool>§policy_decision_response: Option<PolicyDecisionResponse>Implementations§
Source§impl InputEvent
impl InputEvent
Sourcepub fn user(text: impl Into<String>) -> Self
pub fn user(text: impl Into<String>) -> Self
A plain text turn: InputEvent { user_input: Some(text) }.
Sourcepub fn session_end() -> Self
pub fn session_end() -> Self
Asks the harness to end the session and flush its state to disk.
Sourcepub fn tool_response(response: ToolResponse) -> Self
pub fn tool_response(response: ToolResponse) -> Self
The result of a client-side tool call, answering an OutputEvent’s
ToolCall.
Sourcepub fn hook_response(response: CallHookResponse) -> Self
pub fn hook_response(response: CallHookResponse) -> Self
A reply to a CallHookRequest.
Sourcepub fn policy_response(response: PolicyDecisionResponse) -> Self
pub fn policy_response(response: PolicyDecisionResponse) -> Self
A reply to a PolicyDecisionRequest.
Source§impl InputEvent
impl InputEvent
Sourcepub fn into_event(self) -> Option<InputEventEvent>
pub fn into_event(self) -> Option<InputEventEvent>
Takes the set arm of the event oneof, if any.
Trait Implementations§
Source§impl Clone for InputEvent
impl Clone for InputEvent
Source§fn clone(&self) -> InputEvent
fn clone(&self) -> InputEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputEvent
impl Debug for InputEvent
Source§impl Default for InputEvent
impl Default for InputEvent
Source§fn default() -> InputEvent
fn default() -> InputEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InputEvent
impl<'de> Deserialize<'de> for InputEvent
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 InputEvent
impl PartialEq for InputEvent
Source§impl Serialize for InputEvent
impl Serialize for InputEvent
impl StructuralPartialEq for InputEvent
Auto Trait Implementations§
impl Freeze for InputEvent
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnsafeUnpin for InputEvent
impl UnwindSafe for InputEvent
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