-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle extra config properties provided by third-party plugins #1012
Comments
Initial idea of ASF API response: Two |
I also wanted to add a new view where every plugin is listed (i think abry suggested this on disc). Maybe we should add those config properties there? Not sure if we want to extend default global config view. Or maybe that would be problematic since plugins can also add config properties for bots. Hm... I am sure you and Mole will think about it and come up with the best solution. |
Good idea actually, there can be plugins view and in that view, optionally, each plugin can list its additional dependencies, like extra config properties. Much more robust than just dedicated view for config properties. I'll start working on it and let you know once there is something you can code logic for. |
Can plugins extend bot config? If yes then we have to think about how we gonna handle that in the new plugin view. |
yes. I did suggest that. The reason why I haven't already made a PR for this is, that I wanted to combine it with providing extra config properties to ASF-ui as well and I didn't have the time to think about the way to do it yet.
Yes. Plugins receive all additional configuration values when bot config is loaded. My thought would be to add a "section" (maybe use |
Our latest discussion with @Aareksio resulted in a bit different approach: Instead of any additional API endpoint, plugins can tag schemas in |
(API endpoint for discovering currently-loaded plugins is still a fine idea, but something entirely different than what we're doing in this issue, and that one indeed needs a standalone API endpoint) |
Purpose
ASF-ui should be aware of extra properties that are provided by third-party plugins, "added" to the bot and global configs, without existing in ASF's structure.
Solution
Up to discussion, for now I'm thinking of ASF API that could ask all currently loaded plugins to provide a map of ConfigType (ASF or Bot) and Class reference of the structure that it appends to the config. Then ASF-ui could read that and present user "extended" view as union of all of those.
Alternatives
I'm open for other ideas.
Additional information
This will be needed if ASF-ui wants to handle
SteamTokenDumperPluginEnabled
as described on https://github.com/JustArchiNET/ArchiSteamFarm/wiki/SteamTokenDumperPluginThe text was updated successfully, but these errors were encountered: