Skip to content
ENC Protocol

Plugin framework

PackageWhat it is
@enc-protocol/plugin-contractThe universal plugin contract — slot types, the plugin-discovery convention, and registration helpers
@enc-protocol/plugin-runtimePluginRegistry + ServerDataview helpers — load plugins from an app's schema and invoke them during query/write handling
@enc-protocol/plugin-client-baseDefault reference impls for the client slots
@enc-protocol/plugin-dataview-baseDefault reference impls for the DataView slots

All four are Apache-2.0, published at the release-train version, and depend only on @enc-protocol/plugin-contract (the runtime and the two -base sets each build on the contract; nothing else in the framework has intra-package dependencies).

plugin-contract

npm install @enc-protocol/plugin-contract

The universal contract every plugin implements: the slot types, the plugin-discovery convention, and registration helpers. A plugin is a value that fills a named slot; the contract defines what each slot's function signature is, so an app and the runtime agree on shape without importing each other.

plugin-runtime

npm install @enc-protocol/plugin-runtime

The server-side engine: a PluginRegistry plus ServerDataview helpers. Used on the server side (DataView / enclave) to load the plugins declared in an app's schema and invoke them during query and write handling.

plugin-client-base

npm install @enc-protocol/plugin-client-base

Default reference implementations for the protocol-level client slots: IngestStrategy, EventResolver, EnvelopeCrypto, RegistryStrategy, PeerRouting, Provisioner, and ProfileResolver. These are the standard behaviors the per-app client SDKs sit on. An app can swap any of them by registering its own implementation in the ClientPluginRegistry.

plugin-dataview-base

npm install @enc-protocol/plugin-dataview-base

Default reference implementations for the protocol-level DataView slots: SqlExecutor, DataViewIngest, WireDecrypt, and DataViewProjection. The generated per-app DataView Worker imports these helpers; an app can swap any of them by passing alternative implementations into the registry.

See also