You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is currently a draft/brain dump for this idea - I will do some clean up in the future
Goal
Allow users to test opsdroid from the browser and enable/disable modules from a running bot.
Problem
You need to edit your config when opsdroid isn't running to add connectors/skills. You also need to add a connector to interact with opsdroid since the default connector is the WebSocket one.
Context
Often, when opsdroid is running, and you have many skills/connectors, it can be hard to figure out what modules are running without looking into the config, having logging set to debug mode, or running one of the list config CLI commands. Users also need to install a connector to interact with the bot since opsdroid comes only pre-installed with the WebSocket connector.
Implementation Details
Extending the opsdroid API
We need to extend the existing API to allow us to list all modules by type (connectors, parsers, skills) and update modules to toggle them on/off. We could as well allow users to include modules.
I have a POC branch where I am hacking some of the API. It does mostly:
Add get route to list connectors, skills, parsers, config (
sensitive configuration params like tokens are removed from the config that we return
Add patch route to update a module
Add a new payload dataclass with a bunch of validation so we can handle user input better
Add command-center parameter to the web section to enable the new API endpoints, and in the future, the UI
Added a token parameter under command-center that will be used for a poor-man authorization
In the future, I want to generate a new token on each start of opsdroid (if the user didn't provide one) and push this into an envvar so the UI can use it
We should also create a new param under command-center to allow users to toggle the UI on/off as well letting them specify a port in which the UI runs.
Jacob created an electron app (opsdroid desktop that allowed users to download the app, start opsdroid, and you could interact with opsdroid from within the electron app. A user (sorry don't recall who) suggested that we split the electron app and the web component to run opsdroid within the browser.
In response, opsdroid web was created. But we haven't touched it in a very, very, very long time, and at least on Node 16, you can't even start opsdroid web because many modules are deprecated and a lot of things fail. I've started updating opsdroid web dependencies, but I still have issues with some things. Once the API is finished, I will dedicate more time to working on the opsdroid web.
Once opsdroid desktop is usable, we could make opsdroid desktop install opsdroid web from npm and be a wrapper for it (this was the original idea for us to split the app, but I don't think we implemented this?)
Suggestions
Since we already have opsdroid web created, we can use this as our command centre UI and extend it since opsdroid web is just a chat window.
TBD -> Opsdroid web mockup
Here's a rough overview of the things that I would like to add to opsdroid dev:
Keep the chat windows always on the right
Add a sidebar that shows status by calling the /stats endpoint from time to time
Add a tab that contains the config (with sensitive parameters removed)
Section with modules that users can enable/disable
Allow users to toggle core skills even if they haven't been running
Use an environment var to toggle the sidebar for the command-centre on/off
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is currently a draft/brain dump for this idea - I will do some clean up in the future
Goal
Allow users to test opsdroid from the browser and enable/disable modules from a running bot.
Problem
You need to edit your config when opsdroid isn't running to add connectors/skills. You also need to add a connector to interact with opsdroid since the default connector is the WebSocket one.
Context
Often, when opsdroid is running, and you have many skills/connectors, it can be hard to figure out what modules are running without looking into the config, having logging set to debug mode, or running one of the
list config
CLI commands. Users also need to install a connector to interact with the bot since opsdroid comes only pre-installed with the WebSocket connector.Implementation Details
Extending the opsdroid API
We need to extend the existing API to allow us to list all modules by type (connectors, parsers, skills) and update modules to toggle them on/off. We could as well allow users to include modules.
I have a POC branch where I am hacking some of the API. It does mostly:
command-center
parameter to theweb
section to enable the new API endpoints, and in the future, the UIcommand-center
that will be used for a poor-man authorizationThe configuration looks like this atm:
We should also create a new param under
command-center
to allow users to toggle the UI on/off as well letting them specify a port in which the UI runs.Using Opsdroid web
Background info and current status
Jacob created an electron app (opsdroid desktop that allowed users to download the app, start opsdroid, and you could interact with opsdroid from within the electron app. A user (sorry don't recall who) suggested that we split the electron app and the web component to run opsdroid within the browser.
In response, opsdroid web was created. But we haven't touched it in a very, very, very long time, and at least on Node 16, you can't even start opsdroid web because many modules are deprecated and a lot of things fail. I've started updating opsdroid web dependencies, but I still have issues with some things. Once the API is finished, I will dedicate more time to working on the opsdroid web.
Once opsdroid desktop is usable, we could make opsdroid desktop install opsdroid web from npm and be a wrapper for it (this was the original idea for us to split the app, but I don't think we implemented this?)
Suggestions
Since we already have opsdroid web created, we can use this as our command centre UI and extend it since opsdroid web is just a chat window.
TBD -> Opsdroid web mockup
Here's a rough overview of the things that I would like to add to opsdroid dev:
/stats
endpoint from time to timeThe text was updated successfully, but these errors were encountered: