feat: backend servis iskeletini ve yönetim uçlarını ekle
This commit is contained in:
21
backend/app/tools/files.py
Normal file
21
backend/app/tools/files.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from app.tools.base import Tool
|
||||
|
||||
|
||||
class FilesTool(Tool):
|
||||
name = "files"
|
||||
description = "Read and write files within allowed paths."
|
||||
|
||||
async def run(self, payload: dict[str, Any]) -> dict[str, Any]:
|
||||
action = str(payload.get("action", "read")).strip()
|
||||
path = Path(str(payload.get("path", "")).strip()).expanduser()
|
||||
return {
|
||||
"tool": self.name,
|
||||
"status": "stub",
|
||||
"action": action,
|
||||
"path": str(path),
|
||||
"message": "File integration is not wired yet.",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user