|
|
@@ -2048,10 +2048,53 @@ def hermes_env_enablement_fn() -> Optional[dict]:
|
|
|
# Plugin registration entry point
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
|
+# What each capability is called in the startup banner, keyed by the method
|
|
|
+# that implements it. Derived from real overrides rather than hard-coded, so
|
|
|
+# dropping a method drops its claim from the log instead of leaving a lie.
|
|
|
+_CAPABILITY_LABELS = {
|
|
|
+ "send": "text",
|
|
|
+ "send_image_file": "images",
|
|
|
+ "send_multiple_images": "image batches (bundled into one message)",
|
|
|
+ "send_video": "video",
|
|
|
+ "send_voice": "voice messages",
|
|
|
+ "send_document": "documents",
|
|
|
+ "add_reaction": "reactions",
|
|
|
+ "edit_message": "message editing",
|
|
|
+ "delete_message": "message deletion",
|
|
|
+ "send_typing": "typing indicators",
|
|
|
+ "create_handoff_thread": "threads",
|
|
|
+ "start_dm": "direct messages",
|
|
|
+ "create_room": "room creation",
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+def _capabilities() -> List[str]:
|
|
|
+ """Name the things this adapter genuinely implements itself.
|
|
|
+
|
|
|
+ A capability counts only when ChattoAdapter overrides the base method —
|
|
|
+ inheriting BasePlatformAdapter's fallback means the feature is not
|
|
|
+ natively supported, and announcing it would mislead.
|
|
|
+ """
|
|
|
+ found = [
|
|
|
+ label
|
|
|
+ for name, label in _CAPABILITY_LABELS.items()
|
|
|
+ if getattr(ChattoAdapter, name, None) is not getattr(BasePlatformAdapter, name, None)
|
|
|
+ ]
|
|
|
+ if ChattoAdapter.supports_code_blocks:
|
|
|
+ found.append("code blocks")
|
|
|
+ if ChattoAdapter.supports_status_text:
|
|
|
+ found.append("custom status text")
|
|
|
+ found.append("presence (refreshed while connected)")
|
|
|
+ return found
|
|
|
+
|
|
|
+
|
|
|
def register(ctx) -> None:
|
|
|
"""Plugin entry point — called by the Hermes plugin system."""
|
|
|
logger.info("Registering Chatto platform plugin on Hermes Agent")
|
|
|
|
|
|
+ for capability in _capabilities():
|
|
|
+ logger.info("Chatto capability: %s", capability)
|
|
|
+
|
|
|
logger.info("ChattoConfiguration.allowed_users.env_name: %s", ChattoConfiguration.allowed_users.env_name)
|
|
|
|
|
|
ctx.register_platform(
|