Expand description
Plugin capabilities — declared in manifest, granted at load time.
A Capability is the unit of permission in the plugin framework. Every
extension surface (Capability::ScalarFn, Capability::Storage, …) is
gated by a capability; every host import that exposes powerful primitives
(network, filesystem, secrets, host-side query) is gated by an attenuated
capability (Capability::Network { allow }).
Enforcement happens in three layers:
- Registrar gate —
PluginRegistrar::scalar_fnetc. check the effective capability set before accepting a registration. - WIT linker — for WASM plugins, host imports for capability-gated
functions are linked into the wasmtime
Linkeronly when the corresponding capability is granted. Ungranted host functions are not present in the plugin’s imports table. - Runtime pattern checks — capability grants with patterns
(
Filesystem { read: vec!["/data/**"] }) validate the actual call arguments against the pattern before dispatching.
Structs§
- Capability
Set - A set of capabilities — declared by manifest, granted by loader.
- Manifest
Capability - A capability as it appears in a guest plugin manifest (WASM / Extism) —
either a bare capability name (
"network","scalar-fn") or a structured object carrying attenuation patterns ({"kind":"network","allow":["https://api.example/**"]}).
Enums§
- Capability
- A single permission grant.
- Determinism
- Determinism characterization — drives planner caching and hoisting.
- Lock
Granularity - Granularity of lock-capability grants.
- Scope
- Lifetime scope of a plugin’s registrations.
- Side
Effects - Declared side-effects of a plugin.