Executes shell commands as a tool invocation with timeout, sandbox policy, and permission checks, emitting TTY metrics; reuse for CLI agent command execution tooling.
// Source: https://github.com/openinterpreter/openinterpreter | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works // Provided via justclaw.it.com; keep this notice with the code. use std::path::Path; use std::sync::Arc; use std::time::Duration; use crate::exec::DEFAULT_EXEC_COMMAND_TIMEOUT_MS; use crate::exec_policy::prompt_is_rejected_by_policy; use crate::function_tool::FunctionCallError; use crate::maybe_emit_implicit_skill_invocation; use crate::tools::context::ExecCommandToolOutput; use crate::tools::context::ToolInvocation; use crate::tools::context::ToolPayload; use crate::tools::context::boxed_tool_output; use crate::tools::handlers::apply_granted_turn_permissions; use crate::tools::handlers::apply_patch::intercept_apply_patch; use crate:: ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key