A working template for building SpyneJS plugins. Clone it, rename it, customize it — the customization path is written for an AI agent to execute (see below), and works the same by hand.
One complete, running plugin: NotifyPlugin, a notification stub. One channel (CHANNEL_NOTIFY), one persistent container view, self-dismissing notification items. It exists to demonstrate the full shape of a SpyneJS plugin — channel contract, plugin hooks, view ownership, packaging — with the least possible surface.
The demo is the round trip: the dev shell sends a notification through the channel, the plugin renders it, and the plugin's broadcast events (SHOWN / DISMISSED / CLICKED) re-enter the stream and appear in a visible event log.
npm install
npm startThen click Send notification and watch the event log.
npm run buildPackages the plugin module (only — never the demo shell) to lib/ as a UMD library, with spyne externalized. package.json main points at the build, so consumers import the clean path.
The template becomes a real plugin by a rename-and-rewire pass across a fixed set of locations that must change together. That set, and the extension pattern for growing the plugin's channel vocabulary, live in AGENTS.md — written for an AI agent to execute directly. Point your agent at it, or follow it yourself.
The SpyneJS knowledge an agent needs ships with this template as the @spynejs/kb dependency — nothing to configure.
MIT © Relevant Context, Inc.