A plugin that already cleared a handshake is admitted with
register_plugin_from_grant, which
validates the request/grant envelope pair against the canonical MCP contract, asserts
correlation/session/trace match, and records the plugin as
registered_idle. It holds permissions
but no authorized capabilities yet.
Product 20 · SDK / MCP / Plugin / Local API · Wave 2
Plugin Runtime
A governed front door for every plugin your agent loads. Plugin Runtime gives an agent one disciplined path from untrusted to running: register a granted plugin, authorize each capability, clear a handshake gatekeeper, invoke through a mediated MCP bridge, and forensically record everything the plugin touched. It governs the boundary — it does not vouch for the plugin.
A plugin arrives, and it's already trusted.
Agents are increasingly asked to load third-party plugins and MCP servers — code and tool surfaces the agent author did not write and cannot fully inspect. The usual pattern is to wire the plugin straight into the runtime: it arrives, it is trusted, and it can call tools and read resources from the first message. There is no recorded moment where someone decided this plugin may hold this capability, and no durable trail of what it actually did once it was live.
When something goes wrong — an unexpected resource read, a capability used outside its grant, a plugin that should never have been authorized — the operator is reconstructing intent from logs that were never designed to answer the question. The plugin's permissions, the capabilities it was authorized for, the exact tool it invoked, and the boundary pressure it generated are scattered or absent.
Plugin Runtime adds the missing structure between "a plugin exists" and "a plugin is
running." Loading becomes a sequence of explicit, recorded transitions — registration,
capability authorization, handshake, gated invocation — each one logged, each one
reversible by termination, each one anchored to a session and trace. The runtime is
deliberately conservative: a plugin starts
untrusted and only ever holds the
specific capabilities it was authorized for.
Register → Authorize → Bridge & record
authorize_capability promotes the
plugin from registered_idle to
registered_authorized only if the
capability's required permissions are a subset of the granted permissions and
the policy engine allows it. At invocation, the runtime re-checks the handshake token
and that the capability is in the authorized set.
Authorized, read-only invocations run inside a transient
InvocationContext; mediated resource
reads go through the allowlisted MCP bridge
(invoke_mcp_bridge_resource).
Boundary-pressure and rejection telemetry is written to the forensic sink and is later
reconstructable with
query_plugin_forensic_events.
Lifecycle, capability authorization & forensic sink
The model below is derived directly from the originating agent's plugin runtime, registry, and lifecycle
modules. The runtime models a small, fail-closed state machine: there is intentionally no
free-floating active state
and no auto-flip of execution flags (see the lineage note).
| Stage | Meaning | Allowed next |
|---|---|---|
| untrusted | Plugin is known but not admitted. | registered_idle |
| registered_idle | Admitted from a validated grant; holds permissions but no authorized capabilities yet. | registered_authorized, terminated |
| registered_authorized | At least one capability authorized; invocable, read-only. | terminated |
| terminated | Revoked. Terminal — no further transitions. | (none) |
Every transition is committed only by the host-runtime actor, never the plugin itself, and recorded as an audit-only
PluginLifecycleEvent.
Authorization is a registry-state update, not an execution grant. Even after authorization,
execution_enabled,
tool_access_enabled,
and orchestration_enabled
remain False today — the proven slice
authorizes capabilities and permits a narrow set of read-only tool invocations, but does
not flip a plugin into general execution. Broad execution is
proposed, not proven.
| Check | Rule |
|---|---|
| Declared | Capability must appear in the plugin's declared capabilities. |
| Permission subset | required_permissions ⊆ granted_permissions. |
| Policy allow | The policy engine must allow the capability for the granted set. |
| Handshake token | Token must match the registration record on every invocation. |
| Mapped tool | Only capabilities with an allowlisted read-only tool can be invoked. |
| Mechanism | What it does |
|---|---|
| Boundary-pressure capture | A runtime_rejection carrying the boundary_pressure signal is converted into a durable, write-only heat-history row. |
| Forensic link | Each row preserves a receipt_reference: plugin_telemetry:<event_id>, the plugin context in normalized_fields, and the original event in raw_payload. |
| Readback | Reconstructs those rows without inferring causality (causal_inference_performed: false). |
execution_enabled /
tool_access_enabled /
orchestration_enabled stay
False. The product extends this into a packaged runtime; broad execution and sandboxing are
proposed, not proven. (Source: the originating agent's plugin runtime.)
MCP tools
The MCP tools below ship in the published package (v0.1.1). Each description names the originating agent's service it was extracted from.
registered_idle after validating the request/grant envelope pair.terminated state with a reason.registered_authorized for one capability under permission-subset + policy checks.Install
Plugin Runtime is a CertaWorks Wave 2 product — the most architecturally substantial in the suite. It is built, tested, and published on npm. The commands below show the package interface — an SDK, an MCP server, a host-agent plugin, and a local HTTP API, consistent with the rest of the suite — so you can see exactly what it exposes.
Running it, or want to help shape what comes next? Use the feedback form below.
The package @certaworks/plugin-runtime
is live on npm. Install it globally, or point your MCP client at it with the config below
(its MCP server command is plugin-runtime-mcp).
npm install -g @certaworks/plugin-runtime
{
"mcpServers": {
"plugin-runtime": {
"command": "npx",
"args": ["-y", "-p", "@certaworks/plugin-runtime", "plugin-runtime-mcp"]
}
}
}
What Plugin Runtime does and does not do
- Admit plugins only from a validated handshake request/grant pair
- Authorize capabilities under permission-subset and policy checks
-
Enforce a fail-closed lifecycle (
untrusted → idle → authorized → terminated) - Mediate external resource access through an allowlisted MCP bridge
- Forensically record boundary pressure and reconstruct it later
- Run fully local as an MCP server, SDK, host-agent plugin, and local HTTP API
- Guarantee that any plugin is safe — it governs the boundary, it does not vouch for plugin behavior
-
Execute arbitrary plugin code by default — execution stays read-only and
execution_enabledisFalse(broad execution is proposed) - Sandbox or contain arbitrary third-party plugin code (proposed)
-
Grant general execution, tool access, or orchestration — those flags stay
Falsein the proven slice - Give plugins direct filesystem, network, or host access; or infer causality across the forensic record
- Replace human review of which plugins and capabilities to trust
Related Products
Using Plugin Runtime? Tell us how it goes
Plugin Runtime is part of CertaWorks Wave 2 — a second set of built tools productized from a working cognitive agent. It's on npm now. Tell us what you're running it against, what broke, or what you'd want next — we read every note.