UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

1 lines 750 B
import{z}from"#compiled/zod/index.js";import{defineTool}from"#tools/definition.js";import{toolLabel}from"#tools/tool-label.js";import{executeBashOnSandbox}from"#execution/sandbox/bash.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()}),bash=defineTool({label:{start:e=>toolLabel(`Run`,e.command)},description:`Execute a shell command in the shared workspace environment.`,async execute(e,t){return await executeBashOnSandbox(await t.getSandbox(),e)},inputSchema:BASH_INPUT_SCHEMA,outputSchema:BASH_OUTPUT_SCHEMA});export{BASH_INPUT_SCHEMA,BASH_OUTPUT_SCHEMA,bash,bash as default};