fix: opencode config 2
This commit is contained in:
@@ -2,15 +2,13 @@ import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_config_grants_parent_agents_access_and_restricts_research() -> None:
|
||||
def test_config_preserves_builtin_permissions_and_restricts_research() -> None:
|
||||
root = Path(__file__).parents[1]
|
||||
config = json.loads((root / "opencode" / "opencode.json").read_text())
|
||||
|
||||
assert config["permission"] == "allow"
|
||||
assert all(
|
||||
config["agent"][name]["permission"] == "allow"
|
||||
for name in ("build", "plan", "general", "explore")
|
||||
)
|
||||
assert "permission" not in config
|
||||
assert all(name not in config["agent"] for name in ("build", "plan", "general"))
|
||||
assert "permission" not in config["agent"]["explore"]
|
||||
assert config["agent"]["research"]["permission"] == {
|
||||
"*": "deny",
|
||||
"websearch": "allow",
|
||||
|
||||
Reference in New Issue
Block a user