Ver Fonte

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 há 1 mês atrás
pai
commit
93dd87a932
2 ficheiros alterados com 118 adições e 886 exclusões
  1. 92 886
      adapter.py
  2. 26 0
      pyproject.toml

Diff do ficheiro suprimidas por serem muito extensas
+ 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 = ["."]

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff