pub struct NativeTools { /* private fields */ }Implementations§
Source§impl NativeTools
impl NativeTools
pub const fn new(workspace: Workspace, limits: ToolLimits) -> Self
pub fn with_mcp(self, mcp: McpClientSet) -> Self
pub fn workspace(&self) -> &Workspace
Mutation-time workspace authority token used by the publication CAS.
pub fn may_mutate_workspace(&self, call: &ToolCall) -> bool
pub fn tool_schemas(&self) -> Value
pub fn mcp_discovery_metadata(&self) -> Option<Value>
Sourcepub fn live_mcp_tool_identity(
&self,
tool_name: &str,
) -> Option<LiveToolIdentity>
pub fn live_mcp_tool_identity( &self, tool_name: &str, ) -> Option<LiveToolIdentity>
Read the live MCP registry identity used by the execution path.
Sourcepub fn live_mcp_registry_digest(&self) -> Option<String>
pub fn live_mcp_registry_digest(&self) -> Option<String>
Digest of the complete live MCP registry/source authority used by the admission and execution paths.
Sourcepub fn live_mcp_registry_generation(&self) -> u64
pub fn live_mcp_registry_generation(&self) -> u64
Monotonic MCP registry authority token used by the G5 publication CAS.
pub fn execute(&self, call: &ToolCall) -> Result<ToolResult, ToolError>
Sourcepub fn execute_genui_action(
&self,
store: &mut EventStore,
session_id: &str,
principal: &str,
surface: &Surface,
catalog: &ActionCatalog,
action_id: &str,
payload: Value,
confirmation: Option<&HostConfirmation>,
) -> Result<ToolResult, ToolError>
pub fn execute_genui_action( &self, store: &mut EventStore, session_id: &str, principal: &str, surface: &Surface, catalog: &ActionCatalog, action_id: &str, payload: Value, confirmation: Option<&HostConfirmation>, ) -> Result<ToolResult, ToolError>
Execute a host-bound GenUI action through the canonical MCP validation path. Durable lifecycle events are written before and after transport invocation; an unresolved start is reconciled as unknown on restart and is never retried blindly.
Sourcepub fn execute_genui_action_after_durable_start(
&self,
store: &mut EventStore,
session_id: &str,
principal: &str,
surface: &Surface,
catalog: &ActionCatalog,
action_id: &str,
payload: Value,
) -> Result<ToolResult, ToolError>
pub fn execute_genui_action_after_durable_start( &self, store: &mut EventStore, session_id: &str, principal: &str, surface: &Surface, catalog: &ActionCatalog, action_id: &str, payload: Value, ) -> Result<ToolResult, ToolError>
Continue an already-durable execution start through the same authority gate without appending a terminal event. This is the explicit process- death seam used by Crash-C; it still rechecks every live binding before invoking transport and never exposes the raw MCP client.
Sourcepub fn confirm_genui_action(
&self,
store: &mut EventStore,
catalog: &ActionCatalog,
confirmation: &HostConfirmation,
) -> Result<(), ToolError>
pub fn confirm_genui_action( &self, store: &mut EventStore, catalog: &ActionCatalog, confirmation: &HostConfirmation, ) -> Result<(), ToolError>
Live-revalidate MCP authority before persisting a confirmation. This is the sole production confirmation path; the catalog’s persistence primitive is crate-private and can only be reached after these checks.