borgee-hermes-plugin 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- borgee_hermes/__init__.py +44 -0
- borgee_hermes/adapter.py +1140 -0
- borgee_hermes/bridge.py +113 -0
- borgee_hermes/cli.py +114 -0
- borgee_hermes/config.py +120 -0
- borgee_hermes/inbox.py +1078 -0
- borgee_hermes/locks.py +115 -0
- borgee_hermes/py.typed +1 -0
- borgee_hermes/tools.py +640 -0
- borgee_hermes_plugin-0.1.3.data/data/share/borgee-hermes-plugin/plugin.yaml +10 -0
- borgee_hermes_plugin-0.1.3.dist-info/METADATA +210 -0
- borgee_hermes_plugin-0.1.3.dist-info/RECORD +16 -0
- borgee_hermes_plugin-0.1.3.dist-info/WHEEL +5 -0
- borgee_hermes_plugin-0.1.3.dist-info/entry_points.txt +5 -0
- borgee_hermes_plugin-0.1.3.dist-info/licenses/LICENSE +21 -0
- borgee_hermes_plugin-0.1.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Borgee platform plugin for Hermes Agent."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from .adapter import BorgeePlatformAdapter
|
|
8
|
+
from .config import apply_yaml_config, check_requirements, validate_config
|
|
9
|
+
from .tools import register_borgee_tools, set_active_adapter
|
|
10
|
+
|
|
11
|
+
__version__ = "0.1.3"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _adapter_factory(config: Any) -> BorgeePlatformAdapter:
|
|
15
|
+
"""Create the adapter and expose its BPP client to the tool handlers."""
|
|
16
|
+
adapter = BorgeePlatformAdapter(config)
|
|
17
|
+
set_active_adapter(adapter)
|
|
18
|
+
return adapter
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def register(ctx: Any) -> None:
|
|
22
|
+
"""Register the Borgee messaging platform and tools with Hermes."""
|
|
23
|
+
ctx.register_platform(
|
|
24
|
+
name="borgee",
|
|
25
|
+
label="Borgee",
|
|
26
|
+
adapter_factory=_adapter_factory,
|
|
27
|
+
check_fn=check_requirements,
|
|
28
|
+
validate_config=validate_config,
|
|
29
|
+
required_env=["BORGEE_API_KEY"],
|
|
30
|
+
apply_yaml_config_fn=apply_yaml_config,
|
|
31
|
+
max_message_length=4096,
|
|
32
|
+
pii_safe=True,
|
|
33
|
+
allow_update_command=False,
|
|
34
|
+
platform_hint=(
|
|
35
|
+
"You are chatting through Borgee. Channel conversations are shared "
|
|
36
|
+
"with all channel members, so attribute participants by name."
|
|
37
|
+
),
|
|
38
|
+
emoji="🟣",
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
register_borgee_tools(ctx)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
__all__ = ["BorgeePlatformAdapter", "__version__", "register"]
|