Expand description
Plugins for the neuro-kitchen apps, as separate programs (lumen’s model plugins, dsp-kitchen’s sorters). The app never links a plugin, so a plugin never adds weight, licences or a runtime to the app, and can be installed, updated or removed on its own.
protocol: requests and events, JSON lines over the program’s stdin and stdout.PluginInfo: what a plugin offers (its manifest): name, version, the protocol it speaks, its licence, its capabilities, whether its runtime is ready, and the app’s own fields.PluginInfo::compatibleis the handshake.PluginKind: an app’s plugins (programs named<prefix><name>) and where they are found (PluginKind::discover).PluginProcess: a plugin in server mode, kept alive between requests.Manager: install (from a file or a verified download), update, remove, disk use.
The manager’s Settings page is kitchen-shell’s (plugins_view::PluginsPage): the runtime
draws nothing.
Re-exports§
pub use client::PluginProcess;pub use discover::PluginKind;pub use manager::Installed;pub use manager::Manager;pub use protocol::CoreRequest;pub use protocol::Event;pub use protocol::PROTOCOL;
Modules§
- client
- A plugin in server mode (from lumen’s client):
<program> serve, kept alive so what it loaded stays loaded (a model, SAM’s image embedding between clicks). Blocking: the app calls it off the UI thread. - discover
- Finding an app’s plugin programs (from lumen’s discovery): every executable named
<prefix><name>in, in order,$<ENV>(folders separated as inPATH), the user’s plugin folder ($XDG_DATA_HOME/<app>/pluginsor~/.local/share/<app>/plugins), the folder of the running program (an installed app with its plugins beside it, ortarget/<profile>in development) andPATH. The first program of each name wins; each is asked for its manifest (<program> info). - manager
- The plugin manager: what is installed and how much room it takes; install a plugin from a
file or a verified download (
kitchen_downloads), update it, remove it (and what it downloaded). A plugin is installed only after it answers the handshake (its manifest, the same protocol). - protocol
- Requests and events between an app and a plugin: one JSON object per line (from lumen’s model
plugins). The app writes a request (an object with a
"request"tag) to the program’s stdin; the program answers on its stdout withEvents:progressany number of times, then exactly onedoneorerror. Large data (images, masks, signals) travels as files named in the request, never through JSON.
Structs§
- Plugin
Info - A plugin program and what it offers (its answer to
info). - Runtime
Status - Whether a plugin’s runtime can run here, and why not.