flare-plugin-host
English · 中文
Host-side library for Flare capability plugins: declare what your plugin can do, register it with the platform, withdraw it on shutdown.
Why a library instead of calling the RPC yourself
Not to save lines — to stop you from under-calling.
Registration accepts a partial declaration: leave declared_operations empty and
the platform accepts you anyway, marks the instance unverified, and the
declaration boundary silently stops applying to it. Nothing errors. Nothing logs
a problem. Your plugin just quietly loses its guarantees.
PluginDeclaration makes every one of those fields required, so an incomplete
declaration fails at compile time instead.
Usage
use ;
let declaration = PluginDeclaration ;
connect
.await?
.announce
.await?;
One registration serves every declared operation. The platform keys the route
book by (tenant, plugin) — your process holds a single record, and
declared_operations decides what it answers for. capability_id is just that
record's label; it does not narrow your reach.
seat_model is a product decision
| Value | Meaning | Fits |
|---|---|---|
Tenant |
Installed by the tenant, usable by everyone in it | Most plugins |
PerUser |
Still needs a per-user grant | Marginal-cost (AI billed per token) or compliance-isolated capabilities |
There is no default. Selling a per-token capability per tenant loses more money the more it is used, so the platform refuses to guess.
License
Apache-2.0