Plugin Migration Guide
Overview
Architecture Changes
Before: Standalone Clients
clients/
├── twitter-client/ # Standalone Node.js app
│ ├── package.json # Own dependencies
│ ├── src/ # Independent codebase
│ └── ...
└── telegram-client/ # (Would have been similar)After: Unified Plugins
agent/plugins/
├── twitter/ # Twitter plugin module
│ ├── twitter-plugin.ts # Plugin implementation
│ ├── services/ # Twitter-specific services
│ ├── auth/ # OAuth handling
│ ├── models/ # Data models
│ ├── package.json # Dependencies
│ ├── index.ts # Module exports
│ └── README.md # Documentation
├── telegram/ # Telegram plugin module
│ ├── telegram-plugin.ts # Plugin implementation
│ ├── package.json # Dependencies
│ ├── index.ts # Module exports
│ └── README.md # Documentation
├── example-plugin.ts # Simple example plugin
└── content-plugin.ts # Content generation pluginKey Differences
1. Plugin Interface
2. Message-Based Communication
3. Shared Services
4. Unified Configuration
Migration Steps
For Twitter Client
For Telegram Integration
Benefits of Plugin Architecture
Creating New Plugins
Best Practices
Future Improvements
Last updated