Skip to main content
Version: 0.10.0

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​

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
  • 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 — 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 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.
  • The set of classes is closed.

The four declared lists​

ListEntryMeans
streamsid, tolerates_loss, tolerates_reordera stream the Plugin may publish
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)
  • 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.