Skip to main content

wrap_tool_interactive

Function wrap_tool_interactive 

Source
pub fn wrap_tool_interactive(
    tool: Arc<dyn Tool>,
    workspace_root: PathBuf,
) -> ToolFacade<ToolBridgeCtx<InteractiveCtx>>
Expand description

Create a ToolFacade that wraps an existing Arc<dyn Tool> with CGP-wired approval, sandbox, and middleware for interactive sessions.

Prefer wrap_native_tool_interactive() when you still own the concrete tool instance. Use this bridge when the tool is already shared elsewhere.

The returned facade implements Tool and can be registered directly with ToolRegistration::from_tool().