mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(approval): guard env and config overwrites
This commit is contained in:
parent
1cc0bdd5f3
commit
1dfcda4e3c
4 changed files with 68 additions and 1 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue