-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
39 lines (32 loc) · 969 Bytes
/
__init__.py
File metadata and controls
39 lines (32 loc) · 969 Bytes
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
"""nse-orchestrator plugin for Hermes Agent."""
from __future__ import annotations
import sys
from pathlib import Path
_HERE = Path(__file__).resolve().parent
if str(_HERE) not in sys.path:
sys.path.insert(0, str(_HERE))
from .tools import ( # noqa: E402
NSE_CHECK_SCHEMA,
NSE_HEALTH_SCHEMA,
NSE_INIT_SCHEMA,
NSE_STATUS_SCHEMA,
handle_nse_check,
handle_nse_health,
handle_nse_init,
handle_nse_status,
)
_TOOLS = (
("nse_init", NSE_INIT_SCHEMA, handle_nse_init, "🧠"),
("nse_check", NSE_CHECK_SCHEMA, handle_nse_check, "🚦"),
("nse_health", NSE_HEALTH_SCHEMA, handle_nse_health, "❤️"),
("nse_status", NSE_STATUS_SCHEMA, handle_nse_status, "📊"),
)
def register(ctx) -> None:
for name, schema, handler, emoji in _TOOLS:
ctx.register_tool(
name=name,
toolset="nse",
schema=schema,
handler=handler,
emoji=emoji,
)