eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 844 B
JavaScript
import{z}from"#compiled/zod/index.js";import{requireSandboxSession}from"#execution/sandbox/require-sandbox.js";import{executeBashOnSandbox}from"#execution/sandbox/bash-tool.js";const BASH_INPUT_SCHEMA=z.strictObject({command:z.string().describe(`The shell command to execute.`)}),BASH_OUTPUT_SCHEMA=z.strictObject({exitCode:z.number(),stderr:z.string(),stdout:z.string(),truncated:z.boolean()});async function executeBash(e,t){return executeBashOnSandbox(await requireSandboxSession(t?.abortSignal),e)}const BASH_TOOL_DEFINITION={description:`Execute a shell command in the shared workspace environment.`,execute:executeBash,inputSchema:BASH_INPUT_SCHEMA,logicalPath:`eve:framework/bash`,name:`bash`,outputSchema:BASH_OUTPUT_SCHEMA,sourceId:`eve:bash-tool`,sourceKind:`module`};export{BASH_INPUT_SCHEMA,BASH_OUTPUT_SCHEMA,BASH_TOOL_DEFINITION};