Expand description
The account interfaces shared by UI and daemon plugins, and the viewer interfaces of UI plugins.
Each interface is a zero-sized handle returned by a function of the same
name (values(), events(), …) and by the matching method of the
plugin’s context. Every call is checked against the manifest’s grants; a
call they do not cover returns Error::GrantDenied naming the grant.
Payloads are JSON: typed values go through serde.
Modules§
- account
- Read-only account state. Grant:
account.read. Never what is inside a pane: no screen, scrollback, input or output exists in this API. - calls
- Request and response to the plugin’s companion daemon. Grant:
call:<plugin id>. - capabilities
- What this viewer can show. UI plugins only; no grant. Changes arrive as
crate::Event::CapabilitiesChanged. - claims
- Exactly-once effects across the viewers that run a UI plugin.
- config
- The plugin’s configuration document, as the account stores it. No grant.
- events
- Named, unstored messages between plugins (
crate::Event::Plugin). The plugin’s own namespace (<id>.*) needs no grant;global.*, another plugin’s namespace andsystem.*needevents.emit:<ns>orevents.on:<ns>. Nothing may emit intosystem.*. - health
- The plugin’s own report of how it is doing: shown beside its runtime
state in the Plugins view (a UI plugin’s, in that viewer) and by
standard plugin health(a daemon plugin’s, per machine). Each report replaces the last; a plugin that never reports isok. No grant. - live
- The unstored latest-value channel: a publisher replaces the value, a
subscriber sees the newest one (
crate::Event::Live). The own namespace needs no grant; others needlive.publish:<prefix>/live.subscribe:<prefix>. - secrets
- Named secrets the user entered for this plugin. Grant:
secret:<NAME>. - url
- Opens web pages in the user’s browser. UI plugins only. Grant:
url.open:<host>(*.<domain>for its subdomains,*for any host). - values
- Durable key-value state on the account. Keys under the plugin’s own id
(
<id>.<rest>) need no grant; others needvalues.read:<prefix>/values.write:<prefix>. - view
- Viewer-local state. UI plugins only; no grant.
Structs§
- Json
- A JSON document as the host passes it: a value, a live message, an event payload, a call’s request or response.
Enums§
- Target
- Where an event or call is delivered.