The Manifest
The document that speaks for a Plugin before it runs. Everything in it is a claim, and a claim grants nothing: it tells the Core what a Plugin is before any of its code runs, and gives admission something to compare against.
Where it lives
| Deployment | Path |
|---|---|
| inside a bundle | manifests/<id>.yaml |
| a system installation | /etc/yoke/plugins.d/<id>/manifest.yaml |
- The identity in the path and the
idfield must agree. A mismatch is refused. - It is the same document in both deployment forms; a Plugin does not know which one it runs under.
- It is YAML, and every value is typed by the schema, never by the notation:
nois the stringno,1.0the string1.0,01the string01.
The document
manifest: 1
id: com.yoke.station.acquire
protocol: 1
needs:
- device:instrument
streams:
- id: station.spectra
- id: station.preview
tolerates_loss: true
tolerates_reorder: true
commands:
- id: calibrate
- id: set-range
queries:
- id: head-status
occurrences:
- id: calibration.drift
capabilities:
- name: stream.spectra.publish
governs: { stream: station.spectra }
- name: command.calibrate.accept
governs: { command: calibrate }
- name: query.head-status.answer
governs: { query: head-status }
- name: event.calibration-drift.report
governs: { occurrence: calibration.drift }
| Key | Type | Required | Holds |
|---|---|---|---|
manifest | integer | yes | the version of the Manifest model the document is written against; read first |
id | namespaced identifier | yes | the Plugin's identity |
protocol | integer | yes | the version of the plugin surface the binary speaks |
needs | list | — | the classes of thing the Plugin must reach |
streams | list | — | the streams it may publish |
commands | list | — | the command types it accepts |
queries | list | — | the query types it answers |
occurrences | list | — | the classes of occurrence it may report |
capabilities | list | — | what an operator may grant, each governing one object |
- An unknown key is refused at any level. It is never ignored.
manifestis read before anything else, so a document written against another model is recognised and refused rather than guessed at.
needs
Each entry is <class> or <class>:<name> — device:instrument, display, storage:datasets, secret:token —
where the name tells two needs of one class apart.
- A need names a class, never a particular thing. Which device a copy opens is a fact about a deployment, bound where the deployment is described and checked against this list in both directions.
- A device is the only class a deployment binds. A
storagedirectory and asecretare given by the runtime at paths it derives under the instance's state; adisplay, anaudiopath and anetworkare the host's own. A binding naming any of them is refused. - The set of classes is closed.
The four declared lists
| List | Entry | Means |
|---|---|---|
streams | id, tolerates_loss, tolerates_reorder | a stream the Plugin may publish |
commands | id | a command type it accepts |
queries | id | a query type it answers |
occurrences | id | a class of occurrence it may report |
- A registration repeats these lists, and admission checks the two against each other (Admission).
- A stream identifier becomes part of a socket path, so it is validated and never transformed: no
separator, no null byte, neither
.nor... A capability name carries no such constraint. - Both tolerances default to
false: a stream that says nothing gets an ordered path that loses nothing. Declaringtrueis a widening (Streams and transports).
capabilities
Each entry has a name and a governs block naming exactly one object.
| Field | Type | Holds |
|---|---|---|
name | capability name | the name an operator grants |
governs.stream | stream id | a stream declared above |
governs.command | command id | a command type declared above |
governs.query | query id | a query type declared above |
governs.occurrence | occurrence id | an occurrence class declared above |
governs.surface | surface name | a behavioural surface; none exists yet (Capabilities) |
- The two lists are joined in both directions: a capability naming an object no list declares is refused, and a declared object no capability governs is refused.
- The mapping is written, never derived. A capability's name and the identifier it governs are separate names, so either can change without dragging the other.
What it may not contain
| Absent | Because | Stated instead |
|---|---|---|
endpoint | four copies of one Plugin would all declare one path | derived from the unit's identity |
autostart | whether a copy comes up with the deployment is a statement about a set | on the unit, where the deployment is described |
| a digest of its own executable | a declared value is never an input to an authorisation | the signed descriptor of the package |
| a description of a capability | the party a permission constrains does not explain it | the shared vocabulary |
What is refused, before anything runs
Each is refused with the field named.
- an unknown key, at any level;
- a
manifestversion the host does not implement; - a
protocolthe Core does not support; - an
idthat is not a namespaced identifier, or that disagrees with its path; - a stream identifier that cannot be a path component;
- a capability naming an object no list declares;
- a declared stream, command, query or occurrence that no capability governs;
- a
governsblock naming none of its five keys, or more than one; - any of the four absent fields above.
A Manifest that will not parse is logged and skipped in the service form, and the other Plugins are still declared. In the application form it is fatal, because the application's description is the deployment.