WIP: PAIN

This commit is contained in:
2026-03-05 14:24:03 -05:00
parent e81843b11b
commit 0e3b479bd6
27 changed files with 684 additions and 772 deletions

View File

@@ -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]] = [
}
}
]