pub struct AgentSurface {Show 13 fields
pub command: Option<String>,
pub mutates: bool,
pub allow_unknown_keys: bool,
pub filter_scope: Option<FilterScope>,
pub use_active: bool,
pub select: Vec<String>,
pub filters: Vec<FilterExpr>,
pub sort: Option<String>,
pub dedupe_by: Option<String>,
pub max_items: usize,
pub count_only: bool,
pub truncate_content: usize,
pub max_output_bytes: usize,
}Expand description
Resolved output-shaping request for the current process.
Fields§
§command: Option<String>Subcommand that emitted the envelope, as
crate::cli::Commands::agent_surface_slug reports it.
CONTEXT, never a knob: it tells alias suppression which subcommand’s
contract applies, and therefore takes no part in Self::is_noop. A
surface carrying only a command name still changes nothing.
mutates: boolWhether the subcommand can change durable state, as
crate::cli::Commands::mutates reports it.
CONTEXT, never a knob, so it takes no part in Self::is_noop. The gate
reads it to stay silent after a write: refusing at output time would
report failure for an operation that already succeeded.
allow_unknown_keys: boolEscape hatch for --allow-unknown-keys: tolerate a key nothing carries.
CONTEXT, never a knob. On its own it changes no envelope; it only widens what the gate accepts.
filter_scope: Option<FilterScope>What --filter-scope declared the predicate may observe.
CONTEXT, never a knob: on its own it changes no envelope, it only tells the gate which reading the caller meant.
use_active: boolWhether --use-active accepted an ambient target on purpose.
CONTEXT, never a knob, so it takes no part in Self::is_noop. It
dispenses a mutating verb from naming its target in the argv, and
target records that it was used.
select: Vec<String>Keys kept by --select / --fields, in the requested order.
filters: Vec<FilterExpr>Predicates from --filter, conjoined with AND.
sort: Option<String>Sort key from --sort.
dedupe_by: Option<String>Dedup key from --dedupe-by.
max_items: usizeCap on emitted result elements (--max-items); 0 disables it.
count_only: boolReplace the payload with a count (--count-only).
truncate_content: usizeCap on string length in characters (--truncate-content); 0 disables it.
max_output_bytes: usizeCap on the serialized envelope in bytes (--max-output-bytes); 0 disables it.
Implementations§
Trait Implementations§
Source§impl Clone for AgentSurface
impl Clone for AgentSurface
Source§fn clone(&self) -> AgentSurface
fn clone(&self) -> AgentSurface
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 AgentSurface
impl Debug for AgentSurface
Source§impl Default for AgentSurface
impl Default for AgentSurface
Source§fn default() -> AgentSurface
fn default() -> AgentSurface
Auto Trait Implementations§
impl Freeze for AgentSurface
impl RefUnwindSafe for AgentSurface
impl Send for AgentSurface
impl Sync for AgentSurface
impl Unpin for AgentSurface
impl UnsafeUnpin for AgentSurface
impl UnwindSafe for AgentSurface
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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