feat: backend servis iskeletini ve yönetim uçlarını ekle

This commit is contained in:
2026-03-21 11:53:04 +03:00
parent df1924b772
commit 62add37d9d
29 changed files with 953 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
from typing import Any
from app.security import evaluate_terminal_command
from app.tools.base import Tool
class TerminalTool(Tool):
name = "terminal"
description = "Run terminal commands under WiseClaw policy."
def __init__(self, terminal_mode: int) -> None:
self.terminal_mode = terminal_mode
async def run(self, payload: dict[str, Any]) -> dict[str, Any]:
command = str(payload.get("command", "")).strip()
decision = evaluate_terminal_command(command, self.terminal_mode)
return {
"tool": self.name,
"status": "stub",
"command": command,
"decision": decision.decision,
"reason": decision.reason,
}