Plugin framework
| Package | What it is |
|---|---|
@enc-protocol/plugin-contract | The universal plugin contract — slot types, the plugin-discovery convention, and registration helpers |
@enc-protocol/plugin-runtime | PluginRegistry + ServerDataview helpers — load plugins from an app's schema and invoke them during query/write handling |
@enc-protocol/plugin-client-base | Default reference impls for the client slots |
@enc-protocol/plugin-dataview-base | Default 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-contractThe 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-runtimeThe 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-baseDefault 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-baseDefault 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
@enc-protocol/app-sdk-baseand@enc-protocol/services— the runtime layers that consume these plugins via the client registry.- Confidentiality plugins — the independent encryption scheme packages (ratchet-pair, mls-lazy, identity-aead, ecdh-envelope), a separate concept from this framework.