feat(protocol): negotiate display and native input
Verify Protocol / module (push) Successful in 1m17s
Verify Protocol / verify (push) Successful in 55s

This commit is contained in:
sechmachine
2026-08-10 23:07:04 +07:00
parent 346bf5fe4d
commit 408d4f9cc3
24 changed files with 707 additions and 60 deletions
+7
View File
@@ -37,6 +37,13 @@ def classify_input(raw: bytes) -> str:
return "invalid:field"
active_mask = int.from_bytes(body[1:3], "big")
return "valid" if active_mask or not any(body[3:]) else "invalid:field"
if kind == 6:
if len(body) != 8:
return "invalid:length"
x, y, width, height = (int.from_bytes(body[index:index + 2], "big") for index in range(0, 8, 2))
return "valid" if width and height and x < width and y < height else "invalid:field"
if kind == 7:
return "valid" if len(body) == 4 else "invalid:length"
return "invalid:kind"