pub struct ToolContinuation {
pub tool: String,
pub backend: String,
pub reason: String,
pub permission_preview: Option<String>,
}Expand description
A structured request for the runtime to disclose a narrower tool backend or a specific tool on a later turn.
Continuations are advisory presentation updates. They are not permission grants and must not cause a higher-risk backend to execute implicitly.
Fields§
§tool: StringTool that should be disclosed or whose backend should be disclosed on a later provider turn.
backend: StringBackend id to disclose.
Empty means disclose the tool itself, not a conditional backend. This preserves the pre-existing field type while supporting tool-level progressive disclosure.
reason: StringMachine-readable reason, such as login_redirect or js_rendered_empty.
permission_preview: Option<String>Optional human-readable permission preview.
Implementations§
Source§impl ToolContinuation
impl ToolContinuation
Sourcepub fn disclose_backend(
tool: impl Into<String>,
backend: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn disclose_backend( tool: impl Into<String>, backend: impl Into<String>, reason: impl Into<String>, ) -> Self
Creates a backend-disclosure continuation.
Sourcepub fn disclose_tool(tool: impl Into<String>, reason: impl Into<String>) -> Self
pub fn disclose_tool(tool: impl Into<String>, reason: impl Into<String>) -> Self
Creates a tool-disclosure continuation.
Sourcepub fn is_tool_disclosure(&self) -> bool
pub fn is_tool_disclosure(&self) -> bool
Returns true when this continuation discloses a whole tool instead of a backend.
Sourcepub fn with_permission_preview(self, preview: impl Into<String>) -> Self
pub fn with_permission_preview(self, preview: impl Into<String>) -> Self
Adds display-oriented permission preview text.
Trait Implementations§
Source§impl Clone for ToolContinuation
impl Clone for ToolContinuation
Source§fn clone(&self) -> ToolContinuation
fn clone(&self) -> ToolContinuation
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 ToolContinuation
impl Debug for ToolContinuation
Source§impl<'de> Deserialize<'de> for ToolContinuation
impl<'de> Deserialize<'de> for ToolContinuation
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>,
impl Eq for ToolContinuation
Source§impl JsonSchema for ToolContinuation
impl JsonSchema for ToolContinuation
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more