mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
fix(approval): guard env and config overwrites
This commit is contained in:
@@ -44,6 +44,14 @@ def _make_tool_defs(*names: str) -> list:
|
||||
]
|
||||
|
||||
|
||||
def test_is_destructive_command_treats_cp_as_mutating():
|
||||
assert run_agent._is_destructive_command("cp .env.local .env") is True
|
||||
|
||||
|
||||
def test_is_destructive_command_treats_install_as_mutating():
|
||||
assert run_agent._is_destructive_command("install template.env .env") is True
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def agent():
|
||||
"""Minimal AIAgent with mocked OpenAI client and tool loading."""
|
||||
|
||||
Reference in New Issue
Block a user