fix(sdk): correct WebSocket URL pattern for platform-agent

AgentApiWrapper._build_ws_url was building /v1/agent_ws/{chat_id}/
which does not exist in platform-agent. Fixed to /agent_ws/?thread_id={chat_id}
to match the actual endpoint and query-param isolation scheme.

Also simplify Matrix MVP settings handlers to MVP_UNAVAILABLE stubs
and add handle_unknown_command for unregistered !commands.
This commit is contained in:
Mikhail Putilovskij 2026-04-19 21:05:02 +03:00
parent 07c5078934
commit fbcf44980e
5 changed files with 52 additions and 136 deletions

View file

@ -76,7 +76,7 @@ class AgentApiWrapper(AgentApi):
@staticmethod
def _build_ws_url(base_url: str, chat_id: int | str) -> str:
return base_url.rstrip("/") + f"/v1/agent_ws/{chat_id}/"
return base_url.rstrip("/") + f"/agent_ws/?thread_id={chat_id}"
def for_chat(self, chat_id: int | str) -> "AgentApiWrapper":
return type(self)(