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

feat: create example folder with example plugin #1004

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

monilpat
Copy link
Collaborator

@monilpat monilpat commented Dec 12, 2024

Relates to:

Initial setup of example plugin structure, to come examples of adapters, clients, services, etc. This will make it easier to standardize development, best practices, code review, and ultimately quality of the repo.

Risks

Low - This is an example plugin that serves as a template/reference implementation

Background

What does this PR do?

Creates an example plugin folder with a sample implementation including:

  • Basic plugin structure
  • Sample actions, providers, and evaluators
  • TypeScript configuration
  • Build setup with tsup
  • NPM package configuration

What kind of change is this?

Features (non-breaking change which adds functionality)

Documentation changes needed?

My changes do require a change to the project documentation which is included. Will update the global readme once all examples are added.

Testing

Where should a reviewer start?

  1. Review the plugin structure in packages/_examples/plugin/
  2. Key files to review:
    • src/plugins/samplePlugin.ts - Main plugin definition
    • src/actions/sampleAction.ts - Example action implementation
    • src/providers/sampleProvider.ts - Example provider implementation
    • src/evaluators/sampleEvaluator.ts - Example evaluator implementation

Detailed testing steps

  1. Navigate to the plugin directory:

@monilpat monilpat marked this pull request as ready for review December 12, 2024 04:15
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not just index.ts why a subfolder called plugins? Are you hoping a plugin can include more than one plugin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We introduced the plugins subfolder structure to accommodate scenarios where a single "umbrella" plugin might contain multiple, more specialized plugins or modules. For example, Coinbase could have distinct functionalities like trading, token transfers, and commerce invoice creation. Organizing these capabilities within a dedicated directory allows for better modularity, scalability, and maintainability as the plugin’s functionality grows over time.

@odilitime odilitime changed the base branch from main to develop December 12, 2024 07:20
@odilitime odilitime deleted the branch elizaOS:develop December 13, 2024 02:37
@odilitime odilitime closed this Dec 13, 2024
@odilitime odilitime reopened this Dec 13, 2024
@monilpat monilpat merged commit 5a3d348 into elizaOS:develop Dec 13, 2024
3 of 4 checks passed
@monilpat monilpat deleted the realitySpiral/addExamples branch December 13, 2024 04:09
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.

3 participants