ADR 0001: Plugin Prerequisites and Dependency Installation
Status: accepted, 2026-11-13; amended 2026-11-20 by items 6 to 9. Items 8 and 9, the owner's decisions that a plugin's dependencies install with it with no manual step, amend items
Status: accepted, 2026-11-13; amended 2026-11-20 by items 6 to 9. Items 8 and 9, the owner's decisions that a plugin's dependencies install with it with no manual step, amend items 3 and 4.
Context
Plugins need things they do not contain: other plugins, and software or permissions outside Orquelo, often different per platform (computer use on macOS, a browser for login, Node.js for an MCP server). The manifest could only name other plugins (depends), which were checked at load and never installed. Everything else was undeclared, so it failed late: an MCP server whose command is missing became an unavailable component, a hook that cannot run denied tool calls, and the operator had to investigate.
Decision
- The manifest gains
prerequisites: each with a check (a command, optionally with a version range, or a path), an install recipe per platform (a package forbrew,apt,dnforwinget, a command, or a manual instruction), and a scope:systemorplugin. - Installation becomes a transaction: stage the plugin and its
dependsfrom the configured catalogs, plan the unmet prerequisites, commit, run, and roll back the committed plugins on failure. plugin-scope steps install into<state_dir>/deps/<plugin>(${PLUGIN_DEPS}) without confirmation.systemsteps run only after one confirmation (-yes, or theadmintool's approved argument), and the policydeny_system_installscan refuse them.- Loading checks prerequisites; an unmet one is the unavailability reason
prerequisite_missingwith its fix.orquelo plugin doctorrepairs. plugin.EnvgainsDepsDir, andManager.InstalltakesInstallOptions(Upgrade,AllowSystem).- A plugin coming into use installs its prerequisites too: adding or enabling an instance runs the plan, confirmation and steps of item 2 for its plugin, builtin plugins included; a failure leaves the configuration unchanged.
Manager.AddandManager.SetEnabledtakeInstallOptionsand return anInstallResult. - A
downloadstep (scope: pluginonly) fetches one file over https, checks its SHA-256 before using it, unpacksgzorzip, and writes it executable into${PLUGIN_DEPS}, so a plugin can pin a binary per platform without a system install. - A plugin's dependencies install with it: an unmet
plugin-scope prerequisite also installs whenever an instance of the plugin loads (serve, reload, or any command that loads the plugins), so an instance written into the configuration by hand gets it too;serve --preflightonly reports it.systemsteps run without-yes, at install and at load, when the policy setsallow_system_installs: true;deny_system_installsstill refuses them and wins, and the refusal names the command. A failed install leaves the instance unavailable with the step and its output, and the next load tries again. - A plugin gives the shell its commands: the manifest's
shellsection names directories under${PLUGIN_ROOT}or${PLUGIN_DEPS}, which come first on the PATH oflocalenvcommands, and variables, whose values may use${PLUGIN_DATA}. The Host puts what the instances a runtime uses declare intoCallContext.Shell, from manifests only. A path outside the plugin's own directories, or a reserved variable name, is refused when the manifest loads.
Consequences
- ◆This changes the Host contract after M6: the manifest schema,
plugin.Env,plugin.Manager, the registry's load checks and the installer. Plugins that declare nothing are unaffected. - ◆Orquelo can run package managers on the operator's machine. This is bounded by confirmation, policy, trust on change (install recipes are plugin content), no shell, and logs.
- ◆System packages are not uninstalled with a plugin, and their versions are not pinned.
- ◆Checks run at every load; each has a timeout so a hanging command cannot stall the Host.
- ◆A plugin's first load may take as long as its install, bounded by the install timeout.
- ◆In runs that use a plugin, its command shadows a system command of the same name: the owner chose that its pinned version wins. Installed plugins are trusted as before (trust on change).