Skip to content

Repository files navigation

@spynejs/plugin-starter

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.

What's in it

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.

Run the demo

npm install
npm start

Then click Send notification and watch the event log.

Build the library

npm run build

Packages 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.

Make it yours

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.

License

MIT © Relevant Context, Inc.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages