Command Plugin System
- Status: Done
- Kind: Feature
- Authors: Jean Mertz git@jeanmertz.com
- Date: 2026-09-28
- Implements: 072
- Label: type=tracking
Tracking ticket for RFD 072.
Implementation plan
- Build protocol core and dispatcher: Defines the JSON-lines protocol message types in a new
jp_plugincrate, implements the host-side message loop (spawn child, sendinit, relay requests toWorkspacemethods, capture stderr to tracing), and implements unknown-subcommand dispatch via$PATHsearch forjp-<name>. Validated with a minimal shell script plugin. - Extract web server as external plugin: Moves the web server into a standalone
jp-servebinary crate with its own plugin-side protocol client, removesjp serveas a built-in command in favor of plugin dispatch, and drops thejp_webdependency fromjp_cli. - Add plugin registry and auto-install: Defines the registry JSON format and implements fetching, caching, and checksum-validated binary downloads, plus a silent/prompted install flow and new
jp plugin list/install/updatesubcommands. - Ship write operations: Delivers task-level write operations (
ArchiveConversation,SetTitle,WriteDraft,Querywith aCreatedresponse) that each perform their own locking on the host, so a plugin never holds a lock or appends events directly. - Implement command routing and plugin dependencies: Wires the
commandfield fromDescribeand registry keys into actual routing (replacing binary-name-only derivation), applies the longest-path-wins and conflict-diagnostic rules, cachesdescriberesponses, updatesjp plugin installto resolverequiresdependencies, and implementscommand_grouphelp aggregation with merged sub-plugin listings. - Add admission, containment, and output routing: Enforces admission checks before every plugin spawn (including
describe), terminates the plugin's process group/job object after the shutdown grace period, and routesprintmessages through the host printer by channel and format instead of writing raw text to stdout.
Comments
- From: jp
- Date: 2026-09-28T21:04:06Z
Phases 5 and 6 are implemented; every phase of RFD 072 is now checked. Along the way, RFD 077 Phase 4 (unattended → allow) and Phase 5 (explicit installs) landed too.
Before just rfd-promote 072 to Implemented: RFD 077 is still in Discussion, and 072 is Required by it, not the reverse, so nothing gates the promotion. RFD 077 Phase 3 still has one open bullet (show the plugin kind in jp plugin list).
- From: jp
- Date: 2026-09-30T08:35:40Z
- Re: #1
RFD 077 Phase 3's last bullet is done too: jp plugin list shows each registry entry's type (command or command group), and the registry reads entries one at a time, so an entry of an unknown type is skipped instead of failing the whole registry.
Running an installed plugin no longer reaches the network: official plugins update through jp plugin update, and the manifest cache is gone. RFD 072's registry section describes when JP fetches.