Skip to content

Repository files navigation

Nexion wire protocol

The compatibility contract between the Nexion Mac app and a client that mirrors it, which today means the iPhone companion.

Three files:

  • nexion-methods-v1.json is the index: every verb the protocol has, in both directions, grouped by the prefix the names already carry.
  • nexion-capabilities-v1.json names every optional behaviour, what it changes on the wire, and what a client that does not ask for it receives instead.
  • nexion-conformance-v1.json holds recorded payloads for the same space rendered at different capability levels.

The rule this exists to enforce

Adding a field is free. Both sides ignore what they do not recognise.

Adding an enum value is not free. The phone parses with a cast and switches without a default, so a value it has never seen draws a broken row or opens the wrong screen. Any such change is a capability, declared per connection, and the Mac shapes each payload from what that connection asked for. It never assumes the newest client.

Why the fixtures matter more than the prose

The capability file makes a promise in English: a client that declares nothing still gets the version 1 shape. workspace.get/legacy is that same promise as a payload, so it can be checked instead of believed.

The Mac decodes each fixture into its DTOs and encodes it back, and every field has to survive the round trip. Renaming or dropping one fails the test; adding one does not, because a minor revision is additive. The phone is checked against the fields it actually reads and the enum values its switches handle.

The fixtures come out of a running Mac via nexion protocol capture, not from someone writing JSON by hand, so they cannot drift from what the app really sends. Names, paths, titles and URLs are replaced with placeholders and identifiers are renumbered: the shape is real, the contents are not.

The verbs

55 methods the client can call and 21 events the Mac pushes, across 16 groups: terminals, tasks, web panes, tmux, canvas, webrtc, pairing, notifications and the rest. The index is generated from the protocol enums themselves, so it cannot name a verb the code does not have, and it cannot quietly miss one either: the generator counts the cases it found against the cases declared and refuses to write a file when they disagree.

Scope

An index of verbs and a contract for compatibility, not a client-writing manual. What is here is which verbs exist, which behaviours are optional, and what three payloads look like at two capability levels. What is not here is the params each verb takes.

If you are writing a third-party client and need those shapes, open an issue and say what you are building.

Versioning

The major version must match between the two sides. Minor revisions are additive. An unknown capability is ignored rather than refused.

License

MIT. See LICENSE.

About

The wire contract between the Nexion Mac app and a client that mirrors it: capabilities, conformance fixtures, and the index of every verb

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors