Skip to main content
Version: 0.17.0

The Manifest

The Manifest is what a Plugin declares about itself, in a file, before any of its code runs. It names the Plugin and the version of this surface it speaks, and the things it must reach. It also lists everything it may do: the streams it publishes, the commands it accepts, the questions it answers, the occurrences it reports, and the capability an operator grants for each. Everything in it is a claim, and a claim grants nothing. The Manifest gives admission something to compare against; the Registry decides what is allowed. This page gives its keys, what it may not contain, and what is refused before anything runs.

Where it lives​

DeploymentPath
inside a bundlemanifests/<id>.yaml
a system installation/etc/yoke/plugins.d/<id>/manifest.yaml
  • The identity in the path and the id field 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: no is the string no, 1.0 the string 1.0, 01 the string 01.

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 }
KeyTypeRequiredHolds
manifestintegeryesthe version of the Manifest model the document is written against; read first
idnamespaced identifieryesthe Plugin's identity
protocolintegeryesthe version of the plugin surface the binary speaks
needslist—the classes of thing the Plugin must reach
streamslist—the streams it may publish
commandslist—the command types it accepts
querieslist—the query types it answers
occurrenceslist—the classes of occurrence it may report
capabilitieslist—what an operator may grant, each governing one object
usesmapping—for each unit need, the questions it asks and the streams it follows of the unit bound (Using another unit)
rewriteslist—the secret needs whose value the unit replaces itself (Secrets)
  • An unknown key is refused at any level. It is never ignored.
  • manifest is 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, unit:accounts — 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 and a unit are the two classes a deployment binds: which device a copy opens, and which of the application's Plugin units a unit need means. A storage directory and a secret are given by the runtime at paths it derives under the instance's state; a display, an audio path and a network are the host's own. A binding naming any of them is refused.
  • A unit need is met by a Plugin unit of the same application, and always bound: there is no optional need.
  • The set of classes is closed.

The four declared lists​

ListEntryMeans
streamsid, tolerates_loss, tolerates_reorder, max_framea stream the Plugin may publish; max_frame is the largest payload it emits, in bytes: 1 MiB when absent, at most 64 MiB, refused beyond as stream.max_frame
commandsida command type it accepts
queriesida query type it answers
occurrencesida 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. Declaring true is a widening (Streams and transports).

capabilities​

Each entry has a name and a governs block naming exactly one object.

FieldTypeHolds
namecapability namethe name an operator grants
governs.streamstream ida stream declared above
governs.commandcommand ida command type declared above
governs.queryquery ida query type declared above
governs.occurrenceoccurrence idan occurrence class declared above
governs.surfacesurface namea behavioural surface; none exists yet (Capabilities)
governs.use{ need, query } or { need, stream }a question asked, or a stream followed, of a unit need, named in uses
  • 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​

AbsentBecauseStated instead
endpointfour copies of one Plugin would all declare one pathderived from the unit's identity
autostartwhether a copy comes up with the deployment is a statement about a seton the unit, where the deployment is described
a digest of its own executablea declared value is never an input to an authorisationthe signed descriptor of the package
a description of a capabilitythe party a permission constrains does not explain itthe shared vocabulary

What is refused, before anything runs​

Each is refused with the field named.

  • an unknown key, at any level;
  • a manifest version the host does not implement;
  • a protocol the Core does not support;
  • an id that 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 governs block 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.