Skip to content
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

Add support for passing params to plugin #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dylan1951
Copy link
Contributor

Resolves #149

Screenshot 2025-02-27 at 9 37 45 PM Screenshot 2025-02-27 at 9 38 28 PM

Can pass params via client.runPlugin("abc..", {characterId: 1234}) or input with GUI.

Specify params in plugin config.json

Screenshot 2025-02-27 at 9 38 53 PM

I was going to make an example plugin etc but ran out of time for now maybe this is useful.

@@ -356,6 +361,7 @@ export type PluginConfig = {
requests: { method: string; url: string }[]; // List of requests that the plugin is allowed to make
notaryUrls?: string[]; // List of notary services that the plugin is allowed to use (optional)
proxyUrls?: string[]; // List of websocket proxies that the plugin is allowed to use (optional)
parameters?: Record<string, ParameterConfig>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this should be a config for Step instead of top-level Plugin since it's more flexible to define in a step to collect params from input.

It can be done in a separate PR though. Could you refactor so that this PR only add the ability to include a parameter when invoke using Provider API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, yeah params for each step makes sense.

Sure I will try refactor this weekend so that this PR only allows params via Provider API.

@0xtsukino
Copy link
Collaborator

this is awesome @dylan1951 ! Thank you for your contribution 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passing params when run plugin
2 participants