fix: rename bash tool to exec (#748) (thanks @myfunc)

This commit is contained in:
Peter Steinberger
2026-01-12 02:49:55 +00:00
parent b33bd6aaeb
commit 98337a14b3
51 changed files with 294 additions and 252 deletions

View File

@@ -110,13 +110,13 @@ describe("workspace path resolution", () => {
});
});
it("defaults bash cwd to workspaceDir when workdir is omitted", async () => {
it("defaults exec cwd to workspaceDir when workdir is omitted", async () => {
await withTempDir("clawdbot-ws-", async (workspaceDir) => {
const tools = createClawdbotCodingTools({ workspaceDir });
const bashTool = tools.find((tool) => tool.name === "bash");
expect(bashTool).toBeDefined();
const execTool = tools.find((tool) => tool.name === "exec");
expect(execTool).toBeDefined();
const result = await bashTool?.execute("ws-bash", {
const result = await execTool?.execute("ws-exec", {
command: "echo ok",
});
const cwd =
@@ -134,14 +134,14 @@ describe("workspace path resolution", () => {
});
});
it("lets bash workdir override the workspace default", async () => {
it("lets exec workdir override the workspace default", async () => {
await withTempDir("clawdbot-ws-", async (workspaceDir) => {
await withTempDir("clawdbot-override-", async (overrideDir) => {
const tools = createClawdbotCodingTools({ workspaceDir });
const bashTool = tools.find((tool) => tool.name === "bash");
expect(bashTool).toBeDefined();
const execTool = tools.find((tool) => tool.name === "exec");
expect(execTool).toBeDefined();
const result = await bashTool?.execute("ws-bash-override", {
const result = await execTool?.execute("ws-exec-override", {
command: "echo ok",
workdir: overrideDir,
});