The open source coding agent.
TypeScript
tweak: bash tool, ensure cat will trigger external_directory perm
Aiden Cline3b7c347b2e36
diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.tsindex f3a1b04d431..bf7c524941f 100644--- a/packages/opencode/src/tool/bash.ts+++ b/packages/opencode/src/tool/bash.ts@@ -108,7 +108,7 @@ export const BashTool = Tool.define("bash", async () => {}// not an exhaustive list, but covers most common cases- if (["cd", "rm", "cp", "mv", "mkdir", "touch", "chmod", "chown"].includes(command[0])) {+ if (["cd", "rm", "cp", "mv", "mkdir", "touch", "chmod", "chown", "cat"].includes(command[0])) {for (const arg of command.slice(1)) {if (arg.startsWith("-") || (command[0] === "chmod" && arg.startsWith("+"))) continueconst resolved = await $`realpath ${arg}`