-
Notifications
You must be signed in to change notification settings - Fork 0
Create Plugin Package Architecture & SDK #43
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestsecurity
Description
Overview
Establish the structure for standalone plugin packages and create the plugin SDK for external plugin development.
Context
Related to PR #40 - Enable modular plugin development similar to n8n's node packages.
Implementation Steps
1. Create Plugin SDK Package
Create packages/plugin-sdk/:
- Export all core types from plugin-system
- Provide helper functions:
createPlugin(),PluginAuth.OAuth2(),PluginAuth.ApiKey() - Include utilities for common operations
2. Define Plugin Package Structure
Standard structure for all plugins:
@axebase/plugin-{name}/
├── package.json # Plugin manifest
├── src/
│ ├── index.ts # Plugin entry point
│ ├── trigger.ts # Trigger implementation (if applicable)
│ ├── actions/ # Actions (if applicable)
│ ├── auth.ts # Auth configuration
│ └── utils.ts # Helpers
├── README.md
└── tsconfig.json
3. Package.json Convention
{
"name": "@axebase/plugin-google-forms",
"keywords": ["axebase-plugin"],
"axebase": {
"plugin": {
"type": "integration",
"triggers": ["./dist/trigger.js"],
"actions": ["./dist/actions/*.js"]
}
},
"peerDependencies": {
"@axebase/plugin-sdk": "^1.0.0"
}
}4. Create Example Plugin
Create @axebase/plugin-google-forms as reference implementation:
- Full implementation following the architecture
- Documentation for developers
- Demonstrates webhook trigger pattern
5. Helper Functions
// Simplified plugin creation
export function createPlugin(config: PluginConfig): Plugin;
export function createTriggerPlugin(config: TriggerPluginConfig): TriggerPlugin;
export function createActionPlugin(config: ActionPluginConfig): ActionPlugin;
// Auth helpers
export const PluginAuth = {
None: () => ({ type: 'none' }),
ApiKey: (config) => ({ type: 'api-key', fields: [...] }),
OAuth2: (config) => ({ type: 'oauth2', ... })
};Acceptance Criteria
- Plugin SDK package created and published (or linked locally)
- Standard plugin package structure documented
- Helper functions implemented and tested
- Reference plugin (google-forms) created
- Plugin discovery via package.json
axebasefield works - Documentation for creating plugins written
Dependencies
- Issue feat: tRPC Initalized #1 (Plugin System Foundation) must be completed first
Estimated Effort
- Large (8-12 hours)
Backlink: #40
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestsecurity