LSL Protocol/Restrained Love Open Relay Group/ORG Requirements

STATUS: ready

VERSION: 0003

(In writing: Version 0004 draft)

Summary

This page is a list of requirements for a relay or an in-world device to have the right to be called "ORG compliant". It is mostly about adding support for an ORG-centered informational meta-command and specifying Marine Kelley's RLVR protocol a bit more that it is now, while of course preserving full compatibility.

If you are making in-world devices and are not interested in optional ORG x-tensions, you can skip most of this page, as your requirements amount to the following:

  1. Do not let your device spam the RLVR channel with commands that are not syntactically correct with respect to RLVR protocol.
  2. Never let your device be stuck in a state where no future event can unlock a currently locked relay.

If you are interested in ORG x-tensions, then you should also read the part about !x-orgversions.

If you are a relay maker, sorry we are afraid you will have to read all the page!

Definition of an ORG device

A RLVR device is compliant with ORG specifications if

  • meta-commands in RLVR protocol, behaving as described in RLVR specifications
  • meta-commands, whose names start with "!x-", behaving as described in ORG specifications
  • proprietary or experimental meta-commands, whose names start with "!_-" (replace "_" by any letter that is not "x")

Note that as soon as a RLVR controlling device makes use of a command defined in an ORG x-tension, then the specification of this x-tension MAY override one or several requirements of the core specification (this document). An x-tension that is not triggered by a specific command that it defines can only add more constraints, never override existing requirements. Indeed a controlling device has no way to know what requirements an unknown x-tension could override.

ORG devices may be advertised by the use of the ORG logo for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.

!x-orgversions

This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports, second it is similar to !version in RLVR protocol, as its reply gives the versions of the ORG core specification and ORG x-tensions that are implemented in the relay.

C<->R
  ->   query,rUUID,!x-orgversions
 <-    query,cUUID,!x-orgversions,ORG=0001/who=001/email=005

The acknowledgement string of the relay is a list separated by "/" whose items are of the form <package>=<version>. The first package is "ORG", the core specification of ORG relays, its version string is the version of the specification (4 digits). The other packages are ORG x-tension names (not meta-command names, as one x-tension can require several meta-commands, thus the name does not include the prefix "!x-"), whose version string is 3 digits.

Requirements for a relay:

Requirements for a controlling device: None. It is however recommended to use !x-orgversions when it makes sense for avoiding sending unsupported and useless meta-commands later.

ORG RLVR fixes

Marine Kelley's specification for RLVR protocol gives too much room for interpretation and incompatibilities between supposedly compliant devices. This is why in this section we add further requirements for RLVR+ORG devices.

Preliminaries/Reminders

Here we establish some notations related to RLVR protocol.

Here is the RLVR device message grammar (as it already is, nothing new):

<r_msg> ::= IDENT','KEY','<command>','ACK;
<d_msg> ::= IDENT','KEY','<commands>;
<commands> ::= <command> | <command>'|'<commands>;
<command> ::= <rlv-command> | <meta-command>;
<rlv-command> ::= '@'RLV-COMMAND;
<meta-command> ::= '!'META-COMMAND_NAME<meta-command arguments>;
<meta-command arguments> ::=  | '/'ARG<meta-command arguments>;

where the following tokens were used:

IDENT: any string without ","
KEY: any UUID
ACK: any string without ","
RLV-COMMAND: any string without ","
META-COMMAND_NAME: any string without "/" and ","
ARG: any string without "/" and ","

Furthermore we give the following definitions:

  • a restricting command followed by a "ok" acknowledgement
  • a ping/pong exchange with this relay
  • the controlling device becoming unreachable.
  • the relay sends "release,KEY,!release,ok"
  • the controlling device sends a !release

General Relay requirements

The relay must behave the following way by default (unless at some point a meta-command explicitly requires another behavior):

  • if the <command> is a <rlv-command>, the relay MUST acknowledge it, either by "ok", and transmit the command as such to the viewer with llOwnerSay("@"+RLV-COMMAND), or by "ko" and not transmit it.
  • if the <command> is a <meta-command>
  • if the META-COMMAND_NAME is !pong, no acknowledgement is expected. The relay MUST reinstate all stored restrictions belonging to the controlling device if they weren't already active.
  • if the META-COMMAND_NAME is unknown or is not provided with enough arguments for at least one definition of the meta-command, the relay MUST acknowledge by "ko"
  • else if the relay knows the META-COMMAND_NAME with at least one definition having less or as many arguments as received in <meta-command arguments>, it MUST acknowledge it by "ok" and choose among possible definitions the one that uses the most arguments. Then if the number of arguments of this definition is n, it MUST execute it using only the n first arguments of <meta-command arguments>, ignoring the trailing arguments if any.
  • if the <command> is neither, then the relay MUST ignore it (no acknowledgement whatsoever)
  • every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key)
  • the controlling device the restriction comes from specifically asks for the restriction to be released ("@restriction=y", "@clear=restriction")
  • the relay is being unlocked with respect to the device the restriction belongs to (for instance !release coming from the device, or safe-word)

General controlling device requirements