General framework for migrating elizaOS plugins to v1.x
Important: This guide provides a general framework for migrating elizaOS plugins to v1.x. Specific configurations will vary based on your plugin’s functionality.
Note: This branch will serve as your new 1.x version branch, keeping main
intact for legacy support.
biome.json
- Deprecated linter configurationvitest.config.ts
- Replaced by Bun test runnerlock.json
or yml.lock
filesWhy? The elizaOS ecosystem has standardized on:This ensures consistency across all elizaOS plugins and simplifies the development toolchain.
- Bun’s built-in test runner (replacing Vitest) - All plugins must now use
bun test
- Prettier for code formatting (replacing Biome)
Important: If your package name starts with@elizaos-plugins/
, remove the “s” from “plugins” to change it to@elizaos/
. This is the correct namespace for all elizaOS plugins in v1.x.
biome
, vitest
(if present)Important:bun
and@types/bun
are REQUIRED dependencies for all plugins in v1.x. The elizaOS ecosystem has standardized on Bun’s built-in test runner, replacing Vitest. Without these dependencies, your tests will not run properly.
Note: All test scripts now use Bun’s built-in test runner. Make sure you havebun
and@types/bun
installed as dev dependencies (see section 3.3).
agentConfig
with the new structure:
Note: Replace YOUR_PARAMETER_NAME
with your plugin’s specific configuration parameters. Common types include API keys, endpoints, credentials, etc.
tsup.config.ts
tsconfig.json
tsconfig.build.json
dist
folder contains compiled outputNext Steps: After verifying the build, proceed to Step 6 to migrate your actions and providers to handle the breaking API changes.
composeContext
with composePromptFromState
:
parseKeyValueXml
.
generateObject
with runtime.useModel
:
ModelClass.SMALL
→ ModelType.TEXT_SMALL
prompt
and optional stopSequences
parseKeyValueXml
which extracts key-value pairs from XML responsesparseKeyValueXml
function parses XML responses into key-value objectselizaLogger
for debuggingModelClass
to ModelType
enumget
method must now return a ProviderResult
object instead of any
:
name
Propertyname
property:
ProviderResult
object:
state
parameter is no longer optional. Update your function signature:
name
(required): Unique identifier used to reference the providerdescription
: Human-readable description of what the provider doesdynamic
: Set to true
if the provider returns different data based on contextposition
: Controls ordering in provider lists (positive = higher priority)private
: Set to true
to hide from public provider lists (must be called explicitly)text
for human-readable responsesdata
for structured data that other components might processvalues
for simple key-value pairs that might be used in templatestext
fieldname
property is now required for all providersProviderResult
object, not raw valuesstate
parameter is no longer optionaldescription
, dynamic
, etc.) for better documentation and behavior