Plugin Contracts¶
Purpose¶
This page defines the public plugin contract: namespace rules, lifecycle terms, supported kinds, and the hard limits users must understand before installing a plugin.
stateDiagram-v2
[*] --> discovered
discovered --> validated
validated --> installed
installed --> enabled
installed --> disabled
validated --> incompatible
installed --> broken
enabled --> disabled
disabled --> enabled This state diagram defines the stable lifecycle vocabulary for plugins. It is the reference for registry persistence and diagnostics, not just a loose sketch of possible states.
flowchart TD
A[plugin.manifest.json] --> B[namespace validation]
B --> C[compatibility validation]
C --> D[lifecycle registration]
D --> E[management and diagnostics surface] The second diagram shows how a manifest becomes part of the managed plugin surface: validate the namespace and compatibility first, then register the lifecycle state that later commands inspect and diagnose.
Namespace Rules¶
- plugins must not claim reserved root namespaces
- plugin namespaces are normalized to lowercase kebab-case
- plugin aliases are normalized to lowercase kebab-case
- namespace registration is rejected when it conflicts with built-ins or existing plugin namespaces
- case-insensitive collisions are rejected
- alias registration is rejected when it conflicts with built-ins, reserved namespaces, existing plugins, or other aliases
Lifecycle Terms¶
The stable lifecycle state terms are:
discoveredvalidatedinstalledenableddisabledbrokenincompatible
These terms are stable for registry persistence and diagnostics.
Lifecycle transitions are expected to validate metadata first, keep registry and filesystem state aligned, and avoid leaving ambiguous partial installs behind on failure.
Manifest And Kind Policy¶
- the durable local plugin contract is based on
plugin.manifest.json plugins installaccepts either a plugin directory root or an explicitplugin.manifest.jsonpath- current manifest baseline is
v2 - unknown major manifest versions are rejected
- supported executable kinds are
delegated,python, andexternal-exec delegatedandpythonentrypoints must usemodule:callabledelegatedandpythonexecution requires Python 3.11 or newer onPATHexternal-execentrypoints are executable filesystem paths or manifest-local executable namesnativeis reserved for forward compatibility and is intentionally not executable today
Stable Management Surface¶
The current plugin-management contract covers:
infolistinspectcheckenabledisableinstalluninstallscaffolddoctorreserved-nameswhereexplainschema
inspect may target one plugin or the full inventory. explain may target one plugin, an unknown name, or the full inventory summary. doctor is the registry-wide health and self-repair view. Installed plugin namespaces and declared plugin aliases are also executed as direct runtime subcommands under bijux when their kind and registry health allow it.
Stability Standard¶
Treat the plugin-management surface as stable only when all of the following remain true:
- scaffolded plugins are installable and checkable for the supported kinds
- install, uninstall, enable, and disable preserve registry consistency and rollback guarantees on failure
- corrupt registry input is diagnosable and any self-repair behavior is explicit
- plugin command failures keep the documented stdout, stderr, and exit-code contract
- current health evidence exists through live tests or maintainer checks instead of checked-in artifact snapshots
Trust And Safety Limits¶
- plugins are not sandboxed
- trust metadata may be surfaced as
core,verified,community, orunknown - capability and compatibility checks happen before activation
- broken and incompatible plugins must be diagnosed instead of silently treated as healthy
Honest Limit¶
This contract governs plugin compatibility and lifecycle behavior. It does not claim that plugin code is safe merely because it is installable.