fix: change the file tools dir

This commit is contained in:
Richard T
2026-01-20 10:33:34 -08:00
parent fae84ee301
commit a098c88413
3 changed files with 6 additions and 5 deletions
+1
View File
@@ -5,6 +5,7 @@ node_modules/
# Build outputs
dist/
build/
workdir/
.next/
out/
+2 -2
View File
@@ -146,13 +146,13 @@ Every tool folder needs a `README.md` with:
## Testing
Place tests in `tests/tools/test_my_tool.py`:
Place tests in `tests/tools/test_{{tool_name}}.py`:
```python
import pytest
from fastmcp import FastMCP
from aden_tools.tools.my_tool import register_tools
from aden_tools.tools.{{tool_name}} import register_tools
@pytest.fixture
@@ -1,13 +1,13 @@
import os
WORKSPACES_DIR = os.path.abspath(os.path.join(os.getcwd(), "workspaces"))
WORKSPACES_DIR = os.path.abspath(os.path.join(os.getcwd(), "workdir/workspaces"))
def get_secure_path(path: str, workspace_id: str, agent_id: str, session_id: str) -> str:
"""Resolve and verify a path within a 3-layer sandbox (workspace/agent/session)."""
if not workspace_id or not agent_id or not session_id:
raise ValueError("workspace_id, agent_id, and session_id are all required")
# Ensure session directory exists: workspaces/workspace_id/agent_id/session_id
# Ensure session directory exists: runtime/workspace_id/agent_id/session_id
session_dir = os.path.join(WORKSPACES_DIR, workspace_id, agent_id, session_id)
os.makedirs(session_dir, exist_ok=True)