WIP: PAIN
This commit is contained in:
@@ -106,7 +106,7 @@ def _is_allowed(path: Path) -> bool:
|
||||
"""
|
||||
# Blacklist check
|
||||
name = path.name.lower()
|
||||
if name == "history.toml" or name.endswith("_history.toml"):
|
||||
if name in ("history.toml", "config.toml", "credentials.toml") or name.endswith("_history.toml"):
|
||||
return False
|
||||
try:
|
||||
rp = path.resolve(strict=True)
|
||||
@@ -926,7 +926,9 @@ def dispatch(tool_name: str, tool_input: dict[str, Any]) -> str:
|
||||
if tool_name == "get_tree":
|
||||
return get_tree(path, int(tool_input.get("max_depth", 2)))
|
||||
return f"ERROR: unknown MCP tool '{tool_name}'"
|
||||
# ------------------------------------------------------------------ tool schema helpers
|
||||
|
||||
|
||||
# ------------------------------------------------------------------ tool schema helpers
|
||||
# These are imported by ai_client.py to build provider-specific declarations.
|
||||
|
||||
MCP_TOOL_SPECS: list[dict[str, Any]] = [
|
||||
@@ -1389,3 +1391,4 @@ MCP_TOOL_SPECS: list[dict[str, Any]] = [
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user