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
|
|
@ -10,13 +10,13 @@ from adapter.matrix.handlers.confirm import make_handle_cancel, make_handle_conf
|
|||
from adapter.matrix.handlers.context_commands import (
|
||||
make_handle_context,
|
||||
make_handle_load,
|
||||
make_handle_reset,
|
||||
make_handle_save,
|
||||
)
|
||||
from adapter.matrix.handlers.settings import (
|
||||
handle_help,
|
||||
handle_settings,
|
||||
handle_settings_connectors,
|
||||
handle_unknown_command,
|
||||
handle_settings_plan,
|
||||
handle_settings_safety,
|
||||
handle_settings_skills,
|
||||
|
|
@ -43,6 +43,7 @@ def register_matrix_handlers(
|
|||
dispatcher.register(IncomingCommand, "archive", make_handle_archive(client, store))
|
||||
dispatcher.register(IncomingCommand, "help", handle_help)
|
||||
dispatcher.register(IncomingCommand, "settings", handle_settings)
|
||||
dispatcher.register(IncomingCommand, "reset", handle_settings)
|
||||
dispatcher.register(IncomingCommand, "settings_skills", handle_settings_skills)
|
||||
dispatcher.register(IncomingCommand, "settings_connectors", handle_settings_connectors)
|
||||
dispatcher.register(IncomingCommand, "settings_soul", handle_settings_soul)
|
||||
|
|
@ -54,9 +55,9 @@ def register_matrix_handlers(
|
|||
dispatcher.register(IncomingCallback, "confirm", make_handle_confirm(store))
|
||||
dispatcher.register(IncomingCallback, "cancel", make_handle_cancel(store))
|
||||
dispatcher.register(IncomingCallback, "toggle_skill", handle_toggle_skill)
|
||||
dispatcher.register(IncomingCommand, "*", handle_unknown_command)
|
||||
|
||||
if agent_api is not None and prototype_state is not None:
|
||||
dispatcher.register(IncomingCommand, "save", make_handle_save(agent_api, store, prototype_state))
|
||||
dispatcher.register(IncomingCommand, "load", make_handle_load(store, prototype_state))
|
||||
dispatcher.register(IncomingCommand, "reset", make_handle_reset(store, agent_base_url))
|
||||
dispatcher.register(IncomingCommand, "context", make_handle_context(store, prototype_state))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue