feat: added way to communicate 10 basic gestures

ref: N25B-399
This commit is contained in:
JobvAlewijk
2025-12-29 16:00:25 +01:00
parent 3e7f2ef574
commit 8cfd59c14b

View File

@@ -12,6 +12,7 @@ class RIEndpoint(str, Enum):
SPEECH = "actuate/speech"
GESTURE_SINGLE = "actuate/gesture/single"
GESTURE_TAG = "actuate/gesture/tag"
GESTURE_BASIC = "actuate/gesture/single"
PING = "ping"
NEGOTIATE_PORTS = "negotiate/ports"
@@ -49,16 +50,13 @@ class GestureCommand(RIMessage):
"""
endpoint: Literal[ # pyright: ignore[reportIncompatibleVariableOverride] - We validate this stricter rule ourselves
RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG
RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG, RIEndpoint.GESTURE_SINGLE
]
data: str
@model_validator(mode="after")
def check_endpoint(self):
allowed = {
RIEndpoint.GESTURE_SINGLE,
RIEndpoint.GESTURE_TAG,
}
allowed = {RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG, RIEndpoint.GESTURE_SINGLE}
if self.endpoint not in allowed:
raise ValueError("endpoint must be GESTURE_SINGLE or GESTURE_TAG")
raise ValueError("endpoint must be GESTURE_SINGLE, GESTURE_TAG or GESTURE_BASIC")
return self