pub struct VerbHints { /* private fields */ }Expand description
What an agent’s screen action looks like on a card (spec 3.3 §7.1, owner question 30): the kernel’s words as the heading, “Snooze something in Coming up” in chat, “You can change it back”, the fixed line “Agents always ask before they change things on your screens.”, what the agent read in the asking turn first, and never Always allow.
It reads only the inbox entry and, for the first step, the asking turn’s tool results in
the session store: the pages its web_fetch calls fetched, by host. It never reads text
the agent wrote, and a call that was refused or failed is not a page read. Each request’s
turn is read once.
§Example
use std::sync::Arc;
use adk_surface::{LocalSource, Source, SurfaceEngine};
let source: Arc<dyn Source> = Arc::new(source);
let engine = SurfaceEngine::builder(Arc::clone(&source))
.card_hints(Arc::new(registry.hints().reading(source)))
.grant(registry.grant())
.build();Implementations§
Source§impl VerbHints
impl VerbHints
Sourcepub fn reading(self, source: Arc<dyn Source>) -> Self
pub fn reading(self, source: Arc<dyn Source>) -> Self
Reads the asking turn and the agents’ names through source, the engine’s own (spec
3.3 §5.7, §7.1): an agent the person added or renamed is named as the card names it,
and a process without the session store, such as a terminal attached to a kernel, still
shows what the agent read.
Trait Implementations§
Source§impl CardHints for VerbHints
impl CardHints for VerbHints
Source§fn names<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn names<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The item’s title, from the kernel’s agenda; without it — a terminal attached to the kernel, or an item that has ended — a snooze’s card summary, which the kernel wrote, still names it (spec 3.3 §8).
Auto Trait Implementations§
impl !RefUnwindSafe for VerbHints
impl !UnwindSafe for VerbHints
impl Forget for VerbHints
impl Freeze for VerbHintswhere
*const ArcInner<Inner> is !null: Freeze,
PhantomData<ArcInner<Inner>>: Freeze,
*const ArcInner<dyn Source> is !null: Freeze,
PhantomData<ArcInner<dyn Source>>: Freeze,
*const ArcInner<Mutex<HashMap<String, Reads>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<HashMap<String, Reads>>>>: Freeze,
impl Move for VerbHints
impl Send for VerbHints
impl Sync for VerbHints
impl Unpin for VerbHints
impl UnsafeUnpin for VerbHintswhere
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
*const ArcInner<dyn Source> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Source>>: UnsafeUnpin,
*const ArcInner<Mutex<HashMap<String, Reads>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<HashMap<String, Reads>>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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