From 79aba574774a1273831dfa21d10df995edf165da Mon Sep 17 00:00:00 2001 From: Richardson Gunde Date: Mon, 13 Apr 2026 12:16:50 +0530 Subject: [PATCH 1/3] Add AI ethics review checklist as PR template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds .github/PULL_REQUEST_TEMPLATE.md with a mandatory AI safety and security checklist covering Input Validation, Least Privilege, Credential Safety, Human Oversight, AI Output Safety, and Testing — codifying the principles from AI_PRINCIPLES.md into every PR review. Closes #13. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- .github/PULL_REQUEST_TEMPLATE.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..00d3fa0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ +## Changes + + +## AI Safety & Security Checklist + + +### Input Validation +- [ ] All external inputs (user messages, API responses, file contents) are validated +- [ ] Path operations stay within workspace boundaries + +### Least Privilege +- [ ] New tools/features request only the permissions they need +- [ ] No unnecessary filesystem, network, or system access added + +### Credential Safety +- [ ] No API keys, tokens, or passwords in code, logs, or LLM context +- [ ] Sensitive data masked in all log output + +### Human Oversight +- [ ] Destructive or irreversible actions require user confirmation +- [ ] Agent announces intent before high-risk operations + +### AI Output Safety +- [ ] LLM outputs are validated before acting on them +- [ ] Tool outputs are sanitized before re-entering LLM context + +### Testing +- [ ] Security tests added/updated for changes +- [ ] No test coverage decrease From 31f126905846a443c63ea3ba4ce8a463f4cf76da Mon Sep 17 00:00:00 2001 From: Richardson Gunde Date: Sun, 19 Apr 2026 22:01:31 +0530 Subject: [PATCH 2/3] fix: update test imports for refactored tools paths [ci] --- tests/test_control_center.py | 2 +- tests/test_local_agents.py | 2 +- tests/test_plugins.py | 2 +- tests/test_tool_registry.py | 2 +- tests/test_tools.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_control_center.py b/tests/test_control_center.py index f3a2e5b..0efe749 100644 --- a/tests/test_control_center.py +++ b/tests/test_control_center.py @@ -4,7 +4,7 @@ import pytest from unittest.mock import AsyncMock, MagicMock, patch -from operator_use.agent.tools.builtin.control_center import ( +from operator_use.tools.control_center import ( control_center, _set_plugin_enabled, _get_plugin_enabled, diff --git a/tests/test_local_agents.py b/tests/test_local_agents.py index 8fd831b..a1b5168 100644 --- a/tests/test_local_agents.py +++ b/tests/test_local_agents.py @@ -2,7 +2,7 @@ import pytest -from operator_use.agent.tools.builtin.local_agents import LOCAL_AGENT_DELEGATION_CHAIN, localagents +from operator_use.tools.local_agents import LOCAL_AGENT_DELEGATION_CHAIN, localagents from operator_use.messages.service import AIMessage diff --git a/tests/test_plugins.py b/tests/test_plugins.py index f6ba6d4..5d9f8b9 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -7,7 +7,7 @@ from operator_use.agent.tools.registry import ToolRegistry from operator_use.agent.hooks.service import Hooks from operator_use.agent.hooks.events import HookEvent -from operator_use.tools.service import Tool +from operator_use.agent.tools.service import Tool from pydantic import BaseModel diff --git a/tests/test_tool_registry.py b/tests/test_tool_registry.py index ca6ed75..77c70b9 100644 --- a/tests/test_tool_registry.py +++ b/tests/test_tool_registry.py @@ -4,7 +4,7 @@ from pydantic import BaseModel from operator_use.agent.tools.registry import ToolRegistry -from operator_use.tools.service import Tool +from operator_use.agent.tools.service import Tool # --- Helpers --- diff --git a/tests/test_tools.py b/tests/test_tools.py index 8cbf913..de572ab 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -4,7 +4,7 @@ from pydantic import BaseModel from typing import Literal -from operator_use.tools.service import Tool, ToolResult +from operator_use.agent.tools.service import Tool, ToolResult # --- ToolResult --- From ae72980896c98acb1d99b4ac0ea760a5dd15405b Mon Sep 17 00:00:00 2001 From: Richardson Gunde Date: Sun, 19 Apr 2026 22:10:17 +0530 Subject: [PATCH 3/3] fix: fix remaining test_agent.py and e2e imports for refactored tools [ci] --- tests/test_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_agent.py b/tests/test_agent.py index 4fb6c3f..13db174 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -186,7 +186,7 @@ async def test_agent_run_with_tool_call_then_text(tmp_path): # Register a simple echo tool from pydantic import BaseModel - from operator_use.tools.service import Tool + from operator_use.agent.tools.service import Tool class EchoParams(BaseModel): message: str