Plugin Capability Reference
What this page covers
Stigmem plugins declare capabilities in PluginManifest.capabilities.
The registry passes each handler a PluginContext scoped to the
declaring plugin. A handler can only retrieve a core API handle
when the manifest declares the matching capability.
Audience: Plugin authors, operators, and security reviewers evaluating plugin access.
The v0.9.0a1 capability model is intentionally fail closed.
Unknown names rejected
During manifest validation.
Missing declared capabilities raise
CapabilityError when a handler calls the gated accessor.
Declaring ≠ guarantee
Declaring a capability permits access, but the exposed handle may still be None if the node did not provide that core API to plugins.
Not a replacement
Treat capabilities as security review inputs, not as a replacement for plugin signing, trusted-publisher policy, or code review.
For a working example, see the Plugin Author Guide. For hook dispatch behavior, see the Plugin Hook Reference.
Capability table
facts.readget_facts_reader()facts.writeget_facts_writer()recall.readget_recall_reader()recall.writeget_recall_writer()audit.emitget_audit_emitter()audit.readget_audit_reader()federation.readget_federation_reader()federation.writeget_federation_writer()identity.readget_identity_reader()tenant.readget_tenant_reader()tenant.writeget_tenant_writer()config.readget_config_reader()network.outboundget_network_outbound()Denial behavior
Capability denial is enforced when the handler asks for a core API handle:
from stigmem_node.plugins import PluginContext
def handler(ctx: PluginContext, **_: object) -> None:
ctx.get_facts_reader()
If the plugin manifest does not declare facts.read, the accessor raises CapabilityError:
plugin 'example-plugin' cannot call get_facts_reader: capability 'facts.read' not declared
The registry treats that like any other handler failure for the hook semantic:
Voting / filter / score-delta
Failures surface as plugin execution errors.
Non-strict fire-and-forget
Logged and audited without stopping the hook site.
Strict audit (incl. audit_emit)
Failures are surfaced.
Operator review checklist
- Confirm the package is signed by an accepted trusted publisher or an explicit operator override.
- Compare the manifest capability list to the plugin's documented behavior.
- Reject broad write, tenant, federation, identity, or outbound-network access unless the use case requires it.
- Prefer plugins that emit audit events for meaningful side effects.
- Re-review capabilities when upgrading a plugin package, even if the signing identity has not changed.