Have agent construct the character plugins for the runtime. #3458
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to
No issue or ticket.
Risks
Something has changed in how plugins are constructed so that they shouldn't expect a
getSetting
function any more.Something else is supposed to construct the plugin and the code is there already but something changed in Eliza so that, in my configuration, I am failing to run it.
Background
What does this PR do?
After a character is loaded, it constructs the plugins before starting the runtime.
Without this change, the
AgentRuntime
constructor looks at a bunch of functions inopts.character?.plugins
and of course fails to find any properties on them.What kind of change is this?
Bug fixes (non-breaking change which fixes an issue)
I tried to use plugin-zilliqa, which used to work fine, then found with current
develop
none of its actions were being detected.Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Where should a reviewer start?
Try including plugins for a character then using its actions.
Detailed testing steps
Install plugin-zilliqa, have a character use,
then try to use its actions, e.g.,
![quote](https://private-user-images.githubusercontent.com/2630707/412363170-943283a5-907a-4616-ad4d-59437919ee9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0ODQ5NjMsIm5iZiI6MTczOTQ4NDY2MywicGF0aCI6Ii8yNjMwNzA3LzQxMjM2MzE3MC05NDMyODNhNS05MDdhLTQ2MTYtYWQ0ZC01OTQzNzkxOWVlOWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMjIxMTAzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzNkN2U3YWYyMjg3MzIzYWI5MGQyNmJiZWRlMjVjODFlZDI4MGYwNmNhMmE0ZWU4MzFlNmE3MjhjZjhiMDAwNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.hLrrRYEvElMRVX4YJDJxztAxRTvFavNcN6s2bon-sOk)
Deploy Notes
Deployment instructions
Install a plugin, as described above.
In
.env
you can use,and pick any random private key, e.g.,
You can get ZIL for the account from https://dev-wallet.zilliqa.com/faucet?network=testnet.
Discord username
mtbc