Repository navigation
Description
Follow-up to #206 (plugin system) and #164 (extract WebFinger/OAuth). The observation driving this: JSS's optional features are already pseudo-plugins — server.js registers each as an encapsulated Fastify plugin with options, gated by a createServer flag. The plugin system (#206) shouldn't be built and then have plugins written for it; it should formalize what eight features already do, then open the door to third parties.
The core/plugin line
Core (never plugins): LDP/storage, the auth chain (Bearer/DPoP/NIP-98), WAC. These ARE the pod — everything depends on them, and "disabling" them is just a broken server. Honest layering keeps them in src/.
Bundled plugins (migrate):
| Feature | Today | Notes |
|---|---|---|
| notifications | notificationsPlugin |
|
| ActivityPub | activityPubPlugin + flag |
|
| webrtc | webrtcPlugin + path option |
|
| terminal | terminalPlugin |
security-sensitive — default off stays |
| tunnel | tunnelPlugin |
|
| remoteStorage | remoteStoragePlugin |
|
| MCP | createServer({mcp: true}) |
its TOOLS table also becomes a plugin seam (#206) |
| IDP / WebFinger / OAuth | idpPlugin |
exactly #164's ask |
Migration mechanics (mostly mechanical)
- Each feature gains a
jss.plugin.json({id, version, entry}) pointing at the module that already exists; entry wraps the current Fastify plugin inactivate(api)usingapi.fastify. createServerflags becomeplugins.entries.<id>.{enabled, config}— keep the old booleans as deprecated aliases for a transition window.- Adopt openclaw's "bundled plugin" concept (shared with jsclaw): shipped in-tree, sensible defaults, but loaded through the same machinery as external plugins — so
plugins listshows them, allow/deny applies, and the loader has eight battle-tested consumers from day one. - The features themselves are the test suite: behavior must be byte-identical behind the new loading path.
Ordering
- Plugin system for JSS #206 loader lands (manifest, policy,
api.fastify) - One low-risk migration proves it (tunnel or remoteStorage)
- Extract WebFinger and OAuth into standalone always-on plugins #164 (IDP/WebFinger/OAuth) — the already-requested one
- The rest in any order; MCP last (it grows the extra
registerMcpToolseam while moving)
Result: server.js shrinks toward core-only, every optional feature demonstrates the plugin contract, and third-party plugins (#157 CardDAV, #184 pane store) arrive into a system with eight working examples.
Reference: the same migration logic in jsclaw — its channels/commands/MCP tools were built in-tree first, then the plugin layer (jsclaw/jsclaw#64, jsclaw/jsclaw#77) formalized the seams they already used.
Activity
bump version to 0.0.213
bump version to 0.0.214
bump version to 0.0.215
bump version to 0.0.216
bump version to 0.0.217