From 0a2fffa9b5e6275709a3d87ccf2b11d508d13137 Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Mon, 17 Nov 2025 13:18:13 -0600 Subject: [PATCH] tweak: whitelist --- packages/opencode/src/tool/read.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/tool/read.ts b/packages/opencode/src/tool/read.ts index 7dc41ea5..ec97c8a6 100644 --- a/packages/opencode/src/tool/read.ts +++ b/packages/opencode/src/tool/read.ts @@ -49,14 +49,14 @@ export const ReadTool = Tool.define("read", { } } - const block = (() => { - const whitelist = [".env.example", ".env.sample"] + const block = iife(() => { + const whitelist = [".env.sample", ".example"] if (whitelist.some((w) => filepath.endsWith(w))) return false if (filepath.includes(".env")) return true return false - })() + }) if (block) { throw new Error(`The user has blocked you from reading ${filepath}, DO NOT make further attempts to read it`)