Kael’s plugin architecture lets you extend any application with isolated, capability-gated components that run either as native child processes or inside a sandboxed WASM runtime. Every plugin is described by aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Augani/kael/llms.txt
Use this file to discover all available pages before exploring further.
PluginManifest, which declares the plugin’s identity, its execution model, the capabilities it needs from the host, and the UI contribution points it registers (commands, menu items, panels). The host validates manifests before activation and enforces the capability model at runtime through the permission broker.
PluginManifest
PluginManifest is the serializable root of every plugin description. It derives Debug, Clone, PartialEq, serde::Serialize, and serde::Deserialize.
rust
Plugin identifier. A reverse-DNS style string is recommended (e.g.
"com.mycompany.my-plugin"). Must be non-empty.Human-readable display name. Shown in plugin management UI. Must be non-empty.
Plugin version in semver format (e.g.
"1.2.3"). Must be non-empty.The Kael API version this plugin targets. The host may use this to gate compatibility.
A short human-readable description of what the plugin does.
The plugin author name or contact.
Path to the executable or WASM module that the host launches. Must be non-empty.
How the plugin code is executed. See
ExecutionModel.The list of
Capability values the plugin requests from the host. The host validates and may prompt the user for high-risk capabilities.Command-line arguments passed to
entry_point at launch. Omitted from serialization when empty.UI and behavior contribution points the plugin registers. See
Contributions.Parsing
You can deserialize aPluginManifest from JSON or TOML. Both methods call validate() before returning.
rust
validate
rust
id, name, version, and entry_point are all non-empty. Returns an anyhow::Error with a descriptive message on the first failing field. Called automatically by from_json, from_toml, and load.
high_risk_capabilities
rust
capabilities for which Capability::is_high_risk() returns true. Use this at load time to surface a user-facing prompt before granting dangerous permissions.
rust
PluginManifestBuilder
For programmatic manifest creation, use the fluent builder:rust
.build() calls validate() and returns Result<PluginManifest>.
ExecutionModel
Controls how the host spawns and isolates the plugin.rust
The plugin runs as a separate native OS process. Communication with the host uses typed IPC. This model provides the strongest isolation but has higher startup overhead.
The plugin runs inside a sandboxed WASM runtime embedded in the host process. This model has lower startup overhead but depends on your WASM runtime’s sandbox guarantees.
Contributions
TheContributions struct groups all UI and behavior extension points a plugin may register.
rust
ContributedCommand
A command palette entry contributed by the plugin.rust
ContributedMenuItem
A menu item inserted into an application menu.rust
ContributedPanel
A dockable panel contributed to the workspace.rust
PanelPosition controls the default dock side:
| Variant | Description |
|---|---|
Left | Dock to the left side of the workspace. |
Right | Dock to the right side of the workspace. |
Bottom | Dock to the bottom of the workspace. |
Floating | Float as a separate window or overlay. |
settings_schema
An optionalserde_json::Value containing a JSON Schema that describes the plugin’s settings object. The host can use this to generate a settings UI or validate user configuration.
Capability
Capability is an enum of explicit grants for dangerous actions. The default for all high-risk capabilities is deny. Plugins declare the capabilities they need in their manifest; the host’s PermissionBroker enforces them at runtime.
rust
PathScope
Scopes filesystem capabilities to limit blast radius.rust
High-risk capabilities
Capability::is_high_risk() returns true for:
ShellExecuteClipboardReadNetwork { .. }(any hosts)CameraScreenCaptureFilesystemRead { scope: PathScope::Any }FilesystemWrite { scope: PathScope::Any }
rust
FilesystemRead and FilesystemWrite with PathScope::AppData, Downloads, or UserSelected are not considered high-risk, because their scope is bounded by the platform’s sandbox.ExtensionHost
ExtensionHost manages the lifecycle of all loaded plugins. It maintains an internal HashMap<String, ExtensionInfo> keyed by plugin id.
rust
ExtensionInfo
The host stores oneExtensionInfo per loaded plugin:
rust
true after activate() or attach_process() has been called and before deactivate().Set by
attach_process() when the plugin runs as an ExternalProcess.When
true, the extension was loaded in development mode (the host does not copy it to the extensions directory).