File size: 1,310 Bytes
bbf161a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
def __getattr__(name):
    if name in ("types", "server", "client", "shared"):
        raise ImportError(f"No module named 'mcp.{name}' in local mcp package")
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")

from . import hf_private  # ESVIAL: refs privadas con HF_TOKEN
from .get_task_list import handle_get_task_list
from .run import handle_run
from .get_task_status import handle_get_task_status
from .error_schema import make_error, make_validation_error, make_not_found_error
try:
    from .mcp_gradio_integration import (
        register_high_level_mcp_apis,
        cleanup_dependencies_api_names,
        patch_gradio_api_suppression,
        HIGH_LEVEL_MCP_API_NAMES,
    )
except ImportError:
    register_high_level_mcp_apis = None
    cleanup_dependencies_api_names = None
    patch_gradio_api_suppression = None
    HIGH_LEVEL_MCP_API_NAMES = set()

MCP_FUNCTIONS = [
    handle_get_task_list,
    handle_run,
    handle_get_task_status,
]

__all__ = [
    "handle_get_task_list",
    "handle_run",
    "handle_get_task_status",
    "make_error",
    "make_validation_error",
    "make_not_found_error",
    "register_high_level_mcp_apis",
    "cleanup_dependencies_api_names",
    "patch_gradio_api_suppression",
    "HIGH_LEVEL_MCP_API_NAMES",
    "MCP_FUNCTIONS",
]