feat: add file_diff orchestrator tool
Runs diff -u on two project-scoped files. Low risk, no admin required. Covers code review, config comparison, and before/after verification. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,7 @@ from tools.files import (
|
||||
project_file_list as _project_file_list,
|
||||
file_stat as _file_stat,
|
||||
file_grep as _file_grep,
|
||||
file_diff as _file_diff,
|
||||
file_syntax_check as _file_syntax_check,
|
||||
file_read as _file_read,
|
||||
file_list as _file_list,
|
||||
@@ -108,7 +109,7 @@ import tools.homeassistant as _mod_homeassistant
|
||||
|
||||
TOOL_CATEGORIES: dict[str, list[str]] = {
|
||||
"Web": ["web_search", "http_fetch", "web_read", "http_post"],
|
||||
"Project Files": ["project_file_read", "project_file_list", "file_stat", "file_grep", "file_syntax_check"],
|
||||
"Project Files": ["project_file_read", "project_file_list", "file_stat", "file_grep", "file_diff", "file_syntax_check"],
|
||||
"System Files": ["file_read", "file_list", "file_write", "session_read", "session_search"],
|
||||
"Shell": ["shell_exec", "claude_allow_dir"],
|
||||
"System": ["cortex_restart", "cortex_logs", "cortex_status", "cortex_update"],
|
||||
@@ -151,6 +152,7 @@ _CALLABLES: dict[str, callable] = {
|
||||
"project_file_list": _project_file_list,
|
||||
"file_stat": _file_stat,
|
||||
"file_grep": _file_grep,
|
||||
"file_diff": _file_diff,
|
||||
"file_syntax_check": _file_syntax_check,
|
||||
"file_read": _file_read,
|
||||
"file_list": _file_list,
|
||||
@@ -247,6 +249,7 @@ TOOL_RISK: dict[str, str] = {
|
||||
"project_file_list": "low",
|
||||
"file_stat": "low",
|
||||
"file_grep": "low",
|
||||
"file_diff": "low",
|
||||
"file_syntax_check": "low",
|
||||
|
||||
# System Files — reads beyond project scope are medium; writes are high
|
||||
|
||||
Reference in New Issue
Block a user