pub struct Agent<'a, P, V>where
P: InferenceProvider,
V: FalseGreenVerifier,{ /* private fields */ }Implementations§
Source§impl<'a, P, V> Agent<'a, P, V>where
P: InferenceProvider,
V: FalseGreenVerifier,
impl<'a, P, V> Agent<'a, P, V>where
P: InferenceProvider,
V: FalseGreenVerifier,
pub const fn new( store: &'a mut EventStore, session: Session, provider: P, verifier: V, tools: NativeTools, context_builder: ContextBuilder, limits: AgentLimits, ) -> Self
Sourcepub fn execute_genui_action(
&mut self,
principal: &str,
surface: &Surface,
catalog: &ActionCatalog,
action_id: &str,
payload: Value,
confirmation: Option<&HostConfirmation>,
) -> Result<ToolResult, AgentError>
pub fn execute_genui_action( &mut self, principal: &str, surface: &Surface, catalog: &ActionCatalog, action_id: &str, payload: Value, confirmation: Option<&HostConfirmation>, ) -> Result<ToolResult, AgentError>
Canonical Agent-owned bridge for a trusted GenUI action. This keeps event persistence and MCP invocation under the same Agent instance.
Sourcepub fn execute_admitted_genui_action(
&mut self,
context: &CompositionContext,
admitted: &AdmittedComposedSurface,
catalog: &ActionCatalog,
action_id: &str,
payload: Value,
confirmation: Option<&HostConfirmation>,
) -> Result<ToolResult, AgentError>
pub fn execute_admitted_genui_action( &mut self, context: &CompositionContext, admitted: &AdmittedComposedSurface, catalog: &ActionCatalog, action_id: &str, payload: Value, confirmation: Option<&HostConfirmation>, ) -> Result<ToolResult, AgentError>
Execute an action selected from a previously admitted composition. The cached rendering is never treated as authority: the live composition context, source identity, catalog binding, durable state, and normal G1/G2 transport fence are all revalidated immediately before dispatch.
Sourcepub fn compose_genui(
&mut self,
context: &CompositionContext,
untrusted_task_data: &str,
host: &HostCapabilities,
_capabilities: &NegotiatedCapabilities,
catalog: &mut ActionCatalog,
limits: CompositionLimits,
) -> Result<ProductionComposition, AgentError>
pub fn compose_genui( &mut self, context: &CompositionContext, untrusted_task_data: &str, host: &HostCapabilities, _capabilities: &NegotiatedCapabilities, catalog: &mut ActionCatalog, limits: CompositionLimits, ) -> Result<ProductionComposition, AgentError>
Run the canonical production G5 path through the Agent’s configured provider: strict bounded JSON response -> host handle resolution -> mandatory authority checks -> durable negotiated renderer admission. Any provider/proposal failure uses the deterministic host-owned, read-only fallback and records privacy-safe audit metadata.
Sourcepub fn compose_genui_for_outcome(
&mut self,
outcome: &RunOutcome,
host: &HostCapabilities,
capabilities: &NegotiatedCapabilities,
catalog: &mut ActionCatalog,
limits: CompositionLimits,
) -> Result<ProductionComposition, AgentError>
pub fn compose_genui_for_outcome( &mut self, outcome: &RunOutcome, host: &HostCapabilities, capabilities: &NegotiatedCapabilities, catalog: &mut ActionCatalog, limits: CompositionLimits, ) -> Result<ProductionComposition, AgentError>
User-reachable CLI/runtime bridge: after the normal Agent run, expose the host-owned run outcome as required data and perform one explicit G5 composition turn. A provider/proposal failure deterministically renders the same host-owned outcome surface through the G5 fallback path.
pub fn present_genui_action( &mut self, catalog: &ActionCatalog, action_id: &str, ) -> Result<(), AgentError>
pub fn request_genui_confirmation( &mut self, catalog: &ActionCatalog, action_id: &str, payload: &Value, ) -> Result<HostConfirmation, AgentError>
pub fn confirm_genui_action( &mut self, catalog: &ActionCatalog, confirmation: &HostConfirmation, ) -> Result<(), AgentError>
Sourcepub fn advance_genui_current_state(
&mut self,
principal: &str,
catalog: &mut ActionCatalog,
) -> Result<(u64, String, String), AgentError>
pub fn advance_genui_current_state( &mut self, principal: &str, catalog: &mut ActionCatalog, ) -> Result<(u64, String, String), AgentError>
Advance GenUI authority from the trusted Agent/session boundary. The state digest and authorization context are derived from host-owned session and workspace data; callers cannot inject either value.
pub fn with_temperature(self, temperature: f32) -> Self
Sourcepub const fn with_pause_after_model_turns(self, turns: Option<u32>) -> Self
pub const fn with_pause_after_model_turns(self, turns: Option<u32>) -> Self
End this invocation at a persisted, source-fingerprinted turn boundary.
The resulting Paused session remains resumable by a later process.