File size: 851 Bytes
aa15bce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""Task registry for execution agents."""

from __future__ import annotations

from typing import Any, Callable, Dict, List

from .search_email.schemas import get_schemas as _get_email_search_schemas
from .search_email.tool import build_registry as _build_email_search_registry


# Return tool schemas contributed by task modules
def get_task_schemas() -> List[Dict[str, Any]]:
    """Return tool schemas contributed by task modules."""

    return [*_get_email_search_schemas()]


# Return executable task tools keyed by name
def get_task_registry(agent_name: str) -> Dict[str, Callable[..., Any]]:
    """Return executable task tools keyed by name."""

    registry: Dict[str, Callable[..., Any]] = {}
    registry.update(_build_email_search_registry(agent_name))
    return registry


__all__ = [
    "get_task_registry",
    "get_task_schemas",
]