Writing a Plugin
Walking through the seeded rolling-avg-rpm plugin end to end.
The source lives at
packages/plugin-sdk/examples/rolling-avg-rpm/src/index.ts.
Project layout
my-plugin/
├── plugin.json ← manifest (id, version, interfaces, …)
├── package.json ← npm metadata + scripts
├── tsconfig.json ← extends @race/plugin-sdk's tsconfig
├── src/
│ └── index.ts ← the plugin entry point
└── tests/
└── index.test.ts ← optional — runs as plain vitest
1. Declare the manifest
plugin.json:
{
"id": "your-team:my-plugin",
"version": "1.0.0",
"interfaces": ["math", "kpiProcessor"],
"capabilities": [],
"publisher": "Your Team",
"description": "What this plugin does."
}