Explorar el Código

Replace hand-rolled protobuf, WebSocket and REST with chattolib

The adapter maintained ~950 lines of manual protobuf encoding/decoding,
WebSocket framing and raw HTTP calls that chattolib already ships - every
protocol change had to be chased twice. chattolib[realtime] becomes the
single API surface: login and client state, rooms, messages, presence,
notifications, and stream_events() for realtime delivery instead of a
hand-rolled socket loop. This first half swaps the core; the remaining
_rpc() call sites follow in the next commit.
Paul Klumpp hace 1 mes
padre
commit
93dd87a932
Se han modificado 2 ficheros con 118 adiciones y 886 borrados
  1. 92 886
      adapter.py
  2. 26 0
      pyproject.toml

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 92 - 886
adapter.py


+ 26 - 0
pyproject.toml

@@ -0,0 +1,26 @@
+[build-system]
+requires = ["setuptools>=68.0"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "hermes-chatto-plugin"
+version = "1.0.0"
+description = "Chatto platform adapter for Hermes Agent"
+requires-python = ">=3.11"
+license = {text = "MIT"}
+authors = [
+    {name = "liv", email = ""},
+]
+dependencies = [
+    "chattolib[realtime]>=0.4.19",
+    "websockets>=13.0",
+]
+
+[project.optional-dependencies]
+dev = [
+    "pytest>=8.0",
+    "pytest-asyncio>=0.24",
+]
+
+[tool.setuptools.packages.find]
+where = ["."]

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio