Question
I'm pretty new to opencode and I am trying to setup my permissions for everything (putting this in the ~/.config/opencode/opencode.json file). Essentially I want it so when I open opencode in a folder, opencode should be able to edit any file in that folder. but anything one folder up ( ../) should ask for permissions. Now, one of the reasons im having trouble testing this stuff, is because it feels like theres a constant workaround using bash skill.
For example, I set the "list" skill to deny but according to opencode "ls" under bash was allowed so it just ran that instead. I tried setting edit to the below, and asked the model to write hello to a temp file, and the permission was ignored and fell under bash rules because "echo 'Hello' > temp" was used instead
"edit": {
"./**": "allow",
"*": "deny"
}
So im mostly just looking for some help on what fundamental misunderstanding I have regarding the permissions. also is it possible to have allow for the "current" directory? I know I can hardcode a path, but I want the path to be determined at opencode load time
Question
I'm pretty new to opencode and I am trying to setup my permissions for everything (putting this in the
~/.config/opencode/opencode.jsonfile). Essentially I want it so when I open opencode in a folder, opencode should be able to edit any file in that folder. but anything one folder up (../) should ask for permissions. Now, one of the reasons im having trouble testing this stuff, is because it feels like theres a constant workaround using bash skill.For example, I set the "list" skill to deny but according to opencode "ls" under bash was allowed so it just ran that instead. I tried setting edit to the below, and asked the model to write hello to a temp file, and the permission was ignored and fell under bash rules because "echo 'Hello' > temp" was used instead
So im mostly just looking for some help on what fundamental misunderstanding I have regarding the permissions. also is it possible to have allow for the "current" directory? I know I can hardcode a path, but I want the path to be determined at opencode load time