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:
parent
07c5078934
commit
fbcf44980e
5 changed files with 52 additions and 136 deletions
|
|
@ -159,7 +159,7 @@ def test_agent_api_wrapper_falls_back_to_legacy_url_constructor(monkeypatch):
|
|||
|
||||
wrapper = AgentApiWrapper(
|
||||
agent_id="agent-2",
|
||||
url="https://agent.example.com/v1/agent_ws/chat-9/",
|
||||
url="https://agent.example.com/agent_ws/",
|
||||
chat_id="chat-9",
|
||||
callback="cb",
|
||||
)
|
||||
|
|
@ -167,7 +167,7 @@ def test_agent_api_wrapper_falls_back_to_legacy_url_constructor(monkeypatch):
|
|||
assert calls == [
|
||||
{
|
||||
"agent_id": "agent-2",
|
||||
"url": "https://agent.example.com/v1/agent_ws/chat-9/",
|
||||
"url": "https://agent.example.com/agent_ws/?thread_id=chat-9",
|
||||
"callback": "cb",
|
||||
"on_disconnect": None,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue